Installing Apache
As usual, installing Apache on your system is just a matter of installing the proper package from your package manager. On a CentOS system, you can obtain Apache by installing the httpd
package, and on Debian systems with the apache2
package (yum install httpd
or apt-get install apache2 respectively
, as root). Once you install the package, Apache's daemon is now present with a default set of configuration files. You will be able to confirm the existence of the daemon on your system with systemctl
, though the name of the daemon is different depending on your distribution.
Use the following command on Debian:
# systemctl status apache2
Use the following command on CentOS:
# systemctl status httpd
By default, Debian starts and enables the daemon for you. As is typical, CentOS makes no assumptions and does neither. You can start and enable the daemon easily with the systemctl
command:
# systemctl enable httpd # systemctl start httpd
Once you install and enable Apache, you technically...