From ca20cad49129ab22ce37a3525f59ac0f54c31f8a Mon Sep 17 00:00:00 2001 From: root Date: Wed, 19 Apr 2017 16:53:50 +0200 Subject: [PATCH] init --- .gitignore | 3 +++ conf_nginx | 27 +++++++++++++++++++++++++++ download_nginx | 41 +++++++++++++++++++++++++++++++++++++++++ install_req | 1 + 4 files changed, 72 insertions(+) create mode 100644 .gitignore create mode 100755 conf_nginx create mode 100755 download_nginx create mode 100644 install_req diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a96e865 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +*~ +nginx-* +requirements/ diff --git a/conf_nginx b/conf_nginx new file mode 100755 index 0000000..1d9c9b6 --- /dev/null +++ b/conf_nginx @@ -0,0 +1,27 @@ +#!/bin/bash +./configure \ + --prefix=/usr/local/nginx/ \ + --sbin-path=/usr/local/sbin \ + --pid-path=/run/nginx.pid \ + --with-http_ssl_module \ + --with-pcre=../requirements/pcre \ + --with-zlib=../requirements/zlib \ + --with-openssl=../requirements/openssl \ + --with-stream \ + --with-http_ssl_module \ + --with-stream_ssl_module \ + --add-module=../requirements/nginx-auth-ldap \ + --add-module=../requirements/headers-more-nginx-module \ + --with-http_image_filter_module \ + --with-http_realip_module \ + --with-http_v2_module \ + --with-http_sub_module \ + --with-mail \ + --with-http_gzip_static_module \ + + + + +#--with-http_auth_request_module \ +# --add-module=../ngx_form_auth \ +# --conf-path=/etc/nginx/nginx.conf \ diff --git a/download_nginx b/download_nginx new file mode 100755 index 0000000..7d37afa --- /dev/null +++ b/download_nginx @@ -0,0 +1,41 @@ +#!/bin/bash +PCRE_VERSION="8.40" +ZLIB_VERSION="1.2.11" +OPENSSL_VERSION="1.0.2f" +NGINX_VERSION="1.10.3" +mkdir requirements +cd requirements +mkdir pcre +wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-$PCRE_VERSION.tar.gz +tar -zxf pcre-$PCRE_VERSION.tar.gz -C pcre --strip-components=1 +rm pcre-$PCRE_VERSION.tar.gz +cd pcre +./configure +make +make install +cd .. +mkdir zlib +wget http://zlib.net/zlib-$ZLIB_VERSION.tar.gz +tar -zxf zlib-$ZLIB_VERSION.tar.gz -C zlib --strip-components=1 +rm zlib-$ZLIB_VERSION.tar.gz +cd zlib +./configure +make +make install +cd .. +mkdir openssl +wget http://www.openssl.org/source/openssl-$OPENSSL_VERSION.tar.gz +tar -zxf openssl-$OPENSSL_VERSION.tar.gz -C openssl --strip-components=1 +rm openssl-$OPENSSL_VERSION.tar.gz +cd openssl +./configure darwin64-x86_64-cc --prefix=/usr +make +make install +cd .. +git clone https://github.com/kvspb/nginx-auth-ldap.git +git clone https://github.com/openresty/headers-more-nginx-module.git +cd .. +wget http://nginx.org/download/nginx-$NGINX_VERSION.tar.gz +tar -zxf nginx-$NGINX_VERSION.tar.gz +rm nginx-$NGINX_VERSION.tar.gz +ln conf_nginx nginx-$NGINX_VERSION/ diff --git a/install_req b/install_req new file mode 100644 index 0000000..128d355 --- /dev/null +++ b/install_req @@ -0,0 +1 @@ +apt-get install build-essential gcc libgd-dev libldap2-dev \ No newline at end of file