05 November, 2018

Installing Latest Apache in CentOS

Step 1 — Find out the Apache version in default repos

In order to check the current version of httpd package available in repositories – type the following command:

yum info httpd

Available Packages
Name        : httpd
Arch        : x86_64
Version     : 2.4.6
Release     : 45.el7.centos.4
Size        : 2.7 M
Repo        : updates/7/x86_64
Summary     : Apache HTTP Server
URL         : http://httpd.apache.org/
License     : ASL 2.0
Description : The Apache HTTP Server is a powerful, efficient, and extensible
            : web server.


As you can see from the output above, there is only 2.4.6 Apache version available in default repos.
Please note:
Centos uses Security Backporting Practice in order to apply most recent fixes to older versions of a software package, as a result it doesn’t mean that an older version provided by default repositories is vulnerable. But in my case I didn’t have a required update.
You can see a changelog using these commands :

sudo yum install yum-changelog
yum changelog httpd


Step 2 — Set up CodeIT repositories

There is a great custom repo created by these guys CodeIT It provides latest versions of web servers (Apache & Nginx).
Before setting up the CodeIT repository first of all you need to enable the EPEL. It satisfies some dependencies required by the CodeIT repo.
sudo yum install -y epel-release

cd /etc/yum.repos.d && wget https://repo.codeit.guru/codeit.el`rpm -q --qf "%{VERSION}" $(rpm -q --whatprovides redhat-release)`.repo
[root@crosp ~]# yum info httpd
Loaded plugins: changelog, fastestmirror
Loading mirror speeds from cached hostfile
 * base: centos.crazyfrogs.org
 * epel: mirror.23media.de
 * extras: mirrors.ircam.fr
 * updates: centos.mirror.fr.planethoster.net
Available Packages
Name        : httpd
Arch        : x86_64
Version     : 2.4.25
Release     : 3.el7.codeit
Size        : 1.4 M
Repo        : CodeIT/x86_64
Summary     : Apache HTTP Server
URL         : http://httpd.apache.org/
License     : ASL 2.0
Description : The Apache HTTP Server is a powerful, efficient, and extensible
            : web server.
yum install httpd

systemctl start httpd

systemctl enable httpd


No comments:

Post a Comment

Redirection in IIS

 This config will redirect every request to https://www.domain.com <configuration>     <system.webServer>         <rewrite>...