美文网首页
wdcp升级nginx脚本

wdcp升级nginx脚本

作者: Sirius之剣 | 来源:发表于2019-04-26 13:42 被阅读0次
    
    #!/bin/bash
    # nginx update scripts
    # url http://www.wdlinux.cn
    # author wdlinux
    if [ ! $1 ];then
        ver="1.16.0"
    else
        ver=$1
    fi
    cd /tmp
    wget http://down.wdlinux.cn/in/pcre_ins.sh
    sh pcre_ins.sh
    wget -c http://nginx.org/download/nginx-$ver.tar.gz
    [ $? != 0 ] && echo "down err" && exit
    tar zxvf nginx-$ver.tar.gz
    cd nginx-$ver
    ./configure --user=www --group=www --prefix=/www/wdlinux/nginx-$ver --with-http_stub_status_module --with-http_ssl_module
    [ $? != 0 ] && echo "configure err" && exit
    make
    [ $? != 0 ] && echo "make err" && exit
    make install
    [ $? != 0 ] && echo "make install err" && exit
    mv /www/wdlinux/nginx-$ver/conf/nginx.conf /www/wdlinux/nginx-$ver/conf/nginx.conf.default
    cp -pR /www/wdlinux/nginx/conf/* /www/wdlinux/nginx-$ver/conf/
    service nginxd stop
    rm -f /www/wdlinux/nginx
    ln -sf /www/wdlinux/nginx-$ver /www/wdlinux/nginx
    sed -i '/limit_zone/d' /www/wdlinux/nginx/conf/nginx.conf
    service nginxd start
    echo
    echo
    echo "Nginx Update Is OK"
    echo "Current Ver Is:$ver"
    echo
    
    

    相关文章

      网友评论

          本文标题:wdcp升级nginx脚本

          本文链接:https://www.haomeiwen.com/subject/ocvfnqtx.html