标签:www. case zlib rewrite bin ash org $? ##
#!/bin/bash
#auto zhangjia
#date 20171007
#安装SSL##############################################################3
SSL(){
URL=https://www.openssl.org/source/openssl-1.1.0f.tar.gz
TARFILE=openssl-1.1.0f.tar.gz
DIR=openssl-1.1.0f
wget -c $URL && tar -xzvf $TARFILE && cd $DIR && ./config
if [ $? -eq 0 ];then
make && make install
echo -e "\033[32mSSL install success...\033[0m"
else
echo -e "\033[32mSSL install failde,please check...\033[0m"
fi
}
#rewrite模块需要pcre库##################################################333333
pcre(){
URL=https://ftp.pcre.org/pub/pcre/pcre-8.38.tar.gz
TARFILE=pcre-8.38.tar.gz
DIR=pcre-8.38
wget -c $URL && tar -xzvf $TARFILE && cd $DIR && ./configure
if [ $? -eq 0 ];then
make && make install
echo -e "\033[32mpcre install success...\033[0m"
else
echo -e "\033[32mpcre install failde,please check...\033[0m"
fi
}
#################安装gzip模块###################
gzip(){
URL=http://www.zlib.net/zlib-1.2.11.tar.gz
TARFILE=zlib-1.2.11.tar.gz
DIR=zlib-1.2.11
wget -c $URL && tar -xzvf $TARFILE && cd $DIR && ./configure
if [ $? -eq 0 ];then
make && make install
echo -e "\033[32mpcre install success...\033[0m"
else
echo -e "\033[32mpcre install failde,please check...\033[0m"
fi
}
###############select选择##########################33
echo -e "\033[32mPlease select install mnue: \033[0m"
select i in "SSL" "pcre" "gzip"
do
case $i in
SSL)
SSL;;
pcre)
pcre;;
gzip)
gzip;;
esac
done
标签:www. case zlib rewrite bin ash org $? ##
原文地址:http://www.cnblogs.com/zhj5551/p/7634531.html