CentOS에서 Apache서버에 mod_security설치하기
# yum install httpd-devel pcre-devel libxml2-devel
위의 패키지가 설치 되었는지 확인하고 설치가 되어 있지 않다면 설치한다.
미리 centOS에 맞는
lua-5.1.4-1.el5.x86_64.rpm과 rpm -Uvh mod_security-2.5.9-1.el5.x86_64.rpm을
다운 받아서 설치할 서버에 업로드한다.
# rpm -Uvh lua-5.1.4-1.el5.x86_64.rpm
# rpm -Uvh mod_security-2.5.9-1.el5.x86_64.rpm
lua-5.1.4-1.el5.x86_64.rpm과 rpm -Uvh mod_security-2.5.9-1.el5.x86_64.rpm을 설치한다
rpm을 설치할 경우 자동으로 /etc/httpd/conf.d에 mod_security.conf과 /etc/httpd/modsecurity.d가 생성된다.
별도의 옵션이 필요한 경우 위의 경로에서 상황에 맞게 각 파일을 수정하고,
특별하지 않은 경우는 바로 사용하면 된다.
이제 서버에 적용을 위해 apache서버를 재시작 한다.
# httpd -k restart
PHPinfo 등을 통해 mod_security,mod_unique_id 모듈이 정상적으로 있는지 확인하고 있다면 설치가 완료된 것이다.
