nginx 安裝腳本

#!/bin/sh

yum install gcc c++ &&

cd /root/source

cat /etc/passwd | grep web

if [ $? -ne ]

then

useradd -M -s /sbin/nologin

fi


echo ####install prce ######

#wget https://sourceforge.net/projects/pcre/files/pcre/8.41/pcre-8.41.tar.gz/download &&

#tar -xf download

cd pcre-8.41

./configure && make && make install




echo #### install nginx #####

cd /root/source

wget http://nginx.org/download/nginx-1.8.1.tar.gz &&

tar -xf nginx-1.8.1.tar.gz && cd  ./nginx-1.8.1

./configure --prefix=/usr/local/nginx --user=web --group=web --with-http_stub_status_module --with-http_ssl_module &&

[ $? != 0 ] && err_exit "nginx configure err"

make

[ $? != 0 ] && err_exit "nginx make err"

make install

[ $? != 0 ] && err_exit "nginx make install err"

cd /lib

ln -s libpcre.so.0.0.1 libpcre.so.1

/usr/local/nginx/sbin/nginx


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章