原文网址:https://www.youyong.top/article/1158e2fe2195
Linux 编译安装 Apache 添加 chkconfig 配置自启动的方法:
原文网址:https://www.youyong.top/article/1158e2fe2195
Linux 编译安装 Apache 添加 chkconfig 配置自启动的方法:
原文网址:https://www.youyong.top/article/1158e2fe2195
假设 Apache 安装的路径为 /usr/local/apache/
注意:实际安装路径以您真实的安装路径为准
1、首选需要将 /usr/local/apache/bin/apachectl 文件拷贝到 /etc/rc.d/init.d 目录中并更名为 httpd,具体操作命令为:
cp /usr/local/apache/bin/apachectl /etc/rc.d/init.d/httpd
并且还需要在/etc/rc.d/rc5.d/加入链接,具体操作命令为:
ln -s /etc/rc.d/init.d/httpd /etc/rc.d/rc5.d/S85httpd
2、这时可以运行 chkconfig --list | grep httpd,查看服务列表中是否存在 httpd 这个服务;如果没有,可以通过 chkconfig --add httpd 来添加。如果在添加时出现提示:service httpd does not support chkconfig
需要编辑 /etc/rc.d/init.d/httpd,在文件空白行添加以下信息,可以使用vi进行编辑操作
#chkconfig: 345 85 15
#description: Activates/Deactivates Apache Web Server
其中3个数字参数意义分别为:
哪些Linux级别需要启动httpd(3,4,5);启动序号(85);关闭序号(15)
保存后执行:chkconfig --add httpd 成功添加
3、运行 chkconfig --list | grep httpd 查看启动级别3,4,5 已经处于on的状态,说明已经设置成功。
共 0 条留言
tomcat报warinig Unable to add the resource at [] to the cache
Apache 出现 winnt_accept: Asynchronous AcceptEx faile?
CentOS 6.5系统下 Apache 如何配置 https 服务?
Linux下Apache日志的常用分析方法和日志大小的优化方法
iPhone X 跌破发行价,苏宁200亿入股恒大 | 财经日日评
资深黄牛现身说法:iPhone X价格秒变不停,就像炒股一样
手机扫一扫
分享文章