How to start Zephyr server automatically after reboot on linux
Perform the following steps based on the flavour of your OS to make Zephyr autostart on reboot.
For Linux:
- Login as root user on your Linux server
- Create or copy your ZephyrService script under /etc/init.d Assuming Zephyr installation directory is “/opt/zephyr/”
[root@linux ~]# cp /opt/zephyr/bin/ZephyrService.sh /etc/init.d/Zephyr - Now Zephyr service is added to the service list as Zephyr.
- Add Zephyr script to start on boot using chkconfig utility as below.
[root@linux ~]#chkconfig –add Zephyr
[root@linux ~]#chkconfig Zephyr on - Confirm script is added using chkconfig utility
[root@linux]# chkconfig –list Zephyr
O/P : Zephyr 0:off 1:off 2:on 3:on 4:on 5:on 6:off - By performing the above steps Zephyr will auto-start on boot.
For Debian:
- Follow the steps 1-3 above
- Make the init.d script executable
$ sudo chmod 755 /etc/init.d/Zephyr - Add the init.d script to a default runlevel so that the script can be called at boot time (and also during shutdown).
$ sudo update-rc.d Zephyr defaults - By performing the above steps Zephyr will auto-start on boot.
- Later if you decide to remove the init.d script from start-up service list, you can simply run the following.
$ sudo update-rc.d -f Zephyr remove
For RHEL:
- Run the below command
[root@linux ~]#chmod +x /etc/rc.d/rc.local - Please open /etc/rc.local file and make the following entry. Assuming Zephyr installation directory is “/opt/zephyr/”. Please change it if it is different in your case.
[root@linux ~]#/opt/zephyr/bin/ZephyrService.sh start - Reboot the machine and make sure Zephyr has started.