Under CentOS using yum install Apache is very easy, just type the following command in the terminal can be
1. Install Apache
yum install httpd
2. Set the Apache server at startup
systemctl enable httpd.service
To verify that the automatic startup type the following command in a terminal after restarting the server detects whether Apache has started
systemctl is-enabled httpd.service
If you see enable
such a response, it means that Apache has been launched successfully
3. Manually start Apache
systemctl start httpd.service 在浏览器中输入IP地址即可验证是否启动成功
4. The manual restart Apache
systemctl restart httpd.service
The manual stop Apache
systemctl stop httpd.service
6. Install the catalog description
- Apache default root directory of the site pointing to / var / www / html
- The default main configuration file /etc/httpd/conf/httpd.conf
- Configuration is stored in the directory /etc/httpd/conf.d/