Installing apache (httpd) web server on Centos 7 using RPM

Published on January 5, 2022 at 9:06:32 PM GMT+8 by Administrator

Manual install apache web server on centos 7 using RPM

Installing apache (httpd) web server on Centos 7 using RPM

First of all, we need to update any package first by execute the following command

yum update

After update process is complete, we check if there is any apache (httpd) is available

yum list installed "httpd*"

The above command will instruct yum package manager to list all installed package that start with name "httpd".

If you want to remove any httpd package that currently installed, use the following command.

yum remove "httpd*"

Now we can proceed with installation of new apache (httpd) package, first of all we need to download the necessary package. There are usually 4 rpm files is required but we added here one more which is the ssl modules:

  • httpd-2.4.52-1.codeit.el7.x86_64.rpm
  • httpd-filesystem-2.4.52-1.codeit.el7.noarch.rpm
  • httpd-tools-2.4.52-1.codeit.el7.x86_64.rpm
  • mod_http2-2.0.2-1.codeit.x86_64.rpm
  • mod_ssl-2.4.52-1.codeit.el7.x86_64.rpm

Download the necessary rpm files at Code IT Guru repository listing.

Once all the files is ready, execute the following command to install. Replace the option as necessary for this one I'm updating my package which i use the 'U' command, for installing new package replace the 'U' with 'i'

rpm -Uvh httpd-filesystem-2.4.52-1.codeit.el7.noarch.rpm httpd-tools-2.4.52-1.codeit.el7.x86_64.rpm httpd-2.4.52-1.codeit.el7.x86_64.rpm mod_http2-2.0.2-1.codeit.x86_64.rpm mod_ssl-2.4.52-1.codeit.el7.x86_64.rpm

Once installed is finish, check the apache (httpd) version available

httpd -v

Thanks and best regards.