modify install-nginx.sh

This commit is contained in:
aborn 2014-03-02 09:13:47 +08:00
parent 11ae619f9d
commit 99fbd8b98d
3 changed files with 35 additions and 55 deletions

View File

@ -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

View File

@ -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

View File

@ -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
echo