February 2020
Intermediate to advanced
666 pages
15h 45m
English
Now, let's look at what can happen if you have web content files that are set with the wrong SELinux type. First, we'll install, enable, and start the Apache web server on our CentOS virtual machines. (Note that including the --now option allows us to enable and start a daemon all in one single step.) Do the following on CentOS 7:
sudo yum install httpdsudo systemctl enable --now httpd
On CentOS 8, use the following command:
sudo dnf install httpdsudo systemctl enable --now httpd
If you haven't done so already, you'll want to configure the firewall to allow access to the web server:
[donnie@localhost ~]$ sudo firewall-cmd --permanent --add-service=httpsuccess[donnie@localhost ~]$ sudo firewall-cmd ...