先前安装的nginx运行php用来采集新闻, 发现php-fpm老是堵死. 无奈不用nginx了 php文件全部转发到apache运行.
apache安装比较简单
yum install httpd httpd-devel
因为静态html文件还是以nginx运行,占用了80端口 那么apache则改用8001
防火墙增加8001端口的访问:
/sbin/iptables -I INPUT -p tcp --dport 8001 -j ACCEPT
/etc/rc.d/init.d/iptables save
/etc/init.d/iptables restart
启动apache时报错 说什么端口拒绝访问. 于是添加网上搜来用
semanage port -a -t http_port_t -p tcp 8001
该命令又报错
-bash: semanage: command not found
应该是semnage没有安装, 搜索到这个的安装命令
yums -y install policycoreutils-python
安装后再启动apache 成功!