Welcome to tkjbhozar's blog

Membuat rc.local Debian10

 

1. Buat sebuah file di /etc/systemd/system/rc-local.service

nano /etc/systemd/system/rc-local.service

2. Tulis perintah dibawah ini. 

[Unit]
Description=/etc/rc.local
ConditionPathExists=/etc/rc.local

[Service]
Type=forking
ExecStart=/etc/rc.local start
TimeoutSec=0
StandardOutput=tty
RemainAfterExit=yes
SysVStartPriority=99

[Install]
WantedBy=multi-user.target
 
3. Buat sebuah file rc.local
nano /etc/rc.local
 
4. Tulis skrip berikut :
#!/bin/sh -e
#
# rc.local
#


exit 0
 
simpan dengan nama rc.local 
5. Ubah izin akses file rc.local
chmod +x /etc/rc.local
 
6. Enable file rc.local saat boot
systemctl enable rc-local
 
7. Jalankan file rc.local
systemctl start rc-local.service
 
8. Cek status file rc.local
systemctl status rc-local.service    

No comments:

Post a Comment

Contoh IP Static Linux Ubuntu 24

  A. Tanpa VLAN      B. Dengan VLAN C. MODEL LAIN