Install Apache HTTP Server

  1. Install the dependent packages for Apache HTTP server.

›_ Console

# dnf install apr apr-devel apr-util apr-util-devel expat pcre pcre-devel make gcc perl -y

  1. Download the Apache Open-Source Library files from Apache Website.

›_ Console

# wget https://dlcdn.apache.org/httpd/httpd-2.4.54.tar.gz

If you are installing through dnf install httpd command, then skip step 3 and 4.

  1. Extract the downloaded packages.

›_ Console

# tar -xzvf httpd-2.4.54.tar.gz

  1. Go to httpd-2.4.54 directory, build and install Apache HTTP using the following commands.

›_ Console

# cd httpd-2.4.54.tar.gz

#./configure --prefix=/usr/local/apache --enable-ssl --withssl=/usr/local/openssl

# make

# make install

  1. Start the Apache HTTP Service with below command. If you have installed from source code:

›_ Console

# /usr/bin/apache/bin/apachectl -k start

If you have installed from dnf:

›_ Console

# systemctl start httpd.service

  1. Open any browser and run the http://<apache_server_ip> to verify that apache service is running successfully.

tmpaytpx3hu.jpg

Apache web page