ํ์ผ์ ์คํ๊ถํ ๋ถ์ฌํ๊ธฐ
chmod +x /etc/rc.d/rc.local
๋ฐ๋ชฌ ์๋์์ ๋ฑ๋กํ๊ธฐ
cat <<EOF >> /usr/lib/systemd/system/rc-local.service
[Install]
WantedBy=multi-user.target
EOF
systemctl enable rc-local.service
systemctl start rc-local.service
rc.local ์๋น์ค ์ํ ํ์ธ
systemctl status rc-local.service // ์ ๋๋ก Activated ๋๋์ง ํ์ธ
systemctl list-unit-files | grep rc.local // enabled ๋์๋ ์ง ํ์ธ
ํ ์คํธ
cat <<EOF >> /etc/rc.d/rc.local
touch /root/rc-local_test.txt
EOF
init 6 // ์ฌ๋ถํ
ํ, ํ์ผ ์์ฑํ์ธ
๋ฐ์ํ
'๐ ๏ธ Devops > Linux' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[RHEL] Failed to set locale defaulting to c.utf-8 ์ค๋ฅ ํด๊ฒฐ (2) | 2024.06.04 |
---|---|
[Linux] ๋คํธ์ํฌ ๋๋ฐ์ด์ค๋ช ๋ณ๊ฒฝ (eth0) (0) | 2023.08.18 |
[CentOS 7.9] PXE Server with KickStart ๊ตฌ์ถ (0) | 2022.07.22 |
[Ubuntu 20.04] APT Mirror ์๋ฒ ๊ตฌ์ถ (1) | 2022.05.04 |
[Ubuntu 20.04] Bonding ์ค์ (2) | 2022.05.04 |