Solved

How to install mod security on Centos

Posted on 2008-10-15
4
1,245 Views
Last Modified: 2012-05-05
Hi X-perts,

I have a new Centos server, which is all new for me (I have been using freebsd n the past). How can I install a security mod from

http://www.jasonlitka.com/media/EL4/x86_64/

I do not want to install and update the whole Yum Repository, but would rather to install only a single mod security now.

Please, tell me the exact list of commands how to do it (I have never used yum before). Should I first import the public key?

Please, help
0
Comment
Question by:andy7789
  • 2
4 Comments
 
LVL 9

Expert Comment

by:chingmd
ID: 22728313
run the following commands as root

You will need to enable the jasonlitka repository.  here is a howto to set that up.  
http://www.jasonlitka.com/yum-repository/

yum check-update
   only updates the the repository

then run

yum search mod_security
    should return a result

then run
yum install mod_security






0
 

Author Comment

by:andy7789
ID: 22728800
all works - all installed. Do you know where should I edit httpd.conf to include a reference to mod security?

The manual for mod security states:
===========================================
Edit the main Apache httpd config file (usually httpd.conf)
On UNIX (and Windows if you did not copy the DLLs as stated above) you must load libxml2
and lua5.1 before ModSecurity with something like this:

LoadFile /usr/lib/libxml2.so
LoadFile /usr/lib/liblua5.1.so

Load the ModSecurity module with:
LoadModule security2_module modules/mod_security2.so
=========================================

The problem is that I cannot find references as "LoadFile /usr/lib/liblua5.1.so" in the conf file. Where should I place it?
0
 
LVL 9

Accepted Solution

by:
chingmd earned 500 total points
ID: 22732225
You can add the LoadModule line with the others in the file.

The LoadFile line is may only be location specific for the module, so place it above the LoadModules section of the httpd.conf file.  

But in most cases, most of the options in httpd.conf are not location specific.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Article by: btan
Provide an easy one stop to quickly get the relevant information on common asked question on Ransomware in Expert Exchange.
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now