|
@@ -10,24 +10,24 @@
|
|
|
|
|
|
Upgrade_Nginx() {
|
|
Upgrade_Nginx() {
|
|
pushd ${oneinstack_dir}/src > /dev/null
|
|
pushd ${oneinstack_dir}/src > /dev/null
|
|
- [ ! -e "$nginx_install_dir/sbin/nginx" ] && echo "${CWARNING}Nginx is not installed on your system! ${CEND}" && exit 1
|
|
|
|
- OLD_nginx_ver_tmp=`$nginx_install_dir/sbin/nginx -v 2>&1`
|
|
|
|
|
|
+ [ ! -e "${nginx_install_dir}/sbin/nginx" ] && echo "${CWARNING}Nginx is not installed on your system! ${CEND}" && exit 1
|
|
|
|
+ OLD_nginx_ver_tmp=`${nginx_install_dir}/sbin/nginx -v 2>&1`
|
|
OLD_nginx_ver=${OLD_nginx_ver_tmp##*/}
|
|
OLD_nginx_ver=${OLD_nginx_ver_tmp##*/}
|
|
Latest_nginx_ver=`curl -s http://nginx.org/en/CHANGES-1.12 | awk '/Changes with nginx/{print$0}' | awk '{print $4}' | head -1`
|
|
Latest_nginx_ver=`curl -s http://nginx.org/en/CHANGES-1.12 | awk '/Changes with nginx/{print$0}' | awk '{print $4}' | head -1`
|
|
- [ -z "$Latest_nginx_ver" ] && Latest_nginx_ver=`curl -s http://nginx.org/en/CHANGES | awk '/Changes with nginx/{print$0}' | awk '{print $4}' | head -1`
|
|
|
|
|
|
+ [ -z "${Latest_nginx_ver}" ] && Latest_nginx_ver=`curl -s http://nginx.org/en/CHANGES | awk '/Changes with nginx/{print$0}' | awk '{print $4}' | head -1`
|
|
echo
|
|
echo
|
|
- echo "Current Nginx Version: ${CMSG}$OLD_nginx_ver${CEND}"
|
|
|
|
|
|
+ echo "Current Nginx Version: ${CMSG}${OLD_nginx_ver}${CEND}"
|
|
while :; do echo
|
|
while :; do echo
|
|
- read -p "Please input upgrade Nginx Version(default: $Latest_nginx_ver): " NEW_nginx_ver
|
|
|
|
- [ -z "$NEW_nginx_ver" ] && NEW_nginx_ver=$Latest_nginx_ver
|
|
|
|
- if [ "$NEW_nginx_ver" != "$OLD_nginx_ver" ]; then
|
|
|
|
- [ ! -e "nginx-$NEW_nginx_ver.tar.gz" ] && wget --no-check-certificate -c http://nginx.org/download/nginx-$NEW_nginx_ver.tar.gz > /dev/null 2>&1
|
|
|
|
- if [ -e "nginx-$NEW_nginx_ver.tar.gz" ]; then
|
|
|
|
- src_url=https://www.openssl.org/source/openssl-$openssl_ver.tar.gz && Download_src
|
|
|
|
- src_url=http://mirrors.linuxeye.com/oneinstack/src/pcre-$pcre_ver.tar.gz && Download_src
|
|
|
|
- tar xzf openssl-$openssl_ver.tar.gz
|
|
|
|
- tar xzf pcre-$pcre_ver.tar.gz
|
|
|
|
- echo "Download [${CMSG}nginx-$NEW_nginx_ver.tar.gz${CEND}] successfully! "
|
|
|
|
|
|
+ read -p "Please input upgrade Nginx Version(default: ${Latest_nginx_ver}): " NEW_nginx_ver
|
|
|
|
+ [ -z "${NEW_nginx_ver}" ] && NEW_nginx_ver=${Latest_nginx_ver}
|
|
|
|
+ if [ "${NEW_nginx_ver}" != "${OLD_nginx_ver}" ]; then
|
|
|
|
+ [ ! -e "nginx-${NEW_nginx_ver}.tar.gz" ] && wget --no-check-certificate -c http://nginx.org/download/nginx-${NEW_nginx_ver}.tar.gz > /dev/null 2>&1
|
|
|
|
+ if [ -e "nginx-${NEW_nginx_ver}.tar.gz" ]; then
|
|
|
|
+ src_url=https://www.openssl.org/source/openssl-${openssl_ver}.tar.gz && Download_src
|
|
|
|
+ src_url=http://mirrors.linuxeye.com/oneinstack/src/pcre-${pcre_ver}.tar.gz && Download_src
|
|
|
|
+ tar xzf openssl-${openssl_ver}.tar.gz
|
|
|
|
+ tar xzf pcre-${pcre_ver}.tar.gz
|
|
|
|
+ echo "Download [${CMSG}nginx-${NEW_nginx_ver}.tar.gz${CEND}] successfully! "
|
|
break
|
|
break
|
|
else
|
|
else
|
|
echo "${CWARNING}Nginx version does not exist! ${CEND}"
|
|
echo "${CWARNING}Nginx version does not exist! ${CEND}"
|
|
@@ -37,28 +37,28 @@ Upgrade_Nginx() {
|
|
fi
|
|
fi
|
|
done
|
|
done
|
|
|
|
|
|
- if [ -e "nginx-$NEW_nginx_ver.tar.gz" ]; then
|
|
|
|
- echo "[${CMSG}nginx-$NEW_nginx_ver.tar.gz${CEND}] found"
|
|
|
|
|
|
+ if [ -e "nginx-${NEW_nginx_ver}.tar.gz" ]; then
|
|
|
|
+ echo "[${CMSG}nginx-${NEW_nginx_ver}.tar.gz${CEND}] found"
|
|
echo "Press Ctrl+c to cancel or Press any key to continue..."
|
|
echo "Press Ctrl+c to cancel or Press any key to continue..."
|
|
char=`get_char`
|
|
char=`get_char`
|
|
- tar xzf nginx-$NEW_nginx_ver.tar.gz
|
|
|
|
- pushd nginx-$NEW_nginx_ver
|
|
|
|
|
|
+ tar xzf nginx-${NEW_nginx_ver}.tar.gz
|
|
|
|
+ pushd nginx-${NEW_nginx_ver}
|
|
make clean
|
|
make clean
|
|
sed -i 's@CFLAGS="$CFLAGS -g"@#CFLAGS="$CFLAGS -g"@' auto/cc/gcc # close debug
|
|
sed -i 's@CFLAGS="$CFLAGS -g"@#CFLAGS="$CFLAGS -g"@' auto/cc/gcc # close debug
|
|
- $nginx_install_dir/sbin/nginx -V &> $$
|
|
|
|
|
|
+ ${nginx_install_dir}/sbin/nginx -V &> $$
|
|
nginx_configure_arguments=`cat $$ | grep 'configure arguments:' | awk -F: '{print $2}'`
|
|
nginx_configure_arguments=`cat $$ | grep 'configure arguments:' | awk -F: '{print $2}'`
|
|
rm -rf $$
|
|
rm -rf $$
|
|
- ./configure $nginx_configure_arguments
|
|
|
|
|
|
+ ./configure ${nginx_configure_arguments}
|
|
make -j ${THREAD}
|
|
make -j ${THREAD}
|
|
if [ -f "objs/nginx" ]; then
|
|
if [ -f "objs/nginx" ]; then
|
|
- /bin/mv $nginx_install_dir/sbin/nginx{,`date +%m%d`}
|
|
|
|
- /bin/cp objs/nginx $nginx_install_dir/sbin/nginx
|
|
|
|
|
|
+ /bin/mv ${nginx_install_dir}/sbin/nginx{,`date +%m%d`}
|
|
|
|
+ /bin/cp objs/nginx ${nginx_install_dir}/sbin/nginx
|
|
kill -USR2 `cat /var/run/nginx.pid`
|
|
kill -USR2 `cat /var/run/nginx.pid`
|
|
sleep 1
|
|
sleep 1
|
|
kill -QUIT `cat /var/run/nginx.pid.oldbin`
|
|
kill -QUIT `cat /var/run/nginx.pid.oldbin`
|
|
popd > /dev/null
|
|
popd > /dev/null
|
|
- echo "You have ${CMSG}successfully${CEND} upgrade from ${CWARNING}$OLD_nginx_ver${CEND} to ${CWARNING}$NEW_nginx_ver${CEND}"
|
|
|
|
- rm -rf nginx-$NEW_nginx_ver
|
|
|
|
|
|
+ echo "You have ${CMSG}successfully${CEND} upgrade from ${CWARNING}${OLD_nginx_ver}${CEND} to ${CWARNING}${NEW_nginx_ver}${CEND}"
|
|
|
|
+ rm -rf nginx-${NEW_nginx_ver}
|
|
else
|
|
else
|
|
echo "${CFAILURE}Upgrade Nginx failed! ${CEND}"
|
|
echo "${CFAILURE}Upgrade Nginx failed! ${CEND}"
|
|
fi
|
|
fi
|
|
@@ -68,23 +68,23 @@ Upgrade_Nginx() {
|
|
|
|
|
|
Upgrade_Tengine() {
|
|
Upgrade_Tengine() {
|
|
pushd ${oneinstack_dir}/src > /dev/null
|
|
pushd ${oneinstack_dir}/src > /dev/null
|
|
- [ ! -e "$tengine_install_dir/sbin/nginx" ] && echo "${CWARNING}Tengine is not installed on your system! ${CEND}" && exit 1
|
|
|
|
- OLD_tengine_ver_tmp=`$tengine_install_dir/sbin/nginx -v 2>&1`
|
|
|
|
|
|
+ [ ! -e "${tengine_install_dir}/sbin/nginx" ] && echo "${CWARNING}Tengine is not installed on your system! ${CEND}" && exit 1
|
|
|
|
+ OLD_tengine_ver_tmp=`${tengine_install_dir}/sbin/nginx -v 2>&1`
|
|
OLD_tengine_ver="`echo ${OLD_tengine_ver_tmp#*/} | awk '{print $1}'`"
|
|
OLD_tengine_ver="`echo ${OLD_tengine_ver_tmp#*/} | awk '{print $1}'`"
|
|
Latest_tengine_ver=`curl -s http://tengine.taobao.org/changelog.html | grep -oE "[0-9]\.[0-9]\.[0-9]+" | head -1`
|
|
Latest_tengine_ver=`curl -s http://tengine.taobao.org/changelog.html | grep -oE "[0-9]\.[0-9]\.[0-9]+" | head -1`
|
|
echo
|
|
echo
|
|
- echo "Current Tengine Version: ${CMSG}$OLD_tengine_ver${CEND}"
|
|
|
|
|
|
+ echo "Current Tengine Version: ${CMSG}${OLD_tengine_ver}${CEND}"
|
|
while :; do echo
|
|
while :; do echo
|
|
- read -p "Please input upgrade Tengine Version(default: $Latest_tengine_ver): " NEW_tengine_ver
|
|
|
|
- [ -z "$NEW_tengine_ver" ] && NEW_tengine_ver=$Latest_tengine_ver
|
|
|
|
- if [ "$NEW_tengine_ver" != "$OLD_tengine_ver" ]; then
|
|
|
|
- [ ! -e "tengine-$NEW_tengine_ver.tar.gz" ] && wget --no-check-certificate -c http://tengine.taobao.org/download/tengine-$NEW_tengine_ver.tar.gz > /dev/null 2>&1
|
|
|
|
- if [ -e "tengine-$NEW_tengine_ver.tar.gz" ]; then
|
|
|
|
- src_url=https://www.openssl.org/source/openssl-$openssl_ver.tar.gz && Download_src
|
|
|
|
- src_url=http://mirrors.linuxeye.com/oneinstack/src/pcre-$pcre_ver.tar.gz && Download_src
|
|
|
|
- tar xzf openssl-$openssl_ver.tar.gz
|
|
|
|
- tar xzf pcre-$pcre_ver.tar.gz
|
|
|
|
- echo "Download [${CMSG}tengine-$NEW_tengine_ver.tar.gz${CEND}] successfully! "
|
|
|
|
|
|
+ read -p "Please input upgrade Tengine Version(default: ${Latest_tengine_ver}): " NEW_tengine_ver
|
|
|
|
+ [ -z "${NEW_tengine_ver}" ] && NEW_tengine_ver=${Latest_tengine_ver}
|
|
|
|
+ if [ "${NEW_tengine_ver}" != "${OLD_tengine_ver}" ]; then
|
|
|
|
+ [ ! -e "tengine-${NEW_tengine_ver}.tar.gz" ] && wget --no-check-certificate -c http://tengine.taobao.org/download/tengine-${NEW_tengine_ver}.tar.gz > /dev/null 2>&1
|
|
|
|
+ if [ -e "tengine-${NEW_tengine_ver}.tar.gz" ]; then
|
|
|
|
+ src_url=https://www.openssl.org/source/openssl-${openssl_ver}.tar.gz && Download_src
|
|
|
|
+ src_url=http://mirrors.linuxeye.com/oneinstack/src/pcre-${pcre_ver}.tar.gz && Download_src
|
|
|
|
+ tar xzf openssl-${openssl_ver}.tar.gz
|
|
|
|
+ tar xzf pcre-${pcre_ver}.tar.gz
|
|
|
|
+ echo "Download [${CMSG}tengine-${NEW_tengine_ver}.tar.gz${CEND}] successfully! "
|
|
break
|
|
break
|
|
else
|
|
else
|
|
echo "${CWARNING}Tengine version does not exist! ${CEND}"
|
|
echo "${CWARNING}Tengine version does not exist! ${CEND}"
|
|
@@ -94,33 +94,33 @@ Upgrade_Tengine() {
|
|
fi
|
|
fi
|
|
done
|
|
done
|
|
|
|
|
|
- if [ -e "tengine-$NEW_tengine_ver.tar.gz" ]; then
|
|
|
|
- echo "[${CMSG}tengine-$NEW_tengine_ver.tar.gz${CEND}] found"
|
|
|
|
|
|
+ if [ -e "tengine-${NEW_tengine_ver}.tar.gz" ]; then
|
|
|
|
+ echo "[${CMSG}tengine-${NEW_tengine_ver}.tar.gz${CEND}] found"
|
|
echo "Press Ctrl+c to cancel or Press any key to continue..."
|
|
echo "Press Ctrl+c to cancel or Press any key to continue..."
|
|
char=`get_char`
|
|
char=`get_char`
|
|
- tar xzf tengine-$NEW_tengine_ver.tar.gz
|
|
|
|
- pushd tengine-$NEW_tengine_ver
|
|
|
|
|
|
+ tar xzf tengine-${NEW_tengine_ver}.tar.gz
|
|
|
|
+ pushd tengine-${NEW_tengine_ver}
|
|
make clean
|
|
make clean
|
|
sed -i 's@CFLAGS="$CFLAGS -g"@#CFLAGS="$CFLAGS -g"@' auto/cc/gcc # close debug
|
|
sed -i 's@CFLAGS="$CFLAGS -g"@#CFLAGS="$CFLAGS -g"@' auto/cc/gcc # close debug
|
|
- $tengine_install_dir/sbin/nginx -V &> $$
|
|
|
|
|
|
+ ${tengine_install_dir}/sbin/nginx -V &> $$
|
|
tengine_configure_arguments=`cat $$ | grep 'configure arguments:' | awk -F: '{print $2}'`
|
|
tengine_configure_arguments=`cat $$ | grep 'configure arguments:' | awk -F: '{print $2}'`
|
|
rm -rf $$
|
|
rm -rf $$
|
|
- ./configure $tengine_configure_arguments
|
|
|
|
|
|
+ ./configure ${tengine_configure_arguments}
|
|
make -j ${THREAD}
|
|
make -j ${THREAD}
|
|
if [ -f "objs/nginx" ]; then
|
|
if [ -f "objs/nginx" ]; then
|
|
- /bin/mv $tengine_install_dir/sbin/nginx{,`date +%m%d`}
|
|
|
|
- /bin/mv $tengine_install_dir/sbin/dso_tool{,`date +%m%d`}
|
|
|
|
- /bin/mv $tengine_install_dir/modules{,`date +%m%d`}
|
|
|
|
- /bin/cp objs/nginx $tengine_install_dir/sbin/nginx
|
|
|
|
- /bin/cp objs/dso_tool $tengine_install_dir/sbin/dso_tool
|
|
|
|
- chmod +x $tengine_install_dir/sbin/*
|
|
|
|
|
|
+ /bin/mv ${tengine_install_dir}/sbin/nginx{,`date +%m%d`}
|
|
|
|
+ /bin/mv ${tengine_install_dir}/sbin/dso_tool{,`date +%m%d`}
|
|
|
|
+ /bin/mv ${tengine_install_dir}/modules{,`date +%m%d`}
|
|
|
|
+ /bin/cp objs/nginx ${tengine_install_dir}/sbin/nginx
|
|
|
|
+ /bin/cp objs/dso_tool ${tengine_install_dir}/sbin/dso_tool
|
|
|
|
+ chmod +x ${tengine_install_dir}/sbin/*
|
|
make install
|
|
make install
|
|
kill -USR2 `cat /var/run/nginx.pid`
|
|
kill -USR2 `cat /var/run/nginx.pid`
|
|
sleep 1
|
|
sleep 1
|
|
kill -QUIT `cat /var/run/nginx.pid.oldbin`
|
|
kill -QUIT `cat /var/run/nginx.pid.oldbin`
|
|
popd > /dev/null
|
|
popd > /dev/null
|
|
- echo "You have ${CMSG}successfully${CEND} upgrade from ${CWARNING}$OLD_tengine_ver${CEND} to ${CWARNING}$NEW_tengine_ver${CEND}"
|
|
|
|
- rm -rf tengine-$NEW_tengine_ver
|
|
|
|
|
|
+ echo "You have ${CMSG}successfully${CEND} upgrade from ${CWARNING}$OLD_tengine_ver${CEND} to ${CWARNING}${NEW_tengine_ver}${CEND}"
|
|
|
|
+ rm -rf tengine-${NEW_tengine_ver}
|
|
else
|
|
else
|
|
echo "${CFAILURE}Upgrade Tengine failed! ${CEND}"
|
|
echo "${CFAILURE}Upgrade Tengine failed! ${CEND}"
|
|
fi
|
|
fi
|
|
@@ -130,23 +130,23 @@ Upgrade_Tengine() {
|
|
|
|
|
|
Upgrade_OpenResty() {
|
|
Upgrade_OpenResty() {
|
|
pushd ${oneinstack_dir}/src > /dev/null
|
|
pushd ${oneinstack_dir}/src > /dev/null
|
|
- [ ! -e "$openresty_install_dir/nginx/sbin/nginx" ] && echo "${CWARNING}OpenResty is not installed on your system! ${CEND}" && exit 1
|
|
|
|
- OLD_openresy_ver_tmp=`$openresty_install_dir/nginx/sbin/nginx -v 2>&1`
|
|
|
|
|
|
+ [ ! -e "${openresty_install_dir}/nginx/sbin/nginx" ] && echo "${CWARNING}OpenResty is not installed on your system! ${CEND}" && exit 1
|
|
|
|
+ OLD_openresy_ver_tmp=`${openresty_install_dir}/nginx/sbin/nginx -v 2>&1`
|
|
OLD_openresy_ver="`echo ${OLD_openresy_ver_tmp#*/} | awk '{print $1}'`"
|
|
OLD_openresy_ver="`echo ${OLD_openresy_ver_tmp#*/} | awk '{print $1}'`"
|
|
Latest_openresy_ver=`curl -s https://openresty.org/en/download.html | awk '/download\/openresty-/{print $0}' | grep -oE "[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+" | head -1`
|
|
Latest_openresy_ver=`curl -s https://openresty.org/en/download.html | awk '/download\/openresty-/{print $0}' | grep -oE "[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+" | head -1`
|
|
echo
|
|
echo
|
|
- echo "Current OpenResty Version: ${CMSG}$OLD_openresy_ver${CEND}"
|
|
|
|
|
|
+ echo "Current OpenResty Version: ${CMSG}${OLD_openresy_ver}${CEND}"
|
|
while :; do echo
|
|
while :; do echo
|
|
- read -p "Please input upgrade OpenResty Version(default: $Latest_openresy_ver): " NEW_openresy_ver
|
|
|
|
- [ -z "$NEW_openresy_ver" ] && NEW_openresy_ver=$Latest_openresy_ver
|
|
|
|
- if [ "$NEW_openresy_ver" != "$OLD_openresy_ver" ]; then
|
|
|
|
- [ ! -e "openresty-$NEW_openresy_ver.tar.gz" ] && wget --no-check-certificate -c https://openresty.org/download/openresty-$NEW_openresy_ver.tar.gz > /dev/null 2>&1
|
|
|
|
- if [ -e "openresty-$NEW_openresy_ver.tar.gz" ]; then
|
|
|
|
- src_url=https://www.openssl.org/source/openssl-$openssl_ver.tar.gz && Download_src
|
|
|
|
- src_url=http://mirrors.linuxeye.com/oneinstack/src/pcre-$pcre_ver.tar.gz && Download_src
|
|
|
|
- tar xzf openssl-$openssl_ver.tar.gz
|
|
|
|
- tar xzf pcre-$pcre_ver.tar.gz
|
|
|
|
- echo "Download [${CMSG}openresty-$NEW_openresy_ver.tar.gz${CEND}] successfully! "
|
|
|
|
|
|
+ read -p "Please input upgrade OpenResty Version(default: ${Latest_openresy_ver}): " NEW_openresy_ver
|
|
|
|
+ [ -z "${NEW_openresy_ver}" ] && NEW_openresy_ver=${Latest_openresy_ver}
|
|
|
|
+ if [ "${NEW_openresy_ver}" != "${OLD_openresy_ver}" ]; then
|
|
|
|
+ [ ! -e "openresty-${NEW_openresy_ver}.tar.gz" ] && wget --no-check-certificate -c https://openresty.org/download/openresty-${NEW_openresy_ver}.tar.gz > /dev/null 2>&1
|
|
|
|
+ if [ -e "openresty-${NEW_openresy_ver}.tar.gz" ]; then
|
|
|
|
+ src_url=https://www.openssl.org/source/openssl-${openssl_ver}.tar.gz && Download_src
|
|
|
|
+ src_url=http://mirrors.linuxeye.com/oneinstack/src/pcre-${pcre_ver}.tar.gz && Download_src
|
|
|
|
+ tar xzf openssl-${openssl_ver}.tar.gz
|
|
|
|
+ tar xzf pcre-${pcre_ver}.tar.gz
|
|
|
|
+ echo "Download [${CMSG}openresty-${NEW_openresy_ver}.tar.gz${CEND}] successfully! "
|
|
break
|
|
break
|
|
else
|
|
else
|
|
echo "${CWARNING}OpenResty version does not exist! ${CEND}"
|
|
echo "${CWARNING}OpenResty version does not exist! ${CEND}"
|
|
@@ -156,27 +156,27 @@ Upgrade_OpenResty() {
|
|
fi
|
|
fi
|
|
done
|
|
done
|
|
|
|
|
|
- if [ -e "openresty-$NEW_openresy_ver.tar.gz" ]; then
|
|
|
|
- echo "[${CMSG}openresty-$NEW_openresy_ver.tar.gz${CEND}] found"
|
|
|
|
|
|
+ if [ -e "openresty-${NEW_openresy_ver}.tar.gz" ]; then
|
|
|
|
+ echo "[${CMSG}openresty-${NEW_openresy_ver}.tar.gz${CEND}] found"
|
|
echo "Press Ctrl+c to cancel or Press any key to continue..."
|
|
echo "Press Ctrl+c to cancel or Press any key to continue..."
|
|
char=`get_char`
|
|
char=`get_char`
|
|
- tar xzf openresty-$NEW_openresy_ver.tar.gz
|
|
|
|
- pushd openresty-$NEW_openresy_ver
|
|
|
|
|
|
+ tar xzf openresty-${NEW_openresy_ver}.tar.gz
|
|
|
|
+ pushd openresty-${NEW_openresy_ver}
|
|
make clean
|
|
make clean
|
|
openresty_ver_tmp=${NEW_openresy_ver%.*}
|
|
openresty_ver_tmp=${NEW_openresy_ver%.*}
|
|
- sed -i 's@CFLAGS="$CFLAGS -g"@#CFLAGS="$CFLAGS -g"@' bundle/nginx-$openresty_ver_tmp/auto/cc/gcc # close debug
|
|
|
|
- $openresty_install_dir/nginx/sbin/nginx -V &> $$
|
|
|
|
- ./configure --prefix=$openresty_install_dir --user=${run_user} --group=${run_user} --with-http_stub_status_module --with-http_v2_module --with-http_ssl_module --with-http_gzip_static_module --with-http_realip_module --with-http_flv_module --with-http_mp4_module --with-openssl=../openssl-$openssl_ver --with-pcre=../pcre-$pcre_ver --with-pcre-jit --with-ld-opt='-ljemalloc' $nginx_modules_options
|
|
|
|
|
|
+ sed -i 's@CFLAGS="$CFLAGS -g"@#CFLAGS="$CFLAGS -g"@' bundle/nginx-${openresty_ver_tmp}/auto/cc/gcc # close debug
|
|
|
|
+ ${openresty_install_dir}/nginx/sbin/nginx -V &> $$
|
|
|
|
+ ./configure --prefix=${openresty_install_dir} --user=${run_user} --group=${run_user} --with-http_stub_status_module --with-http_v2_module --with-http_ssl_module --with-http_gzip_static_module --with-http_realip_module --with-http_flv_module --with-http_mp4_module --with-openssl=../openssl-${openssl_ver} --with-pcre=../pcre-${pcre_ver} --with-pcre-jit --with-ld-opt='-ljemalloc' ${nginx_modules_options}
|
|
make -j ${THREAD}
|
|
make -j ${THREAD}
|
|
- if [ -f "build/nginx-$openresty_ver_tmp/objs/nginx" ]; then
|
|
|
|
- /bin/mv $openresty_install_dir/nginx/sbin/nginx{,`date +%m%d`}
|
|
|
|
|
|
+ if [ -f "build/nginx-${openresty_ver_tmp}/objs/nginx" ]; then
|
|
|
|
+ /bin/mv ${openresty_install_dir}/nginx/sbin/nginx{,`date +%m%d`}
|
|
make install
|
|
make install
|
|
kill -USR2 `cat /var/run/nginx.pid`
|
|
kill -USR2 `cat /var/run/nginx.pid`
|
|
sleep 1
|
|
sleep 1
|
|
kill -QUIT `cat /var/run/nginx.pid.oldbin`
|
|
kill -QUIT `cat /var/run/nginx.pid.oldbin`
|
|
popd > /dev/null
|
|
popd > /dev/null
|
|
- echo "You have ${CMSG}successfully${CEND} upgrade from ${CWARNING}$OLD_openresy_ver${CEND} to ${CWARNING}$NEW_openresy_ver${CEND}"
|
|
|
|
- rm -rf openresty-$NEW_openresy_ver
|
|
|
|
|
|
+ echo "You have ${CMSG}successfully${CEND} upgrade from ${CWARNING}${OLD_openresy_ver}${CEND} to ${CWARNING}${NEW_openresy_ver}${CEND}"
|
|
|
|
+ rm -rf openresty-${NEW_openresy_ver}
|
|
else
|
|
else
|
|
echo "${CFAILURE}Upgrade OpenResty failed! ${CEND}"
|
|
echo "${CFAILURE}Upgrade OpenResty failed! ${CEND}"
|
|
fi
|
|
fi
|
|
@@ -231,7 +231,7 @@ Upgrade_Apache() {
|
|
/bin/cp -R ../apr-util-${apr_util_ver} ./srclib/apr-util
|
|
/bin/cp -R ../apr-util-${apr_util_ver} ./srclib/apr-util
|
|
[ -e "${php_install_dir}/bin/phpize" ] && { PHP_detail_ver=`${php_install_dir}/bin/php -r 'echo PHP_VERSION;'`; PHP_master_ver=${PHP_detail_ver%%.*}; }
|
|
[ -e "${php_install_dir}/bin/phpize" ] && { PHP_detail_ver=`${php_install_dir}/bin/php -r 'echo PHP_VERSION;'`; PHP_master_ver=${PHP_detail_ver%%.*}; }
|
|
[ "${PHP_master_ver}" == '5' ] && Apache_mpm_arg='--with-mpm=prefork'
|
|
[ "${PHP_master_ver}" == '5' ] && Apache_mpm_arg='--with-mpm=prefork'
|
|
- LDFLAGS=-ldl LD_LIBRARY_PATH=${openssl_install_dir}/lib ./configure --prefix=${apache_install_dir} ${Apache_mpm_arg} --enable-mpms-shared=all --with-included-apr --enable-headers --enable-deflate --enable-so --enable-dav --enable-rewrite --enable-ssl --with-ssl=${openssl_install_dir} --enable-http2 --with-nghttp2=/usr/local --enable-expires --enable-static-support --enable-suexec --enable-modules=all --enable-mods-shared=all
|
|
|
|
|
|
+ LDFLAGS=-ldl ./configure --prefix=${apache_install_dir} ${Apache_mpm_arg} --enable-mpms-shared=all --with-included-apr --enable-headers --enable-deflate --enable-so --enable-dav --enable-rewrite --enable-ssl --with-ssl=${openssl_install_dir} --enable-http2 --with-nghttp2=/usr/local --enable-expires --enable-static-support --enable-suexec --enable-modules=all --enable-mods-shared=all
|
|
elif [ "${Apache_flag}" == '22' ]; then
|
|
elif [ "${Apache_flag}" == '22' ]; then
|
|
[ "${Ubuntu_ver}" == "12" ] && sed -i '@SSL_PROTOCOL_SSLV2@d' modules/ssl/ssl_engine_io.c
|
|
[ "${Ubuntu_ver}" == "12" ] && sed -i '@SSL_PROTOCOL_SSLV2@d' modules/ssl/ssl_engine_io.c
|
|
LDFLAGS=-ldl ./configure --prefix=${apache_install_dir} --with-mpm=prefork --with-included-apr --enable-headers --enable-deflate --enable-so --enable-rewrite --enable-ssl--with-ssl=${openssl_install_dir} --enable-expires --enable-static-support --enable-suexec --enable-modules=all --enable-mods-shared=all
|
|
LDFLAGS=-ldl ./configure --prefix=${apache_install_dir} --with-mpm=prefork --with-included-apr --enable-headers --enable-deflate --enable-so --enable-rewrite --enable-ssl--with-ssl=${openssl_install_dir} --enable-expires --enable-static-support --enable-suexec --enable-modules=all --enable-mods-shared=all
|