宇宙主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

欧基零壹微头条IP归属甄别会员请立即修改密码
楼主: gouwaming

重启SSH 时候出现httpd: unrecognized service 怎么办?

[复制链接]
发表于 2009-9-28 21:55:17 | 显示全部楼层
我是菜鸟啦。
httpd.conf.rpmsave 这个是临时文件么?

/httpd.conf 已存為 /httpd.conf.rpmsave

/httpd.conf 还在吧?
 楼主| 发表于 2009-9-28 21:56:37 | 显示全部楼层
在线等高手,我这个是什么问题?
发表于 2009-9-28 21:59:48 | 显示全部楼层
你的httpd。conf 设置错误,你恢复一下看看
 楼主| 发表于 2009-9-28 22:15:49 | 显示全部楼层
怎么恢复?
我把原来的(没修改过的)  还是重启出现那个错误
 楼主| 发表于 2009-9-28 22:16:26 | 显示全部楼层
要是那个文件出问题了会不会影响到我现有的网站运行?
发表于 2009-9-28 22:21:36 | 显示全部楼层
try:
1.chmod  +x /etc/init.d/httpd
2.chkconfig --add httpd

reboot
只是不能自动启  apache没有问题
 楼主| 发表于 2009-9-28 22:27:32 | 显示全部楼层
MaYi 大哥的话好深奥  我一句都听不懂
try:
1.chmod  +x /etc/init.d/httpd
2.chkconfig --add httpd
这个是什么意思?
发表于 2009-9-28 22:34:27 | 显示全部楼层
1.chmod  +x /etc/init.d/httpd
添加可执行
2.chkconfig --add httpd
设置为自动启动项
ssh里运行。就行了。
 楼主| 发表于 2009-9-28 22:41:05 | 显示全部楼层
运行了 出现以下情况算正常吗?
[root@sejiemei ~]# chmod  +x /etc/init.d/httpd
chmod: cannot access `/etc/init.d/httpd': No such file or directory
[root@sejiemei ~]# chkconfig --add httpd
error reading information on service httpd: No such file or directory
[root@sejiemei ~]#
发表于 2009-9-28 22:52:43 | 显示全部楼层

回复 19# 的帖子

明显不正常  
假设你apache 安装在 /usr/local/apache2;
测试apache 安装是否成功
/usr/local/apache2/bin/apachectl start;
如果成功:

cp /usr/local/apache2/bin/apachectl /etc/rc.d/init.d/httpd

然后:
vi /etc/init.d/httpd 加入
# chkconfig: 2345 50 90

# description: Activates/Deactivates Apache Web Server

继续:
1.chmod  +x /etc/init.d/httpd
2.chkconfig --add httpd

测试是否OK :
service httpd start
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|兜哪儿主机交流论坛

GMT+8, 2024-9-20 21:22 , Processed in 0.058693 second(s), 7 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表