添加自编译的apache为linux系统服务
2016-10-01 23:13
239 查看
步骤1添加服务脚本
#cp /app/apache2/bin/apachectl /etc/rc.d/init.d/httpd
#ln -s /etc/rc.d/init.d/httpd /etc/rc.d/rc3.d/S61httpd
当init.d目录下有httpd脚本后,我们就可以通过service命令来启动关闭apache了,此时可以说已经成添加了apache系统服务。
但是# chkconfig –list却还是没有发现apache服务
步骤2,修改脚本使其支持chkconfig
编辑httpd脚本,在第2行添加如下注释信息:
#chkconfig: 35 61 61
#description: Apache
保存后执行:chkconfig --add httpd
第一行的3个参数意义分别为:在哪些运行级别启动httpd(3,5);启动序号(S61);关闭序号(K61)。注意:以上两行缺一不可
执行chkconfig --add httpd后就在rc3.d、rc5.d路径中将来就会出现S61httpd的链接,其他运行级别路径中会出现K61httpd的链接。
#cp /app/apache2/bin/apachectl /etc/rc.d/init.d/httpd
#ln -s /etc/rc.d/init.d/httpd /etc/rc.d/rc3.d/S61httpd
当init.d目录下有httpd脚本后,我们就可以通过service命令来启动关闭apache了,此时可以说已经成添加了apache系统服务。
但是# chkconfig –list却还是没有发现apache服务
步骤2,修改脚本使其支持chkconfig
编辑httpd脚本,在第2行添加如下注释信息:
#chkconfig: 35 61 61
#description: Apache
保存后执行:chkconfig --add httpd
第一行的3个参数意义分别为:在哪些运行级别启动httpd(3,5);启动序号(S61);关闭序号(K61)。注意:以上两行缺一不可
执行chkconfig --add httpd后就在rc3.d、rc5.d路径中将来就会出现S61httpd的链接,其他运行级别路径中会出现K61httpd的链接。
相关文章推荐
- Linux设置添加MySQL Apache为系统服务并开机启动
- 将apache添加为Linux系统自启动服务
- 将apache添加为Linux系统自启动服务
- RedHat 将Apache添加为Linux的系统服务 实现自启动
- centos将自编译安装的apache添加为linux系统服务
- Apache自动启动及添加为Linux的服务
- Linux下注册Apache为系统服务
- 将Apache添加为Linux的服务 实现自启动(转)
- Linux环境把Mysql和Apache加入到系统服务里面
- Linux下将Mysql和Apache加入到系统服务里的方法
- Linux(CentOS)系统下安装好apache(httpd)服务后,其他电脑无法访问的原因
- 将Apache添加为Linux的服务 实现自启动
- CentOS 5.2,Linux 2.6+ 内核 ,Apache+MySQL+PHP 安装及基本配置过程记录 && 将apache安装为系统服务
- 将tomcat添加为linux系统服务
- Linux下把Mysql和Apache加入到系统服务里
- linux 添加系统服务,chkconfig使用
- 编译安装APACHE并添加为系统服务
- Linux下注册Apache,mysql为系统服务
- Apache自动启动及添加为Linux的服务 转自:http://www.51testing.com/?27242/action_viewspace_itemid_78916.html
- Linux下将Mysql和Apache加入到系统服务里的方法