①禁用SELinux
sudo sed -i 's/^SELINUX=enforcing$/SELINUX=permissive/g' /etc/selinux/config
该文件现在应该是这样的:
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=permissive
# SELINUXTYPE= can take one of three two values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are protected.
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=permissive
# SELINUXTYPE= can take one of three two values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are protected.
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
然后重启计算机。
sudo yum install deltarpm epel-release
sudo yum update
③#Install Apache with mod_ssl and mod_perl
sudo yum install httpd httpd-devel mod_ssl mod_ssl mod_perl mod_perl-devel
④开启httpd.service
sudo systemctl start httpd.service
⑤检查httpd.service状态
sudo systemctl status httpd.service
⑥永久开启httpd.service
sudo systemctl enable httpd.service
⑦开启防火墙端口,允许传入的连接端口80(HTTP)
sudo firewall-cmd --zone=public --add-port=80/tcp --permanent
# success
sudo firewall-cmd --reload
# success