mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-11-18 18:30:35 +03:00
Updated Compilation recipes (markdown)
@@ -133,3 +133,105 @@ $ wget https://openresty.org/download/ngx_openresty-1.9.7.1.tar.gz
|
|||||||
$ tar -xvzf ngx_openresty-1.9.7.1.tar.gz
|
$ tar -xvzf ngx_openresty-1.9.7.1.tar.gz
|
||||||
$ ./configure --add-module=/opt/ModSecurity-nginx
|
$ ./configure --add-module=/opt/ModSecurity-nginx
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## CentOS 6.5 Minimal
|
||||||
|
|
||||||
|
Provided by @csanders-git
|
||||||
|
|
||||||
|
### libModSecurity
|
||||||
|
|
||||||
|
```sh
|
||||||
|
yum install -y wget perl cmake
|
||||||
|
# Add a newer version of GCC that can make c++-11
|
||||||
|
wget http://people.centos.org/tru/devtools-2/devtools-2.repo -O /etc/yum.repos.d/devtools-2.repo
|
||||||
|
yum install -y devtoolset-2-gcc-c++ devtoolset-2-binutils
|
||||||
|
PATH=/opt/rh/devtoolset-2/root/usr/bin:$PATH
|
||||||
|
cd /opt/
|
||||||
|
#Install bison
|
||||||
|
wget http://ftp.gnu.org/gnu/bison/bison-3.0.4.tar.gz
|
||||||
|
tar -xvzf bison-3.0.4.tar.gz
|
||||||
|
cd bison-3.0.4
|
||||||
|
./configure
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
cd /opt/
|
||||||
|
# Install autoconf
|
||||||
|
wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz
|
||||||
|
tar -xvzf autoconf-2.69.tar.gz
|
||||||
|
cd autoconf-2.69
|
||||||
|
./configure
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
cd /opt
|
||||||
|
# Install libtool
|
||||||
|
wget http://ftp.gnu.org/gnu/libtool/libtool-2.4.5.tar.gz
|
||||||
|
tar -xvzf libtool-2.4.5.tar.gz
|
||||||
|
cd libtool-2.4.5
|
||||||
|
./configure
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
cd /opt
|
||||||
|
# Install automake
|
||||||
|
wget http://ftp.gnu.org/gnu/automake/automake-1.15.tar.gz
|
||||||
|
tar -xvzf automake-1.15.tar.gz
|
||||||
|
cd automake-1.15
|
||||||
|
./configure
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
cd /opt
|
||||||
|
# Insteall PCRE-devel
|
||||||
|
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.38.tar.gz
|
||||||
|
tar -xvzf pcre-8.38.tar.gz
|
||||||
|
cd pcre-8.38
|
||||||
|
./configure
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
cd /opt/
|
||||||
|
# Install YAJL2
|
||||||
|
wget http://github.com/lloyd/yajl/tarball/2.1.0 -O yajl-2.1.0.tar.gz
|
||||||
|
tar -xvzf yajl-2.1.0.tar.gz
|
||||||
|
cd lloyd-yajl-66cb08c
|
||||||
|
./configure
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
cd /opt
|
||||||
|
# Install Curl
|
||||||
|
wget http://curl.haxx.se/download/curl-7.46.0.tar.gz
|
||||||
|
tar -xvzf curl-7.46.0.tar.gz
|
||||||
|
cd curl-7.46.0
|
||||||
|
./configure --prefix=/opt/curl
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
# Little hack because make doesn't respect --with-curl currently
|
||||||
|
cp -R /opt/curl/include/curl/ /usr/include/
|
||||||
|
cd /opt/
|
||||||
|
# Install GeoIP
|
||||||
|
wget ftp://rpmfind.net/linux/centos/5.11/extras/x86_64/RPMS/GeoIP-data-20090201-1.el5.centos.x86_64.rpm
|
||||||
|
wget ftp://rpmfind.net/linux/fedora/linux/releases/23/Everything/x86_64/os/Packages/g/GeoIP-1.6.6-1.fc23.x86_64.rpm
|
||||||
|
wget ftp://rpmfind.net/linux/fedora/linux/releases/23/Everything/x86_64/os/Packages/g/GeoIP-devel-1.6.6-1.fc23.x86_64.rpm
|
||||||
|
rpm -i GeoIP-1.6.6-1.fc23.x86_64.rpm GeoIP-data-20090201-1.el5.centos.x86_64.rpm
|
||||||
|
rpm -i GeoIP-devel-1.6.6-1.fc23.x86_64.rpm
|
||||||
|
yum install -y libxml2-devel doxygen zlib-devel git flex
|
||||||
|
git clone https://github.com/csanders-git/ModSecurity
|
||||||
|
cd ModSecurity
|
||||||
|
git checkout libmodsecurity
|
||||||
|
sh build.sh
|
||||||
|
git submodule init
|
||||||
|
git submodule update
|
||||||
|
./configure --with-yajl=/opt/lloyd-yajl-66cb08c/build/yajl-2.1.0/ --with-curl=/opt/curl/
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
```
|
||||||
|
|
||||||
|
### nginx-connector (openresty)
|
||||||
|
|
||||||
|
```sh
|
||||||
|
$ cd /opt/
|
||||||
|
$ git clone https://github.com/SpiderLabs/ModSecurity-nginx
|
||||||
|
$ cd /opt/Modsecurity-nginx
|
||||||
|
$ git checkout experimental
|
||||||
|
$ cd /opt/
|
||||||
|
$ wget https://openresty.org/download/ngx_openresty-1.9.7.1.tar.gz
|
||||||
|
$ tar -xvzf ngx_openresty-1.9.7.1.tar.gz
|
||||||
|
$ ./configure --add-module=/opt/ModSecurity-nginx
|
||||||
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user