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

2025-10-22 07:13:59

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添加到开机自动启动

声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
猜你喜欢