mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-11-19 18:54:23 +03:00
Revert 6aa075097f691c6b622383aea28339269164cc03...1b5dcc89f930b67038c28bce3d7d29764bdc8351 on Compilation recipes
@@ -59,84 +59,29 @@ Provided by @csanders-git
|
|||||||
### libModSecurity
|
### libModSecurity
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
yum install -y wget perl cmake
|
yum install gcc-c++ flex bison curl-devel curl libxml2-devel doxygen zlib-devel git automake libtool pcre-devel
|
||||||
# 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/
|
cd /opt/
|
||||||
#Install bison
|
# Steal Fedora's YAJL and YAJL-devel packages
|
||||||
wget http://ftp.gnu.org/gnu/bison/bison-3.0.4.tar.gz
|
wget ftp://195.220.108.108/linux/fedora/linux/releases/23/Everything/x86_64/os/Packages/y/yajl-2.1.0-4.fc23.x86_64.rpm
|
||||||
tar -xvzf bison-3.0.4.tar.gz
|
rpm -i yajl-2.1.0-4.fc23.x86_64.rpm
|
||||||
cd bison-3.0.4
|
wget ftp://195.220.108.108/linux/fedora/linux/releases/23/Everything/x86_64/os/Packages/y/yajl-devel-2.1.0-4.fc23.x86_64.rpm
|
||||||
./configure
|
rpm -i yajl-devel-2.1.0-4.fc23.x86_64.rpm
|
||||||
make
|
# Install latest bison
|
||||||
make install
|
yum install ftp://195.220.108.108/linux/fedora/linux/updates/23/x86_64/b/bison-3.0.4-3.fc23.x86_64.rpm
|
||||||
cd /opt/
|
# Amazon's GeoIP-devel package does not come with geoip.pc (no idea why not)
|
||||||
# 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/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-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
|
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-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
|
rpm -i GeoIP-devel-1.6.6-1.fc23.x86_64.rpm
|
||||||
yum install -y libxml2-devel doxygen zlib-devel git flex
|
rm -rf *.rpm
|
||||||
git clone https://github.com/csanders-git/ModSecurity
|
git clone https://github.com/SpiderLabs/ModSecurity
|
||||||
cd ModSecurity
|
cd ModSecurity
|
||||||
git checkout libmodsecurity
|
git checkout libmodsecurity
|
||||||
sh build.sh
|
sh build.sh
|
||||||
git submodule init
|
git submodule init
|
||||||
git submodule update
|
git submodule update
|
||||||
./configure --with-yajl=/opt/lloyd-yajl-66cb08c/build/yajl-2.1.0/ --with-curl=/opt/curl/
|
./configure
|
||||||
make
|
make
|
||||||
make install
|
make install
|
||||||
```
|
```
|
||||||
@@ -188,52 +133,3 @@ $ 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
|
|
||||||
cd /opt/
|
|
||||||
yum update
|
|
||||||
yum install curl-devel curl libxml2-devel doxygen zlib-devel gi pcre-devel yajl-devel wget
|
|
||||||
# Install updates to get to bison 3
|
|
||||||
wget http://ftp.gnu.org/gnu/bison/bison-3.0.4.tar.gz
|
|
||||||
tar -xvzf bison-3.0.4
|
|
||||||
cd bison-3.0.4
|
|
||||||
./configure
|
|
||||||
make
|
|
||||||
make install
|
|
||||||
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
|
|
||||||
$ git clone https://github.com/SpiderLabs/ModSecurity
|
|
||||||
$ cd ModSecurity
|
|
||||||
$ git checkout libmodsecurity
|
|
||||||
$ sh build.sh
|
|
||||||
$ git submodule init
|
|
||||||
$ git submodule update
|
|
||||||
$ ./configure
|
|
||||||
$ 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