为了后期能加载php扩展。建议先关闭selinux.
临时关闭:setenforce 0
永久关闭:
修改/etc/selinux/config 文件
将SELINUX=enforcing改为SELINUX=disabled
yum –y install httpd httpd-devel
chkconfig httpd on #设置apache服务开机启动
etc/init.d/httpd start #启动apache服务
添加防火墙例外80端口(更改防火墙配置后一般需要/etc/init.d/iptables restart 重启生效)后访问80端口测试:
接下来安装mysql和php.
mysql参考:mysql安装教程
php安装参考:php安装教程