Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |
Tags
- Oracle Express Edition
- Oracle 윈도우 설치
- Oracle 사용자명 입력
- ora-01722
- oracle 18c
- 오라클 캐릭터셋 조회
- 오라클 캐릭터셋 확인
- Oracle 초기 사용자
- Oracle 18c HR
- ORA-00922
- Oracle 테이블 대소문자
- Oracle 18c HR schema
- 비전공자를 위한 데이터베이스 입문
- Orace 18c
- 오라클 캐릭터셋 변경
- oracle
- 무료 오라클 데이터베이스
- 서평단
- 윈도우 Oracle
- Oracle 테이블 띄어쓰기
- 무료 오라클 설치
- ORA-12899
- Oracle 18c 설치
- Oracle 사용자명
Archives
- Today
- Total
Nirsa's Learning Lab
[Bash Shell Script] CentOS 7 Mod_Security2 설치 및 Mod_audit 로깅 설정 쉘 스크립트 본문
Programming/Bash Shell Script
[Bash Shell Script] CentOS 7 Mod_Security2 설치 및 Mod_audit 로깅 설정 쉘 스크립트
Nirsa 2020. 5. 25. 16:05반응형
-
CentOS 7 Mod_Security2 설치 및 Mod_audit 로깅 설정 쉘 스크립트
root 계정으로 실행 및 Apache는 기존에 설치되어있는 환경 이어야 합니다.
#!/bin/bash
yum -y install gcc gcc-c++ httpd-devel &&
cd /root &&
wget https://ftp.pcre.org/pub/pcre/pcre-8.43.tar.gz &&
tar xvfz /root/pcre-8.43.tar.gz &&
cd /root/pcre-8.43 &&
./configure --prefix=/usr/local/pcre &&
make &&
make install &&
cd /usr/local/src &&
wget ftp://xmlsoft.org/libxml2/libxml2-2.7.7.tar.gz &&
tar xvzf /usr/local/src/libxml2-2.7.7.tar.gz &&
cd /usr/local/src/libxml2-2.7.7 &&
./configure --prefix=/usr/local/xml &&
make && make install &&
cd /root &&
wget https://www.modsecurity.org/tarball/2.9.1/modsecurity-2.9.1.tar.gz &&
tar -zxvf /root/modsecurity-2.9.1.tar.gz &&
cd /root/modsecurity-2.9.1 &&
./configure \
--with-apr=/usr/bin/apr-1-config \
--with-apu=/usr/bin/apu-1-config
make && make install
perl -p -i -e '$.==57 and print "LoadModule security2_module modules/mod_security2.so\n"' /etc/httpd/conf/httpd.conf
cat <<EOF > /etc/httpd/conf.d/mod_security.conf
<IfModule mod_security2.c>
SecRuleEngine DetectionOnly
SecAuditEngine On
SecAuditLog /var/log/httpd/modsec_audit.log
SecAuditLogType Serial
SecRequestBodyAccess on
SecAuditLogParts ABIJDFHZ
</IfModule>
EOF
반응형
'Programming > Bash Shell Script' 카테고리의 다른 글
[Bash Shell Script] 쉘 스크립트 일부 문자열 비교하기 (0) | 2020.06.01 |
---|---|
[Bash Shell Script] zabbix-agent 자동 설치 쉘 스크립트 (0) | 2020.05.28 |
[Bash Shell Script] CentOS 7 Kubernetes 자동 설치 쉘 스크립트(mater node version) (3) | 2020.02.24 |
[Bash Shell Script] 쉘 스크립트 랜덤 문자열, 난수 생성(랜덤 숫자) (2) | 2020.02.10 |
[Bash Shell Script] 쉘 스크립트 if조건문 라인에서의 "[: too many arguments" 에러 발생 (0) | 2019.12.17 |