apache与mysql如何添加进系统服务及成功设置开机启动
更新:HHH   时间:2023-1-7


下面跟着笔者一起来了解下apache与mysql如何添加进系统服务及成功设置开机启动,相信大家看完肯定会受益匪浅,文字在精不在多,希望apache与mysql如何添加进系统服务及成功设置开机启动这篇短内容是你想要的。         

apache

1  cp /usr/local/apache/bin/apachectl /etc/init.d/httpd

2  chkconfig --add httpd

出现错误service httpd does not support chkconfig

打开 vi /etc/rc.d/init.d/httpd 添加(#!/bin/sh下面)

# chkconfig: 345 85 15

# description: Activates/Deactivates Apache Web Server

345代表哪些Linux级别需要启动httpd, 启动序号是85, 关闭序号是15

3  chkconfig httpd on

mysql

1   cp /root/tools/mysql-5.1.72/support-files/mysql.server  /etc/init.d/mysqld

1.1 chmod 700 /etc/init.d/mysqld

2   chkconfig --add mysqld

3   chkconfig mysqld on

看完apache与mysql如何添加进系统服务及成功设置开机启动这篇文章后,很多读者朋友肯定会想要了解更多的相关内容,如需获取更多的行业信息,可以关注我们的行业资讯栏目。


返回MySQL数据库教程...