1. 의존라이브러리 설치
yum -y install gcc-c++ libxml2 libxml2-devel httpd-devel apr-devel apr-util pcre-devel
1-2 pcre / pcre-devel
./configure --prefix=/usr/local/pcre
make
make install
1-3 mod_unique_id.so
apache source file => /modules/metadata
apxs -cia mod_unique_id.c
2. modsecurity 설치
2-1 modsecurity
./configure --with-apxs=/usr/sbin/apxs --with-apr=/usr/bin/apr-1-config --with-apu=/usr/bin/apu-1-config --with-pcre=/usr/bin/
make
make install
2-2 httpd.conf
vi /etc/httpd/conf/httpd.conf
LoadModule unique_id_module /usr/lib/httpd/modules/mod_unique_id.so
LoadFile /usr/lib/libxml2.so
LoadModule security2_module modules/mod_security2.so
include conf.d/modsecurity/modsecurity.conf
2-3 modsecurity.conf 적용
/etc/httpd/conf/modsecurity.conf
2-4 apache restart