Unable to yum install mod_security – No package mod_security available [Solved]

Question: I was trying to install mod_security for Apache web server via yum. I googled and found the below command to install mod_security.

# yum install mod_security

Unfortunately, the above command did not work and ended up with the below message.

# yum install mod_security
 No package mod_security available.
 Error: Nothing to do

Please help me to fix this issue

– Atul

Solution:

It means, yum is not able to contact the right repository that contains mod_security package. In order to install mod_security, you should configure yum with EPEL repo.

yum install epel repo

On CentOS/RHEL version 6.*:

rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm

On CentOS/RHEL version 5.*:

# rpm -Uvh http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm

Once the repo is installed successfully, try yum install as below:

[root@tifac-wh ~]# yum install mod_security Loaded plugins: fastestmirror, security
Setting up Install Process
Loading mirror speeds from cached hostfile
epel/metalink | 3.3 kB 00:00
 * base: centos.excellmedia.net
 * epel: epel.mirror.net.in
 * extras: centos.excellmedia.net
 * updates: centos.excellmedia.net
epel | 4.3 kB 00:00
epel/primary_db | 5.7 MB 00:00
Resolving Dependencies
--> Running transaction check
---> Package mod_security.x86_64 0:2.7.3-3.el6 will be installed

From the above output, you can see yum making use of EPEL repo to find the mod_security package.

Do you want us to fix your Linux errors? Just ask us via Contact Us page.

Topics :

vps germany

Get Free Email Updates

Disclaimer: The content published in this article is the views of the author only. Techglimpse does not gurantee accuracy, completness or validity. If you believe the content on this post violates your copyright, please send us a mail for removal. Read more.