Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

How to install mod security on Centos

Posted on 2008-10-15
4
1,249 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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How do You Stop a DDoS Attack 7 47
AWS EC2 HTTP & HTTPS 2 44
Guest Wireless in a Business Environment 6 89
Apple.com Account Security Lockout - SCAM? 3 19
If you thought ransomware was bad, think again! Doxware has the potential to be even more damaging.
Many businesses neglect disaster recovery and treat it as an after-thought. I can tell you first hand that data will be lost, hard drives die, servers will be hacked, and careless (or malicious) employees can ruin your data.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
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…

808 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