linux怎样把apahce和mysql添加到开机自动启动

时间:2026-02-14 16:41:41

1、首先先用putty.exe这个软件链接服务(其他的链接工具也可以)

linux怎样把apahce和mysql添加到开机自动启动

2、linux   用这个命令chkconfig --list查看各项服务的状况:(如图所示) (当然我这个是没有把apache和mysql加进去的)

linux怎样把apahce和mysql添加到开机自动启动

3、下面还是用这个命令‍chkconfig --add  httpd 把apache加入进去

linux怎样把apahce和mysql添加到开机自动启动

4、在设置开机启动时,添加httpd如果遇到提示

service httpd does not support chkconfig

vi /etc/init.d/httpd   编辑这个文件

在在#!/bin/sh后面加入下面两行#chkconfig:345 85 15#description: Start and stops the Apache HTTP Server.

然后在执行chkconfig --add  httpd这个命令就可以啦

mysql和apache同理

最后重新启动一下 ok啦

linux怎样把apahce和mysql添加到开机自动启动

© 2026 五度知识库
信息来自网络 所有数据仅供参考
有疑问请联系站长 site.kefu@gmail.com