forked from jx-sec/jxwaf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install_waf.sh
30 lines (28 loc) · 1.02 KB
/
install_waf.sh
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
#!/bin/bash
yum install -y epel-release pcre-devel openssl-devel gcc cmake make g++ curl lua-devel gcc-c++ automake
tar zxvf openresty-1.13.6.2.tar.gz
tar zxvf libmaxminddb-1.3.2.tar.gz
tar zxvf aliyun-log-c-sdk-lite.tar.gz
tar zxvf curl-7.64.1.tar.gz
cd curl-7.64.1
make
make install
cd ../openresty-1.13.6.2
./configure --prefix=/opt/jxwaf && gmake && gmake install
mv /opt/jxwaf/nginx/conf/nginx.conf /opt/jxwaf/nginx/conf/nginx.conf.bak
cp ../conf/nginx.conf /opt/jxwaf/nginx/conf/
cp ../conf/full_chain.pem /opt/jxwaf/nginx/conf/
cp ../conf/private.key /opt/jxwaf/nginx/conf/
mkdir /opt/jxwaf/nginx/conf/jxwaf
cp ../conf/jxwaf_config.json /opt/jxwaf/nginx/conf/jxwaf/
cp ../conf/GeoLite2-Country.mmdb /opt/jxwaf/nginx/conf/jxwaf/
cp -r ../lib/resty/jxwaf /opt/jxwaf/lualib/resty/
cd ../libmaxminddb-1.3.2
./configure
make
cp src/.libs/libmaxminddb.so.0.0.7 /opt/jxwaf/lualib/libmaxminddb.so
cd ../aliyun-log-c-sdk-lite
cmake .
make
cp build/lib/liblog_c_sdk.so.2.0.0 /opt/jxwaf/lualib/liblog_c_sdk.so
/opt/jxwaf/nginx/sbin/nginx -t