Mod_Security supplies an array of request filtering and other security features for Apache. Please follow the below steps to install mod_security in CentOS/RHEL. We are using yum because that is the easy way. We can do this within less than a minute.
Enable Atomic repo.
wget -q -O - http://www.atomicorp.com/installers/atomic | sh
Now let’s install ModSecurity
yum install mod_security
That’s it! It will set up and enable some default mod_security rules. More mod_security rules are available here: ModSecurity Core Rule Set
So that’s how you install mod_security in Linux.