How to Install Apache on CentOS 7

1) First, clean-up yum: sudo yum clean all
2) As a matter of best practice we’ll update our packages: sudo yum -y update
3) Installing Apache is as simple as running just one command: sudo yum -y install httpd
4) And then start Apache: sudo systemctl start httpd
5) Be sure that Apache starts at boot: sudo systemctl enable httpd
6) To check the status of Apache: sudo systemctl status httpd
7) To stop Apache: sudo systemctl stop httpd