centos安装apache简要过程及问题

来源:互联网 发布:c语言size_t 编辑:程序博客网 时间:2024/06/02 03:09

yum search httpd 看看具体名字

yum install ***

装好后

/etc/rc.d/init.d/httpd
apache的启动脚本
service httpd start
启动apache服务器的命令
service httpd stop
停止apache服务器的命令
service httpd status
查询apache服务器状态的命令
service httpd restart
重新启动apache服务器的命令
netstat -an | grep :80 查看80端口,apache默认端口

服务及端口都开启,网页仍不能访问,原因可能是防火墙:

1) 重启后永久性生效:
开启:chkconfig iptables on
关闭:chkconfig iptables off
(2) 即时生效,重启后失效:
开启:service iptables start
关闭:service iptables stop

附一篇详细关于防火墙的文章http://my.oschina.net/u/217959/blog/38051





0 0
原创粉丝点击