安装环境之前先放行端口
[root@localhost ~]# firewall-cmd --zone=public --add-port=80/tcp --permanent #添加80端口到防火墙
[root@localhost ~]# firewall-cmd --reload #重载防火墙配置
[root@localhost ~]# vim /etc/sysconfig/selinux #关闭selinux
SELINUX=enforcing改为disabled
安装apache
[root@localhost ~]# yum install -y httpd* #下载安装apache
[root@localhost ~]# systemctl start httpd.service #启动apache
[root@localhost ~]# systemctl enable httpd #加入开机启动项
浏览器打开IP,显示apache默认页。安装apache成功
转载请注明:IT运维空间 » apache » Centos7.x下安装apache
发表评论