一般我们在安装配置好后一个应用程序后,得先启动相关的守护进程,如:mysql数据库,启动时,我们都会键入:
[root@localhost /]# service mysqld start
有时我们需要让服务器每次启动后将一些进程自动运行。
chkconfig 这个程序可以将 /etc/rc.d/init.d/ 里面的可执行服务与 /etc/xinetd.d 里面的相关可执行的服务,连结到目前的 run-level 里头去
1.确保/etc/rc.d/init.d/mysqld 存在,用service mysqld start能够正常启动
2.运行命令:chkconfig --add mysqld
3.运行命令: chkconfig --level 345 mysqld on
4.下次开机时就mysqld 就会自动启动
5.chkconfig -del :删除一个开机启动的服务!