Linux下将Apache(httpd)新增为系统服务及开机自启动
来源:互联网 发布:阿里云服务器无法访问 编辑:程序博客网 时间:2024/06/01 10:11
转自:http://www.linuxidc.com/Linux/2012-11/74517p2.htm
1> 查看一下/etc/init.d/下是否存在httpd这个服务
ls /etc/init.d/ | grep httpd 如果没有执行下一步
2>将自己安装目录下的apachect1复制到该目录下并改为httpd
cp /home/houqingdong/http-exe/bin/apachect1 /etc/init.d/httpd 注:红色为自己的安装目录
3>执行 chkconfig --add httpd 目的是想新增所制定的系统服务 但是会出现以下警告:
这里说的是httpd服务不支持chkconfig , 添加支持: vi /etc/init.d/httpd 在 #!/bin/sh 下添加这两句:
#chkconfig:345 85 15
#description:Start and stop the Apache HTTP Server 最终结果为:
4> 执行: chkconfig --add httpd
chkconfig httpd on 就可以添加成功了
5>查看一下是否添加成功:
chkconfig --list httpd
Linux 设置Apche+MySQL开机启动
mysql设为linux服务
cp /usr/local/mysql5/share/mysql/mysql.server /etc/init.d/mysqld
chkconfig --add mysqld
chkconfig --level 2345 mysqld on
chown mysql:mysql -R /usr/local/mysql5/
service mysqld start
apache设为linux服务
cp /usr/local/apache2/bin/apachectl /etc/init.d/httpd
vi /etc/init.d/httpd
在在#!/bin/sh后面加入下面两行
#chkconfig:345 85 15
#description: Start and stops the Apache HTTP Server.
然后
chmod +x /etc/rc.d/init.d/httpd
chkconfig --add httpd
然后可以用setup命令进入服务设置,设置为开机启动
第二种方法:
在/etc/rc.d/rc.local中增加启动apache的命令,例如:/usr/local/httpd/bin/apachectl start
- Linux下将Apache(httpd)新增为系统服务及开机自启动
- Linux下将Apache(httpd)新增为系统服务及开机自启动
- Linux下将自己安装的Apache(httpd)新增为系统服务,开机自启动
- 将tomcat添加为linux系统服务 开机自启动
- 将apache添加为Linux系统自启动服务
- 将apache添加为Linux系统自启动服务
- linux下开机自启动及系统服务添加
- linux 下httpd服务开机启动
- Linux下Apache httpd安装及配置为服务
- Linux下Tomcat配置为系统服务,并开机自启动
- RedHat 将Apache添加为Linux的系统服务 实现自启动
- linux下添加tomcat为系统服务(开机自启)
- linux 下注册apache开机自启动
- Linux 新增开机启动服务
- linux下系统开机oracle自启动
- 在ubuntu下关闭apache服务的开机自启动
- windows将tomcat配置成系统服务开机自启动
- 将apache添加为开机启动与编译的httpd不支持chkconfig的解决方法
- dom操作val(),text(),html()
- CEdit的SetSel函数
- Linux:安装双系统(Win7+Ubuntu)后,Ubuntu正常,Win7无法启动,有需要的朋友可以参考下
- 【独立开发者er Cocos2d-x实战 008】BMFont生成位图字体工具和Cocos2dx使用加载fnt文件
- Merge Two Sorted Lists
- Linux下将Apache(httpd)新增为系统服务及开机自启动
- 如何使电脑彻底崩溃!!!!(不要干坏事哦)
- 简单的.NET三层框架的实现(学生作业管理系统)
- JS模块化编程
- Reverse Nodes in k-Group
- 哈工大操作系统实验3—进程管理
- 黑马程序员----集合框架工具类,几个新特性
- 硬币存钱
- 排列算法