How to update apache to latest version on CentOS 7 server?

How to update apache to latest version on CentOS 7 server?

Today, we will going to update apache server on Centos server to the latest version. By default CentOS 7 provide some predefined repositries but they are lots of packages which are not up to date.

Now, first of all we have find out the current version on our server. We can check it through this command:
# yum info httpd
or
# httpd -v
Result:

[root@hoststud ~]# httpd -v
Server version: Apache/2.4.16 (Unix)
Server built: Dec 21 2015 19:19:41
Cpanel::Easy::Apache v3.32.6 rev9999 +cloudlinux
Note: We will recommend you to take backup of your files before procedding to overcome any issue further.

You can get all repo at Centos.org website : http://mirror.centos.org/centos/7/
Now, before setting up the repositry you have to install EPEL.

# yum install -y epel-release
Now to enable the centOS repositry
# cd /etc/yum.repos.d && wget http://mirror.centos.org/centos/7/os/x86_64/repodata/repomd.xml`rpm -q --qf "%{VERSION}" $(rpm -q --whatprovides redhat-release)`.repo
You have to install the latest apache package
# yum install httpd
Once installation is done you have to start apache
# service httpd start
or
# systemctl start httpd
Author
bhawanisingh
Views
16,870
First release
Last update
Rating
0.00 star(s) 0 ratings
Top