Red Hat linux system boot from the startup script.

In fact, a lot of things after the finalization will feel it as interesting is the inquiry process.

Some time ago the boss for a program to make linux system boot from the startup script mode.

First you need to write a script.

I am here to establish a .sh script, it is to start this program in my script.

#!/bin/sh
  nohup $WOD_HOME/bin/wod_serv >/dev/null &

Mainly above this sentence, nohup is to start an executable program in the path.

Script written after the script is how to start, where to start in this script.

After boot system will automatically load a number of programs.

Location is added /etc/rc.d/rc.local file. Only you need to add a sentence at the bottom of the rc.local file.

su - sifang -c "/home/sifang/bin/wod_serv.sh"

Note: Be sure to su and sifang in the middle of "-" both sides put spaces. On this issue looking to spend a lot of time, I can only blame themselves carefully enough! ! !

 

Then reboot about linux system, should be able to play up! ! !

 

Guess you like

Origin www.cnblogs.com/joorey/p/11887264.html