Linux Setup Boot service auto start [[email protected] ~]# chkconfig--list Show services that can be started automatically on boot [[email Protected] ~]# chkconfig--add * * * Add power on auto Start * * * * Service [[email protected] ~]# chkconfig--del * * Delete boot auto start * * Services www.2cto.com [[email protected] ~]# setup commands that can be configured in the Shell graphics terminal, go to service to select [[email protected] ~]# ntsysv in shell Terminal graphics Configuration Boot service command, options not above that much setup, rc.local And chkconfig three ways can be set first) Enter #setup command into the System service menu, select the services you want to start such as httpd, and then restart the machine or/etc/rc.d./init.d/httpd start www.2cto.com second) put the start command in the/etc/rc.d/rc.local file so that you can start the service automatically every time you start, For example, Apache, after compiling Apache, will generate the Apachectl file under the bin of the installation directory, this is a startup script, we just need to add this command to Rc.local (SuSE has no rc.local. SuSE can define its own scripts so that if you want to run your own scripts before and after switching the run level, you can create them separately: /etc/init.d/before.local /etc/init.d/after.local) echo/usr/local/apache/bin/apachectl>>/etc/rc.d/rc.local, The way to set up the service to start automatically is to include some scripts like the following in Rc.local: #sshd /usr/local/sbin/sshd #proftpd /usr/local/sbin/proftpd #apache /home/ Apache/bin/apachectl start #mysql /home/mysql/bin/safe_mysqld--port=3306 & #start Oracle8i listener first su-oracle-c ' lsnrctl start ' #start oracle8i su-oracle-c ' Dbstart ' The third kind through chkconfig instruction . uses the Chkconfig command to add a service to the system's various runlevel, the steps are as follows, 1 creates the startup script . for Apache,mysql, SSH Such software is self-brought, we just have to modify a little bit to support chkconfig can be 2 modify the script we need to add 2 lines before the script to support chkconfig command # chkconfig: 2345 92 # # description:automates A packet filtering firewall Withipchains. # chkconfig: The subsequent definition of the runlevel that enables the service to start (for example, the 2345 start service), and the order in which the services are closed and started (the order in which the services are turned off in the example above 8, the order in which they are started) descriptions: Description of the change service (IPChains packet filtering in the above example) , you can switch to your own desired modify and execute  CP your script/etc/rc.d/init.d/script name chmod 700/etc/rc.d/init.d/script name Chkconfig--add script name such as: to add it to the Linux boot process, run only at level 3, Levels 5, [[email protected] INit.d]/sbin/chkconfig--add apache-httpd [[email protected] Init.d]/sbin/chkconfig--level 35 After apache-httpdon , we will automatically start and close our service every time we restart the server.
Linux Setup Start-up service starts automatically