Would appreciated if Gurus out there can point out how can I auto startup the services/daemons in UNIX and LINUX such as httpd/smb/network etc when the machine restart/boot up.
The standard way is to use startup scripts located at /etc/rcX.d , where X is the run-level number (to check the default runlevel check /etc/inittab). There, you'll find some scripts like SYYservice_name or KYYservice_name, where YY is a number.
The S means that that script is going to be passed the start argument, so those are used when booting. The K means that the arg is stop, so are going to be used when stopping the daemons.
When you want to remove a script from startup process, the best way is to rename the script (other way you'll loose it), something like, noSYYservice_name,....
The number is the precedence, lower numbers first.
The most usual services, those installed with the Operating System will have the scripts included. For other daemons, services, etc... the best way is to copy a small one from those that are included and modify the commands but respect the sintaxis.
NOT STANDALONE SERVICES
Other way to start services like telnet, etc... is to use inetd. This way the inetd daemon will start and stop services under demand. Take a look at the inetd configuration file: /etc/inetd.conf. Check inetd man pages for more info on this.
I hope this will help you. If you need more info just post again.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.