From 99fbd8b98d2a58c5abdf51cd9c95c859cc71e459 Mon Sep 17 00:00:00 2001 From: aborn Date: Sun, 2 Mar 2014 09:13:47 +0800 Subject: [PATCH] modify install-nginx.sh --- nginx/install-nginx.sh | 37 ------------------------------- nginx/install.sh | 49 ++++++++++++++++++++++++++++-------------- vagrant/postinstall.sh | 4 ++-- 3 files changed, 35 insertions(+), 55 deletions(-) delete mode 100755 nginx/install-nginx.sh diff --git a/nginx/install-nginx.sh b/nginx/install-nginx.sh deleted file mode 100755 index 233e653..0000000 --- a/nginx/install-nginx.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash -############################################################### -## NAME -## install.sh install nginx in server -## -## USAGE -## ./install.sh -############################################################### - - -## following is recommanded configure and modules. -## iUser="`whoami`" -iUser="vagrant" - -make clean - -./configure \ - --prefix=/home/${iUser}/nginx \ - --sbin-path=/home/${iUser}/nginx/sbin/nginx \ - --conf-path=/home/${iUser}/nginx/conf/nginx.conf \ - --pid-path=/home/${iUser}/nginx/pid/nginx.pid \ - --error-log-path=/home/${iUser}/nginx/log/error.log \ - --http-log-path=/home/${iUser}/nginx/log/access.log \ - --user=${iUser} --group=${iUser} \ - --with-http_ssl_module \ - --with-http_stub_status_module \ - --with-pcre=/home/${iUser}/sw/pcre-8.34 \ - --with-zlib=/home/${iUser}/sw/zlib-1.2.8 \ - --with-openssl=/home/${iUser}/sw/openssl-1.0.1c \ - --add-module=/vagrant_data/sw/memcached-1.4.17 - -## compile nginx form source code -make - -## install nginx -make install - diff --git a/nginx/install.sh b/nginx/install.sh index 15f0725..272e79b 100755 --- a/nginx/install.sh +++ b/nginx/install.sh @@ -1,31 +1,48 @@ #!/bin/bash ############################################################### -## NAME -## install.sh install nginx in server -## -## USAGE -## ./install.sh +# NAME +# install.sh install nginx in server +# +# USAGE +# ./install.sh +# +# AUTHOR +# Aborn Jiang (aborn.jiang@gmail.com) +# +# VERSION +# v0.1 2014-03-01 ############################################################### +## download the latest version 1.4.5 (2014-2-11) +## wget http://nginx.org/download/nginx-1.4.5.zip +## unzip nginx-1.4.5.zip + +## iUser="`whoami`" +iUser="vagrant" +INS_PATH="/home/${iUser}" +DPS_PATH="/vagrant_data/sw" # depend 3pp path + +make clean ## following is recommanded configure and modules. ./configure \ - --prefix=/home/aborn/nginx \ - --sbin-path=/home/aborn/nginx/sbin/nginx \ - --conf-path=/home/aborn/nginx/conf/nginx.conf \ - --pid-path=/home/aborn/nginx/pid/nginx.pid \ - --error-log-path=/home/aborn/nginx/log/error.log \ - --http-log-path=/home/aborn/nginx/log/access.log \ - --user=aborn --group=aborn \ + --prefix=${INS_PATH}/nginx \ + --sbin-path=${INS_PATH}/nginx/sbin/nginx \ + --conf-path=${INS_PATH}/nginx/conf/nginx.conf \ + --pid-path=${INS_PATH}/nginx/pid/nginx.pid \ + --error-log-path=${INS_PATH}/nginx/log/error.log \ + --http-log-path=${INS_PATH}/nginx/log/access.log \ + --user=${iUser} --group=${iUser} \ --with-http_ssl_module \ --with-http_stub_status_module \ - --with-pcre=/home/aborn/sw/pcre-8.34 \ - --with-zlib=/home/aborn/sw/zlib-1.2.8 \ - --with-openssl=/home/aborn/sw/openssl-1.0.1c + --with-pcre=${DPS_PATH}/pcre-8.34 \ + --with-zlib=${DPS_PATH}/zlib-1.2.8 \ + --with-openssl=${DPS_PATH}/openssl-1.0.1c \ + --add-module=${DPS_PATH}/memcached-1.4.17 ## compile nginx form source code make ## install nginx make install - + diff --git a/vagrant/postinstall.sh b/vagrant/postinstall.sh index a0d87a9..735e40f 100755 --- a/vagrant/postinstall.sh +++ b/vagrant/postinstall.sh @@ -22,7 +22,7 @@ echo "postinstall start." echo "install some necessary software." sudo apt-get install -y \ emacs zsh vim g++ build-essential \ - make git ghostscript autoconf + make git ghostscript autoconf unzip # install php5 # sudo apt-get install php5-common php5-cli php5-fpm @@ -31,4 +31,4 @@ sudo apt-get install -y \ echo "postinstall finished." echo "-----------------------------------" -echo \ No newline at end of file +echo