How to Install Mod_Security on CentOS Server

May 18, 2011 / How-to Guide

For those who might not be aware, Mod_Security is an application firewall which helps in protecting the server from various sorts of script exploits that can be found in web applications. With it, server admins can harden the security of the server, adding an enhanced protective layer to the network firewall.

How to Install ModSecurity on CentOS Dedicated Server?

Step i: You must fire the below command to add the ModSecurity repository manually.

cd /etc/yum.repos.d

Step ii: Proceed further with creating a file called “utter ramblings. repo”

touch utter ramblings. repo

Step iii: You must now make amendments to this file with “vi” or “nano” including the below-stated information :


name=Jason’s Utter Ramblings Repo





Step iv: Then, run the below command for installing the packages onto your server :

yum install mod_security

This enables you with a functioning version of mod_security installed and can be readily used over your Apache web server.

Step v: Configure mod_security according to your requirements.

The benefit of compiling mod_security in a yum repository is that it would get updated automatically with the other updates of yum.

For any help and assistance, please contact our 24×7 Helpdesk either via. Live Chat or by sending an email to support[@]eukhost. com.

Spread the love