lj2007331@gmail.com před 1 rokem
rodič
revize
7c6222f1ad

+ 3 - 36
addons.sh

@@ -34,8 +34,6 @@ pushd ${oneinstack_dir} > /dev/null
 
 . ./include/composer.sh
 
-. ./include/python.sh
-
 . ./include/fail2ban.sh
 
 . ./include/ngx_lua_waf.sh
@@ -53,12 +51,11 @@ Show_Help() {
   --composer                  Composer
   --fail2ban                  Fail2ban
   --ngx_lua_waf               Ngx_lua_waf
-  --python                    Python (PATH: ${python_install_dir})
   "
 }
 
 ARG_NUM=$#
-TEMP=`getopt -o hiu --long help,install,uninstall,composer,fail2ban,ngx_lua_waf,python -- "$@" 2>/dev/null`
+TEMP=`getopt -o hiu --long help,install,uninstall,composer,fail2ban,ngx_lua_waf -- "$@" 2>/dev/null`
 [ $? != 0 ] && echo "${CWARNING}ERROR: unknown argument! ${CEND}" && Show_Help && exit 1
 eval set -- "${TEMP}"
 while :; do
@@ -82,9 +79,6 @@ while :; do
     --ngx_lua_waf)
       ngx_lua_waf_flag=y; shift 1
       ;;
-    --python)
-      python_flag=y; shift 1
-      ;;
     --)
       shift
       ;;
@@ -119,12 +113,11 @@ What Are You Doing?
 \t${CMSG}1${CEND}. Install/Uninstall PHP Composer
 \t${CMSG}2${CEND}. Install/Uninstall fail2ban
 \t${CMSG}3${CEND}. Install/Uninstall ngx_lua_waf
-\t${CMSG}4${CEND}. Install/Uninstall Python3.6
 \t${CMSG}q${CEND}. Exit
 "
     read -e -p "Please input the correct option: " Number
-    if [[ ! "${Number}" =~ ^[1-5,q]$ ]]; then
-      echo "${CFAILURE}input error! Please only input 1~4 and q${CEND}"
+    if [[ ! "${Number}" =~ ^[1-3,q]$ ]]; then
+      echo "${CFAILURE}input error! Please only input 1~3 and q${CEND}"
     else
       case "${Number}" in
         1)
@@ -138,7 +131,6 @@ What Are You Doing?
         2)
           ACTION_FUN
           if [ "${install_flag}" = 'y' ]; then
-            Install_Python
             Install_fail2ban
           elif [ "${uninstall_flag}" = 'y' ]; then
             Uninstall_fail2ban
@@ -156,23 +148,6 @@ What Are You Doing?
             disable_lua_waf
           fi
           ;;
-        4)
-          ACTION_FUN
-          if [ "${install_flag}" = 'y' ]; then
-            Install_Python
-          elif [ "${uninstall_flag}" = 'y' ]; then
-            Uninstall_Python
-          fi
-          ;;
-        5)
-          ACTION_FUN
-          if [ "${install_flag}" = 'y' ]; then
-            Install_Python
-            Install_Panel
-          elif [ "${uninstall_flag}" = 'y' ]; then
-            Uninstall_Panel
-          fi
-          ;;
         q)
           exit
           ;;
@@ -193,7 +168,6 @@ else
   fi
   if [ "${fail2ban_flag}" == 'y' ]; then
     if [ "${install_flag}" = 'y' ]; then
-      Install_Python
       Install_fail2ban
     elif [ "${uninstall_flag}" = 'y' ]; then
       Uninstall_fail2ban
@@ -208,11 +182,4 @@ else
       disable_lua_waf
     fi
   fi
-  if [ "${python_flag}" == 'y' ]; then
-    if [ "${install_flag}" = 'y' ]; then
-      Install_Python
-    elif [ "${uninstall_flag}" = 'y' ]; then
-      Uninstall_Python
-    fi
-  fi
 fi

+ 28 - 26
backup.sh

@@ -8,6 +8,8 @@
 #       https://oneinstack.com
 #       https://github.com/oneinstack/oneinstack
 
+export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
+
 # Check if user is root
 [ $(id -u) != "0" ] && { echo "${CFAILURE}Error: You must be root to run this script${CEND}"; exit 1; }
 
@@ -40,9 +42,9 @@ DB_OSS_BK() {
     ./db_bk.sh ${D}
     DB_GREP="DB_${D}_`date +%Y%m%d`"
     DB_FILE=`ls -lrt ${backup_dir} | grep ${DB_GREP} | tail -1 | awk '{print $NF}'`
-    /usr/local/bin/ossutil cp -f ${backup_dir}/${DB_FILE} oss://${oss_bucket}/`date +%F`/${DB_FILE}
+    ossutil cp -f ${backup_dir}/${DB_FILE} oss://${oss_bucket}/`date +%F`/${DB_FILE}
     if [ $? -eq 0 ]; then
-      /usr/local/bin/ossutil rm -rf oss://${oss_bucket}/`date +%F --date="${expired_days} days ago"`/
+      ossutil rm -rf oss://${oss_bucket}/`date +%F --date="${expired_days} days ago"`/
       [ -z "`echo ${backup_destination} | grep -ow 'local'`" ] && rm -f ${backup_dir}/${DB_FILE}
     fi
   done
@@ -54,9 +56,9 @@ DB_COS_BK() {
     ./db_bk.sh ${D}
     DB_GREP="DB_${D}_`date +%Y%m%d`"
     DB_FILE=`ls -lrt ${backup_dir} | grep ${DB_GREP} | tail -1 | awk '{print $NF}'`
-    ${python_install_dir}/bin/coscmd upload ${backup_dir}/${DB_FILE} /`date +%F`/${DB_FILE}
+    coscli sync ${backup_dir}/${DB_FILE} cos://${cos_bucket}/`date +%F`/${DB_FILE}
     if [ $? -eq 0 ]; then
-      ${python_install_dir}/bin/coscmd delete -r -f `date +%F --date="${expired_days} days ago"` > /dev/null 2>&1
+      coscli rm -rf cos://${cos_bucket}/`date +%F --date="${expired_days} days ago"` > /dev/null 2>&1
       [ -z "`echo ${backup_destination} | grep -ow 'local'`" ] && rm -f ${backup_dir}/${DB_FILE}
     fi
   done
@@ -68,9 +70,9 @@ DB_UPYUN_BK() {
     ./db_bk.sh ${D}
     DB_GREP="DB_${D}_`date +%Y%m%d`"
     DB_FILE=`ls -lrt ${backup_dir} | grep ${DB_GREP} | tail -1 | awk '{print $NF}'`
-    /usr/local/bin/upx put ${backup_dir}/${DB_FILE} /`date +%F`/${DB_FILE}
+    upx put ${backup_dir}/${DB_FILE} /`date +%F`/${DB_FILE}
     if [ $? -eq 0 ]; then
-      /usr/local/bin/upx rm -a `date +%F --date="${expired_days} days ago"` > /dev/null 2>&1
+      upx rm -a `date +%F --date="${expired_days} days ago"` > /dev/null 2>&1
       [ -z "`echo ${backup_destination} | grep -ow 'local'`" ] && rm -f ${backup_dir}/${DB_FILE}
     fi
   done
@@ -82,10 +84,10 @@ DB_QINIU_BK() {
     ./db_bk.sh ${D}
     DB_GREP="DB_${D}_`date +%Y%m%d`"
     DB_FILE=`ls -lrt ${backup_dir} | grep ${DB_GREP} | tail -1 | awk '{print $NF}'`
-    /usr/local/bin/qshell rput ${qiniu_bucket} /`date +%F`/${DB_FILE} ${backup_dir}/${DB_FILE}
+    qshell rput ${qiniu_bucket} /`date +%F`/${DB_FILE} ${backup_dir}/${DB_FILE}
     if [ $? -eq 0 ]; then
-      /usr/local/bin/qshell listbucket ${qiniu_bucket} /`date +%F --date="${expired_days} days ago"` /tmp/qiniu.txt > /dev/null 2>&1
-      /usr/local/bin/qshell batchdelete -force ${qiniu_bucket} /tmp/qiniu.txt > /dev/null 2>&1
+      qshell listbucket ${qiniu_bucket} /`date +%F --date="${expired_days} days ago"` /tmp/qiniu.txt > /dev/null 2>&1
+      qshell batchdelete -force ${qiniu_bucket} /tmp/qiniu.txt > /dev/null 2>&1
       [ -z "`echo ${backup_destination} | grep -ow 'local'`" ] && rm -f ${backup_dir}/${DB_FILE}
       rm -f /tmp/qiniu.txt
     fi
@@ -98,9 +100,9 @@ DB_S3_BK() {
     ./db_bk.sh ${D}
     DB_GREP="DB_${D}_`date +%Y%m%d`"
     DB_FILE=`ls -lrt ${backup_dir} | grep ${DB_GREP} | tail -1 | awk '{print $NF}'`
-    ${python_install_dir}/bin/s3cmd put ${backup_dir}/${DB_FILE} s3://${s3_bucket}/`date +%F`/${DB_FILE}
+    aws s3 sync ${backup_dir}/${DB_FILE} s3://${s3_bucket}/`date +%F`/${DB_FILE}
     if [ $? -eq 0 ]; then
-      ${python_install_dir}/bin/s3cmd rm -r s3://${s3_bucket}/`date +%F --date="${expired_days} days ago"` > /dev/null 2>&1
+      aws s3 rm -r s3://${s3_bucket}/`date +%F --date="${expired_days} days ago"` > /dev/null 2>&1
       [ -z "`echo ${backup_destination} | grep -ow 'local'`" ] && rm -f ${backup_dir}/${DB_FILE}
     fi
   done
@@ -112,9 +114,9 @@ DB_DROPBOX_BK() {
     ./db_bk.sh ${D}
     DB_GREP="DB_${D}_`date +%Y%m%d`"
     DB_FILE=`ls -lrt ${backup_dir} | grep ${DB_GREP} | tail -1 | awk '{print $NF}'`
-    /usr/local/bin/dbxcli put ${backup_dir}/${DB_FILE} `date +%F`/${DB_FILE}
+    dbxcli put ${backup_dir}/${DB_FILE} `date +%F`/${DB_FILE}
     if [ $? -eq 0 ]; then
-      /usr/local/bin/dbxcli rm -f `date +%F --date="${expired_days} days ago"` > /dev/null 2>&1
+      dbxcli rm -f `date +%F --date="${expired_days} days ago"` > /dev/null 2>&1
       [ -z "`echo ${backup_destination} | grep -ow 'local'`" ] && rm -f ${backup_dir}/${DB_FILE}
     fi
   done
@@ -152,9 +154,9 @@ WEB_OSS_BK() {
       tar czf ${PUSH_FILE} ./$W
       popd > /dev/null
     fi
-    /usr/local/bin/ossutil cp -f ${PUSH_FILE} oss://${oss_bucket}/`date +%F`/${PUSH_FILE##*/}
+    ossutil cp -f ${PUSH_FILE} oss://${oss_bucket}/`date +%F`/${PUSH_FILE##*/}
     if [ $? -eq 0 ]; then
-      /usr/local/bin/ossutil rm -rf oss://${oss_bucket}/`date +%F --date="${expired_days} days ago"`/
+      ossutil rm -rf oss://${oss_bucket}/`date +%F --date="${expired_days} days ago"`/
       [ -z "`echo ${backup_destination} | grep -ow 'local'`" ] && rm -f ${PUSH_FILE}
     fi
   done
@@ -170,9 +172,9 @@ WEB_COS_BK() {
       tar czf ${PUSH_FILE} ./$W
       popd > /dev/null
     fi
-    ${python_install_dir}/bin/coscmd upload ${PUSH_FILE} /`date +%F`/${PUSH_FILE##*/}
+    coscli sync ${PUSH_FILE} cos://${cos_bucket}/`date +%F`/${PUSH_FILE##*/}
     if [ $? -eq 0 ]; then
-      ${python_install_dir}/bin/coscmd delete -r -f `date +%F --date="${expired_days} days ago"` > /dev/null 2>&1
+      coscli rm -rf cos://${cos_bucket}/`date +%F --date="${expired_days} days ago"` > /dev/null 2>&1
       [ -z "`echo ${backup_destination} | grep -ow 'local'`" ] && rm -f ${PUSH_FILE}
     fi
   done
@@ -189,9 +191,9 @@ WEB_UPYUN_BK() {
       tar czf ${PUSH_FILE} ./$W
       popd > /dev/null
     fi
-    /usr/local/bin/upx put ${PUSH_FILE} /`date +%F`/${PUSH_FILE##*/}
+    upx put ${PUSH_FILE} /`date +%F`/${PUSH_FILE##*/}
     if [ $? -eq 0 ]; then
-      /usr/local/bin/upx rm -a `date +%F --date="${expired_days} days ago"` > /dev/null 2>&1
+      upx rm -a `date +%F --date="${expired_days} days ago"` > /dev/null 2>&1
       [ -z "`echo ${backup_destination} | grep -ow 'local'`" ] && rm -f ${PUSH_FILE}
     fi
   done
@@ -208,10 +210,10 @@ WEB_QINIU_BK() {
       tar czf ${PUSH_FILE} ./$W
       popd > /dev/null
     fi
-    /usr/local/bin/qshell rput ${qiniu_bucket} /`date +%F`/${PUSH_FILE##*/} ${PUSH_FILE}
+    qshell rput ${qiniu_bucket} /`date +%F`/${PUSH_FILE##*/} ${PUSH_FILE}
     if [ $? -eq 0 ]; then
-      /usr/local/bin/qshell listbucket ${qiniu_bucket} /`date +%F --date="${expired_days} days ago"` /tmp/qiniu.txt > /dev/null 2>&1
-      /usr/local/bin/qshell batchdelete -force ${qiniu_bucket} /tmp/qiniu.txt > /dev/null 2>&1
+      qshell listbucket ${qiniu_bucket} /`date +%F --date="${expired_days} days ago"` /tmp/qiniu.txt > /dev/null 2>&1
+      qshell batchdelete -force ${qiniu_bucket} /tmp/qiniu.txt > /dev/null 2>&1
       [ -z "`echo ${backup_destination} | grep -ow 'local'`" ] && rm -f ${PUSH_FILE}
       rm -f /tmp/qiniu.txt
     fi
@@ -229,9 +231,9 @@ WEB_S3_BK() {
       tar czf ${PUSH_FILE} ./$W
       popd > /dev/null
     fi
-    ${python_install_dir}/bin/s3cmd put ${PUSH_FILE} s3://${s3_bucket}/`date +%F`/${PUSH_FILE##*/}
+    aws s3 sync ${PUSH_FILE} s3://${s3_bucket}/`date +%F`/${PUSH_FILE##*/}
     if [ $? -eq 0 ]; then
-      ${python_install_dir}/bin/s3cmd rm -r s3://${s3_bucket}/`date +%F --date="${expired_days} days ago"` > /dev/null 2>&1
+      aws s3 rm -r s3://${s3_bucket}/`date +%F --date="${expired_days} days ago"` > /dev/null 2>&1
       [ -z "`echo ${backup_destination} | grep -ow 'local'`" ] && rm -f ${PUSH_FILE}
     fi
   done
@@ -248,9 +250,9 @@ WEB_DROPBOX_BK() {
       tar czf ${PUSH_FILE} ./$W
       popd > /dev/null
     fi
-    /usr/local/bin/dbxcli put ${PUSH_FILE} `date +%F`/${PUSH_FILE##*/}
+    dbxcli put ${PUSH_FILE} `date +%F`/${PUSH_FILE##*/}
     if [ $? -eq 0 ]; then
-      /usr/local/bin/dbxcli rm -f `date +%F --date="${expired_days} days ago"` > /dev/null 2>&1
+      dbxcli rm -f `date +%F --date="${expired_days} days ago"` > /dev/null 2>&1
       [ -z "`echo ${backup_destination} | grep -ow 'local'`" ] && rm -f ${PUSH_FILE}
     fi
   done

+ 170 - 136
backup_setup.sh

@@ -28,7 +28,6 @@ pushd ${oneinstack_dir} > /dev/null
 . ./include/check_os.sh
 . ./include/check_dir.sh
 . ./include/download.sh
-. ./include/python.sh
 
 while :; do echo
   echo 'Please select your backup destination:'
@@ -183,58 +182,64 @@ fi
 if [ -n "`echo ${desc_bk} | grep -w 3`" ]; then
   if [ ! -e "/usr/local/bin/ossutil" ]; then
     if [ "${armplatform}" == 'y' ]; then
-      wget -qc https://gosspublic.alicdn.com/ossutil/1.7.10/ossutilarm64 -O /usr/local/bin/ossutil
+      wget -qc https://gosspublic.alicdn.com/ossutil/1.7.16/ossutilarm64 -O /usr/local/bin/ossutil
     else
-      wget -qc https://gosspublic.alicdn.com/ossutil/1.7.10/ossutil64 -O /usr/local/bin/ossutil
+      wget -qc https://gosspublic.alicdn.com/ossutil/1.7.16/ossutil64 -O /usr/local/bin/ossutil
     fi
     chmod +x /usr/local/bin/ossutil
   fi
   while :; do echo
     echo 'Please select your backup aliyun datacenter:'
     echo -e "\t ${CMSG}1${CEND}. cn-hangzhou-华东1 (杭州)          ${CMSG}2${CEND}. cn-shanghai-华东2 (上海)"
-    echo -e "\t ${CMSG}3${CEND}. cn-qingdao-华北1 (青岛)           ${CMSG}4${CEND}. cn-beijing-华北2 (北京)"
-    echo -e "\t ${CMSG}5${CEND}. cn-zhangjiakou-华北3 (张家口)     ${CMSG}6${CEND}. cn-huhehaote-华北5(呼和浩特)"
-    echo -e "\t ${CMSG}7${CEND}. cn-wulanchabu-华北6(乌兰察布)   ${CMSG}8${CEND}. cn-shenzhen-华南1(深圳)"
-    echo -e "\t ${CMSG}9${CEND}. cn-heyuan-华南2(河源)	  ${CMSG}10${CEND}. cn-guangzhou-华南3(广州)"
-    echo -e "\t${CMSG}11${CEND}. cn-chengdu-西南1(成都)         ${CMSG}12${CEND}. cn-hongkong-香港"
-    echo -e "\t${CMSG}13${CEND}. us-west-1-美国(硅谷)           ${CMSG}14${CEND}. us-east-1-美国(弗吉尼亚)"
-    echo -e "\t${CMSG}15${CEND}. ap-southeast-1-新加坡            ${CMSG}16${CEND}. ap-southeast-2-澳大利亚(悉尼)"
-    echo -e "\t${CMSG}17${CEND}. ap-southeast-3-马来西亚(吉隆坡)${CMSG}18${CEND}. ap-southeast-5-印度尼西亚(雅加达)"
-    echo -e "\t${CMSG}19${CEND}. ap-northeast-1-日本(东京)      ${CMSG}20${CEND}. ap-south-1-印度(孟买)"
-    echo -e "\t${CMSG}21${CEND}. eu-central-1-德国(法兰克福)    ${CMSG}22${CEND}. eu-west-1-英国(伦敦)"
-    echo -e "\t${CMSG}23${CEND}. me-east-1-中东东部 (迪拜)        ${CMSG}24${CEND}. ap-southeast-6-菲律宾(马尼拉)"
+    echo -e "\t ${CMSG}3${CEND}. cn-nanjing-华东5 (南京)           ${CMSG}4${CEND}. cn-fuzhou-华东6 (福州)"
+    echo -e "\t ${CMSG}5${CEND}. cn-qingdao-华北1 (青岛)           ${CMSG}6${CEND}. cn-beijing-华北2 (北京)"
+    echo -e "\t ${CMSG}7${CEND}. cn-zhangjiakou-华北3 (张家口)     ${CMSG}8${CEND}. cn-huhehaote-华北5 (呼和浩特)"
+    echo -e "\t ${CMSG}9${CEND}. cn-wulanchabu-华北6 (乌兰察布)   ${CMSG}10${CEND}. cn-shenzhen-华南1 (深圳)"
+    echo -e "\t${CMSG}11${CEND}. cn-heyuan-华南2 (河源)	          ${CMSG}12${CEND}. cn-guangzhou-华南3 (广州)"
+    echo -e "\t${CMSG}13${CEND}. cn-chengdu-西南1 (成都)          ${CMSG}14${CEND}. cn-hongkong-香港"
+    echo -e "\t${CMSG}15${CEND}. us-west-1-美国 (硅谷)            ${CMSG}16${CEND}. us-east-1-美国 (弗吉尼亚)"
+    echo -e "\t${CMSG}17${CEND}. ap-northeast-1-日本 (东京)       ${CMSG}18${CEND}. ap-northeast-2-韩国 (首尔)"
+    echo -e "\t${CMSG}19${CEND}. ap-southeast-1-新加坡            ${CMSG}20${CEND}. ap-southeast-2-澳大利亚 (悉尼)"
+    echo -e "\t${CMSG}21${CEND}. ap-southeast-3-马来西亚 (吉隆坡) ${CMSG}22${CEND}. ap-southeast-5-印度尼西亚 (雅加达)"
+    echo -e "\t${CMSG}23${CEND}. ap-southeast-6-菲律宾 (马尼拉)   ${CMSG}24${CEND}. ap-southeast-7-泰国 (曼谷)"
+    echo -e "\t${CMSG}25${CEND}. ap-south-1-印度 (孟买)           ${CMSG}26${CEND}. eu-central-1-德国 (法兰克福)"
+    echo -e "\t${CMSG}27${CEND}. eu-west-1-英国 (伦敦)            ${CMSG}28${CEND}. me-east-1-阿联酋 (迪拜)"
     read -e -p "Please input a number:(Default 1 press Enter) " Location
     Location=${Location:-1}
-    if [[ "${Location}" =~ ^[1-9]$|^1[0-9]$|^24$ ]]; then
+    if [[ "${Location}" =~ ^[1-9]$|^1[0-9]$|^2[0-8]$ ]]; then
       break
     else
-      echo "${CWARNING}input error! Please only input number 1~24${CEND}"
+      echo "${CWARNING}input error! Please only input number 1~28${CEND}"
     fi
   done
   [ "${Location}" == '1' ] && Host=oss-cn-hangzhou-internal.aliyuncs.com
   [ "${Location}" == '2' ] && Host=oss-cn-shanghai-internal.aliyuncs.com
-  [ "${Location}" == '3' ] && Host=oss-cn-qingdao-internal.aliyuncs.com
-  [ "${Location}" == '4' ] && Host=oss-cn-beijing-internal.aliyuncs.com
-  [ "${Location}" == '5' ] && Host=oss-cn-zhangjiakou-internal.aliyuncs.com
-  [ "${Location}" == '6' ] && Host=oss-cn-huhehaote-internal.aliyuncs.com
-  [ "${Location}" == '7' ] && Host=oss-cn-wulanchabu-internal.aliyuncs.com
-  [ "${Location}" == '8' ] && Host=oss-cn-shenzhen-internal.aliyuncs.com
-  [ "${Location}" == '9' ] && Host=oss-cn-heyuan-internal.aliyuncs.com
-  [ "${Location}" == '10' ] && Host=oss-cn-guangzhou-internal.aliyuncs.com
-  [ "${Location}" == '11' ] && Host=oss-cn-chengdu-internal.aliyuncs.com
-  [ "${Location}" == '12' ] && Host=oss-cn-hongkong-internal.aliyuncs.com
-  [ "${Location}" == '13' ] && Host=oss-us-west-1-internal.aliyuncs.com
-  [ "${Location}" == '14' ] && Host=oss-us-east-1-internal.aliyuncs.com
-  [ "${Location}" == '15' ] && Host=oss-ap-southeast-1-internal.aliyuncs.com
-  [ "${Location}" == '16' ] && Host=oss-ap-southeast-2-internal.aliyuncs.com
-  [ "${Location}" == '17' ] && Host=oss-ap-southeast-3-internal.aliyuncs.com
-  [ "${Location}" == '18' ] && Host=oss-ap-southeast-5-internal.aliyuncs.com
-  [ "${Location}" == '19' ] && Host=oss-ap-northeast-1-internal.aliyuncs.com
-  [ "${Location}" == '20' ] && Host=oss-ap-south-1-internal.aliyuncs.com
-  [ "${Location}" == '21' ] && Host=oss-eu-central-1-internal.aliyuncs.com
-  [ "${Location}" == '22' ] && Host=oss-eu-west-1-internal.aliyuncs.com
-  [ "${Location}" == '23' ] && Host=oss-me-east-1-internal.aliyuncs.com
-  [ "${Location}" == '24' ] && Host=oss-ap-southeast-6-internal.aliyuncs.com
+  [ "${Location}" == '3' ] && Host=oss-cn-nanjing-internal.aliyuncs.com
+  [ "${Location}" == '4' ] && Host=oss-cn-fuzhou-internal.aliyuncs.com
+  [ "${Location}" == '5' ] && Host=oss-cn-qingdao-internal.aliyuncs.com
+  [ "${Location}" == '6' ] && Host=oss-cn-beijing-internal.aliyuncs.com
+  [ "${Location}" == '7' ] && Host=oss-cn-zhangjiakou-internal.aliyuncs.com
+  [ "${Location}" == '8' ] && Host=oss-cn-huhehaote-internal.aliyuncs.com
+  [ "${Location}" == '9' ] && Host=oss-cn-wulanchabu-internal.aliyuncs.com
+  [ "${Location}" == '10' ] && Host=oss-cn-shenzhen-internal.aliyuncs.com
+  [ "${Location}" == '11' ] && Host=oss-cn-heyuan-internal.aliyuncs.com
+  [ "${Location}" == '12' ] && Host=oss-cn-guangzhou-internal.aliyuncs.com
+  [ "${Location}" == '13' ] && Host=oss-cn-chengdu-internal.aliyuncs.com
+  [ "${Location}" == '14' ] && Host=oss-cn-hongkong-internal.aliyuncs.com
+  [ "${Location}" == '15' ] && Host=oss-us-west-1-internal.aliyuncs.com
+  [ "${Location}" == '16' ] && Host=oss-us-east-1-internal.aliyuncs.com
+  [ "${Location}" == '17' ] && Host=oss-ap-northeast-1-internal.aliyuncs.com
+  [ "${Location}" == '18' ] && Host=oss-ap-northeast-2-internal.aliyuncs.com
+  [ "${Location}" == '19' ] && Host=oss-ap-southeast-1-internal.aliyuncs.com
+  [ "${Location}" == '20' ] && Host=oss-ap-southeast-2-internal.aliyuncs.com
+  [ "${Location}" == '21' ] && Host=oss-ap-southeast-3-internal.aliyuncs.com
+  [ "${Location}" == '22' ] && Host=oss-ap-southeast-5-internal.aliyuncs.com
+  [ "${Location}" == '23' ] && Host=oss-ap-southeast-6-internal.aliyuncs.com
+  [ "${Location}" == '24' ] && Host=oss-ap-southeast-7-internal.aliyuncs.com
+  [ "${Location}" == '25' ] && Host=oss-ap-south-1-internal.aliyuncs.com
+  [ "${Location}" == '26' ] && Host=oss-eu-central-1-internal.aliyuncs.com
+  [ "${Location}" == '27' ] && Host=oss-eu-west-1-internal.aliyuncs.com
+  [ "${Location}" == '28' ] && Host=oss-me-east-1-internal.aliyuncs.com
   [ "$(./include/ois.${ARCH} conn_port --host ${Host} --port 80)" == "false" ] && Host=`echo ${Host} | sed 's@-internal@@g'`
   [ -e "/root/.ossutilconfig" ] && rm -f /root/.ossutilconfig
   while :; do echo
@@ -243,12 +248,12 @@ if [ -n "`echo ${desc_bk} | grep -w 3`" ]; then
     echo
     read -e -p "Please enter the aliyun oss Access Key Secret: " KeySecret
     [ -z "${KeySecret}" ] && continue
-    /usr/local/bin/ossutil ls -e ${Host} -i ${KeyID} -k ${KeySecret} > /dev/null 2>&1
+    ossutil ls -e ${Host} -i ${KeyID} -k ${KeySecret} > /dev/null 2>&1
     if [ $? -eq 0 ]; then
-      /usr/local/bin/ossutil config -e ${Host} -i ${KeyID} -k ${KeySecret} > /dev/null 2>&1
+      ossutil config -e ${Host} -i ${KeyID} -k ${KeySecret} > /dev/null 2>&1
       while :; do echo
         read -e -p "Please enter the aliyun oss bucket: " OSS_BUCKET
-        /usr/local/bin/ossutil mb oss://${OSS_BUCKET} > /dev/null 2>&1
+        ossutil mb oss://${OSS_BUCKET} > /dev/null 2>&1
         if [ $? -eq 0 ]; then
           echo "${CMSG}Bucket oss://${OSS_BUCKET}/ created${CEND}"
           sed -i "s@^oss_bucket=.*@oss_bucket=${OSS_BUCKET}@" ./options.conf
@@ -263,57 +268,54 @@ if [ -n "`echo ${desc_bk} | grep -w 3`" ]; then
 fi
 
 if [ -n "`echo ${desc_bk} | grep -w 4`" ]; then
-  Install_Python
-  [ ! -e "${python_install_dir}/bin/coscmd" ] && ${python_install_dir}/bin/pip install coscmd > /dev/null 2>&1
+  if [ ! -e "/usr/local/bin/coscli" ]; then
+    wget -qc https://cosbrowser.cloud.tencent.com/software/coscli/coscli-linux -O /usr/local/bin/coscli
+    chmod +x /usr/local/bin/coscli
+  fi
+
   while :; do echo
     echo 'Please select your backup qcloud datacenter:'
-    echo -e "\t ${CMSG} 1${CEND}. ap-beijing-1-北京一区(华北)  ${CMSG}2${CEND}. ap-beijing-北京"
-    echo -e "\t ${CMSG} 3${CEND}. ap-nanjing-南京              ${CMSG}4${CEND}. ap-shanghai-上海"
-    echo -e "\t ${CMSG} 5${CEND}. ap-guangzhou-广州            ${CMSG}6${CEND}. ap-chengdu-成都"
-    echo -e "\t ${CMSG} 7${CEND}. ap-chongqing-重庆            ${CMSG}8${CEND}. ap-shenzhen-fsi-深圳金融"
-    echo -e "\t ${CMSG} 9${CEND}. ap-shanghai-fsi-上海金融    ${CMSG}10${CEND}. ap-beijing-fsi-北京金融"
-    echo -e "\t ${CMSG}11${CEND}. ap-hongkong-香港            ${CMSG}11${CEND}. ap-singapore-新加坡"
-    echo -e "\t ${CMSG}13${CEND}. ap-mumbai-孟买              ${CMSG}14${CEND}. ap-jakarta-雅加达"
-    echo -e "\t ${CMSG}15${CEND}. ap-seoul-首尔               ${CMSG}16${CEND}. ap-bangkok-曼谷"
-    echo -e "\t ${CMSG}17${CEND}. ap-tokyo-东京               ${CMSG}18${CEND}. na-siliconvalley-硅谷(美西)"
-    echo -e "\t ${CMSG}19${CEND}. na-ashburn-弗吉尼亚(美东) ${CMSG}20${CEND}. na-toronto-多伦多"
-    echo -e "\t ${CMSG}21${CEND}. sa-saopaulo-圣保罗	      ${CMSG}22${CEND}. eu-frankfurt-法兰克福"
-    echo -e "\t ${CMSG}23${CEND}. eu-moscow-莫斯科"
+    echo -e "\t ${CMSG} 1${CEND}. ap-beijing-北京              ${CMSG}2${CEND}. ap-nanjing-南京"
+    echo -e "\t ${CMSG} 3${CEND}. ap-shanghai-上海             ${CMSG}4${CEND}. ap-guangzhou-广州"
+    echo -e "\t ${CMSG} 5${CEND}. ap-chengdu-成都              ${CMSG}6${CEND}. ap-chongqing-重庆"
+    echo -e "\t ${CMSG} 7${CEND}. ap-shenzhen-fsi-深圳金融     ${CMSG}8${CEND}. ap-shanghai-fsi-上海金融"
+    echo -e "\t ${CMSG} 9${CEND}. ap-beijing-fsi-北京金融     ${CMSG}10${CEND}. ap-hongkong-香港"
+    echo -e "\t ${CMSG}11${CEND}. ap-singapore-新加坡         ${CMSG}12${CEND}. ap-mumbai-孟买"
+    echo -e "\t ${CMSG}13${CEND}. ap-jakarta-雅加达           ${CMSG}14${CEND}. ap-seoul-首尔"
+    echo -e "\t ${CMSG}15${CEND}. ap-bangkok-曼谷             ${CMSG}16${CEND}. ap-tokyo-东京"
+    echo -e "\t ${CMSG}17${CEND}. na-siliconvalley-硅谷       ${CMSG}18${CEND}. na-ashburn-弗吉尼亚"
+    echo -e "\t ${CMSG}19${CEND}. na-toronto-多伦多           ${CMSG}20${CEND}. sa-saopaulo-圣保罗"
+    echo -e "\t ${CMSG}21${CEND}. eu-frankfurt-法兰克福"
     read -e -p "Please input a number:(Default 1 press Enter) " Location
     Location=${Location:-1}
-    if [[ "${Location}" =~ ^[1-9]$|^1[0-9]$|^2[0-3]$ ]]; then
+    if [[ "${Location}" =~ ^[1-9]$|^1[0-9]$|^2[0-1]$ ]]; then
       break
     else
-      echo "${CWARNING}input error! Please only input number 1~23${CEND}"
+      echo "${CWARNING}input error! Please only input number 1~21${CEND}"
     fi
   done
-  [ "${Location}" == '1' ] && REGION='ap-beijing-1'
-  [ "${Location}" == '2' ] && REGION='ap-beijing'
-  [ "${Location}" == '3' ] && REGION='ap-nanjing'
-  [ "${Location}" == '4' ] && REGION='ap-shanghai'
-  [ "${Location}" == '5' ] && REGION='ap-guangzhou'
-  [ "${Location}" == '6' ] && REGION='ap-chengdu'
-  [ "${Location}" == '7' ] && REGION='ap-chongqing'
-  [ "${Location}" == '8' ] && REGION='ap-shenzhen-fsi'
-  [ "${Location}" == '9' ] && REGION='ap-shanghai-fsi'
-  [ "${Location}" == '10' ] && REGION='ap-beijing-fsi'
-  [ "${Location}" == '11' ] && REGION='ap-hongkong'
-  [ "${Location}" == '12' ] && REGION='ap-singapore'
-  [ "${Location}" == '13' ] && REGION='ap-mumbai'
-  [ "${Location}" == '14' ] && REGION='ap-jakarta'
-  [ "${Location}" == '15' ] && REGION='ap-seoul'
-  [ "${Location}" == '16' ] && REGION='ap-bangkok'
-  [ "${Location}" == '17' ] && REGION='ap-tokyo'
-  [ "${Location}" == '18' ] && REGION='na-siliconvalley'
-  [ "${Location}" == '19' ] && REGION='na-ashburn'
-  [ "${Location}" == '20' ] && REGION='na-toronto'
-  [ "${Location}" == '21' ] && REGION='sa-saopaulo'
-  [ "${Location}" == '22' ] && REGION='eu-frankfurt'
-  [ "${Location}" == '23' ] && REGION='eu-moscow'
+  [ "${Location}" == '1' ] && REGION='ap-beijing'
+  [ "${Location}" == '2' ] && REGION='ap-nanjing'
+  [ "${Location}" == '3' ] && REGION='ap-shanghai'
+  [ "${Location}" == '4' ] && REGION='ap-guangzhou'
+  [ "${Location}" == '5' ] && REGION='ap-chengdu'
+  [ "${Location}" == '6' ] && REGION='ap-chongqing'
+  [ "${Location}" == '7' ] && REGION='ap-shenzhen-fsi'
+  [ "${Location}" == '8' ] && REGION='ap-shanghai-fsi'
+  [ "${Location}" == '9' ] && REGION='ap-beijing-fsi'
+  [ "${Location}" == '10' ] && REGION='ap-hongkong'
+  [ "${Location}" == '11' ] && REGION='ap-singapore'
+  [ "${Location}" == '12' ] && REGION='ap-mumbai'
+  [ "${Location}" == '13' ] && REGION='ap-jakarta'
+  [ "${Location}" == '14' ] && REGION='ap-seoul'
+  [ "${Location}" == '15' ] && REGION='ap-bangkok'
+  [ "${Location}" == '16' ] && REGION='ap-tokyo'
+  [ "${Location}" == '17' ] && REGION='na-siliconvalley'
+  [ "${Location}" == '18' ] && REGION='na-ashburn'
+  [ "${Location}" == '19' ] && REGION='na-toronto'
+  [ "${Location}" == '20' ] && REGION='sa-saopaulo'
+  [ "${Location}" == '21' ] && REGION='eu-frankfurt'
   while :; do echo
-    read -e -p "Please enter the Qcloud COS APPID: " APPID
-    [[ ! "${APPID}" =~ ^[0-9]+$ ]] && { echo "${CWARNING}input error, must be a number${CEND}"; continue; }
-    echo
     read -e -p "Please enter the Qcloud COS SECRET_ID: " SECRET_ID
     [ -z "${SECRET_ID}" ] && continue
     echo
@@ -322,20 +324,31 @@ if [ -n "`echo ${desc_bk} | grep -w 4`" ]; then
     echo
     read -e -p "Please enter the Qcloud COS BUCKET: " COS_BUCKET
     [ -z "${COS_BUCKET}" ] && continue
-    ${python_install_dir}/bin/coscmd config -a ${SECRET_ID} -s ${SECRET_KEY} -r ${REGION} -b ${COS_BUCKET} > /dev/null 2>&1
-    ${python_install_dir}/bin/coscmd list > /dev/null 2>&1
+    cat > ~/.cos.yaml << EOF
+cos:
+  base:
+    secretid: ${SECRET_ID}
+    secretkey: ${SECRET_KEY}
+    protocol: https
+  buckets:
+  - name: ${COS_BUCKET}
+    endpoint: cos.${REGION}.myqcloud.com
+EOF
+    coscli ls cos://${COS_BUCKET} > /dev/null 2>&1
     if [ $? -eq 0 ]; then
-      echo "${CMSG}APPID/SECRET_ID/SECRET_KEY/REGION/BUCKET OK${CEND}"
+      echo "${CMSG}SECRET_ID/SECRET_KEY/REGION/BUCKET OK${CEND}"
+      sed -i "s@^cos_bucket=.*@cos_bucket=${COS_BUCKET}@" ./options.conf
       echo
       break
     else
-      ${python_install_dir}/bin/coscmd -b ${COS_BUCKET} createbucket > /dev/null 2>&1
+      coscli mb cos://${COS_BUCKET} -e cos.${REGION}.myqcloud.com > /dev/null 2>&1
       if [ $? -eq 0 ]; then
         echo "${CMSG}Bucket ${COS_BUCKET} created${CEND}"
+        sed -i "s@^cos_bucket=.*@cos_bucket=${COS_BUCKET}@" ./options.conf
         echo
         break
       else
-        echo "${CWARNING}input error! APPID/SECRET_ID/SECRET_KEY/REGION/BUCKET invalid${CEND}"
+        echo "${CWARNING}input error! SECRET_ID/SECRET_KEY/REGION/BUCKET invalid${CEND}"
         continue
       fi
     fi
@@ -345,15 +358,15 @@ fi
 if [ -n "`echo ${desc_bk} | grep -w 5`" ]; then
   if [ ! -e "/usr/local/bin/upx" ]; then
     if [ "${armplatform}" == 'y' ]; then
-      wget -qc http://collection.b0.upaiyun.com/softwares/upx/upx_0.3.6_linux_arm64.tar.gz -O /tmp/upx_0.3.6_linux_arm64.tar.gz
-      tar xzf /tmp/upx_0.3.6_linux_arm64.tar.gz -C /tmp/
+      wget -qc http://collection.b0.upaiyun.com/softwares/upx/upx_0.4.3_linux_arm64.tar.gz -O /tmp/upx_0.4.3_linux_arm64.tar.gz
+      tar xzf /tmp/upx_0.4.3_linux_arm64.tar.gz -C /tmp/
     else
-      wget -qc http://collection.b0.upaiyun.com/softwares/upx/upx_0.3.6_linux_x86_64.tar.gz -O /tmp/upx_0.3.6_linux_x86_64.tar.gz
-      tar xzf /tmp/upx_0.3.6_linux_x86_64.tar.gz -C /tmp/
+      wget -qc http://collection.b0.upaiyun.com/softwares/upx/upx_0.4.3_linux_x86_64.tar.gz -O /tmp/upx_0.4.3_linux_x86_64.tar.gz
+      tar xzf /tmp/upx_0.4.3_linux_x86_64.tar.gz -C /tmp/
     fi
     /bin/mv /tmp/upx /usr/local/bin/upx
     chmod +x /usr/local/bin/upx
-    rm -f /tmp/upx_* /tmp/LICENSE /tmp/README.md
+    rm -f /tmp/{upx_*,LICENSE,README.md}
   fi
   while :; do echo
     read -e -p "Please enter the upyun ServiceName: " ServiceName
@@ -365,7 +378,7 @@ if [ -n "`echo ${desc_bk} | grep -w 5`" ]; then
     read -e -p "Please enter the upyun Password: " Password
     [ -z "${Password}" ] && continue
     echo
-    /usr/local/bin/upx login ${ServiceName} ${Operator} ${Password} > /dev/null 2>&1
+    upx login ${ServiceName} ${Operator} ${Password} > /dev/null 2>&1
     if [ $? = 0 ]; then
       echo "${CMSG}ServiceName/Operator/Password OK${CEND}"
       echo
@@ -379,11 +392,11 @@ fi
 if [ -n "`echo ${desc_bk} | grep -w 6`" ]; then
   if [ ! -e "/usr/local/bin/qshell" ]; then
     if [ "${armplatform}" == 'y' ]; then
-      wget -qc https://devtools.qiniu.com/qshell-v2.6.2-linux-arm64.tar.gz -O /tmp/qshell-v2.6.2-linux-arm64.tar.gz
-      tar xzf /tmp/qshell-v2.6.2-linux-arm64.tar.gz -C /usr/local/bin/
+      wget -qc https://devtools.qiniu.com/qshell-v2.12.0-linux-arm64.tar.gz -O /tmp/qshell-v2.12.0-linux-arm64.tar.gz
+      tar xzf /tmp/qshell-v2.12.0-linux-arm64.tar.gz -C /usr/local/bin/
     else
-      wget -qc https://devtools.qiniu.com/qshell-v2.6.2-linux-amd64.tar.gz -O /tmp/qshell-v2.6.2-linux-amd64.tar.gz
-      tar xzf /tmp/qshell-v2.6.2-linux-amd64.tar.gz -C /usr/local/bin/
+      wget -qc https://devtools.qiniu.com/qshell-v2.12.0-linux-amd64.tar.gz -O /tmp/qshell-v2.12.0-linux-amd64.tar.gz
+      tar xzf /tmp/qshell-v2.12.0-linux-amd64.tar.gz -C /usr/local/bin/
     fi
     chmod +x /usr/local/bin/qshell
     rm -f /tmp/qshell*
@@ -417,8 +430,8 @@ if [ -n "`echo ${desc_bk} | grep -w 6`" ]; then
     read -e -p "Please enter the qiniu bucket: " QINIU_BUCKET
     [ -z "${QINIU_BUCKET}" ] && continue
     echo
-    /usr/local/bin/qshell account ${AccessKey} ${SecretKey} backup
-    if /usr/local/bin/qshell buckets | grep -w ${QINIU_BUCKET} > /dev/null 2>&1; then
+    qshell account ${AccessKey} ${SecretKey} backup
+    if qshell buckets | grep -w ${QINIU_BUCKET} > /dev/null 2>&1; then
       sed -i "s@^qiniu_bucket=.*@qiniu_bucket=${QINIU_BUCKET}@" ./options.conf
       echo "${CMSG}AccessKey/SecretKey/Bucket OK${CEND}"
       echo
@@ -430,70 +443,91 @@ if [ -n "`echo ${desc_bk} | grep -w 6`" ]; then
 fi
 
 if [ -n "`echo ${desc_bk} | grep -w 7`" ]; then
-  Install_Python
-  [ ! -e "${python_install_dir}/bin/s3cmd" ] && ${python_install_dir}/bin/pip install s3cmd > /dev/null 2>&1
+  if [ ! -e "/usr/local/bin/aws" ] && [ ! -e "/usr/bin/aws" ]; then
+    wget -qc https://awscli.amazonaws.com/awscli-exe-linux-$(arch).zip -O /tmp/awscliv2.zip
+    unzip /tmp/awscliv2.zip -d /tmp/
+    /tmp/aws/install
+    rm -rf /tmp/{awscliv2.zip,aws}
+  fi
   while :; do echo
     echo 'Please select your backup amazon datacenter:'
     echo -e "\t ${CMSG} 1${CEND}. us-east-2                    ${CMSG} 2${CEND}. us-east-1"
     echo -e "\t ${CMSG} 3${CEND}. us-west-1                    ${CMSG} 4${CEND}. us-west-2"
-    echo -e "\t ${CMSG} 5${CEND}. ap-south-1                   ${CMSG} 6${CEND}. ap-northeast-3"
-    echo -e "\t ${CMSG} 7${CEND}. ap-northeast-2               ${CMSG} 8${CEND}. ap-southeast-1"
-    echo -e "\t ${CMSG} 9${CEND}. ap-southeast-2               ${CMSG}10${CEND}. ap-northeast-1"
-    echo -e "\t ${CMSG}11${CEND}. ca-central-1                 ${CMSG}12${CEND}. cn-north-1"
-    echo -e "\t ${CMSG}13${CEND}. cn-northwest-1               ${CMSG}14${CEND}. eu-central-1"
-    echo -e "\t ${CMSG}15${CEND}. eu-west-1                    ${CMSG}16${CEND}. eu-west-2"
-    echo -e "\t ${CMSG}17${CEND}. eu-west-3                    ${CMSG}18${CEND}. eu-north-1"
-    echo -e "\t ${CMSG}19${CEND}. sa-east-1                    ${CMSG}20${CEND}. us-gov-east-1"
-    echo -e "\t ${CMSG}21${CEND}. us-gov-west-1"
+    echo -e "\t ${CMSG} 5${CEND}. af-south-1                   ${CMSG} 6${CEND}. ap-east-1"
+    echo -e "\t ${CMSG} 7${CEND}. ap-south-2                   ${CMSG} 8${CEND}. ap-southeast-3"
+    echo -e "\t ${CMSG} 9${CEND}. ap-southeast-4               ${CMSG}10${CEND}. ap-south-1"
+    echo -e "\t ${CMSG}11${CEND}. ap-northeast-3               ${CMSG}12${CEND}. ap-northeast-2"
+    echo -e "\t ${CMSG}13${CEND}. ap-southeast-1               ${CMSG}14${CEND}. ap-southeast-2"
+    echo -e "\t ${CMSG}15${CEND}. ap-northeast-1               ${CMSG}16${CEND}. ca-central-1"
+    echo -e "\t ${CMSG}17${CEND}. eu-central-1                 ${CMSG}18${CEND}. eu-west-1"
+    echo -e "\t ${CMSG}19${CEND}. eu-west-2                    ${CMSG}20${CEND}. eu-south-1"
+    echo -e "\t ${CMSG}21${CEND}. eu-west-3                    ${CMSG}22${CEND}. eu-south-2"
+    echo -e "\t ${CMSG}23${CEND}. eu-north-1                   ${CMSG}24${CEND}. eu-central-2"
+    echo -e "\t ${CMSG}25${CEND}. me-south-1                   ${CMSG}26${CEND}. me-central-1"
+    echo -e "\t ${CMSG}27${CEND}. sa-east-1                    ${CMSG}28${CEND}. us-gov-east-1"
+    echo -e "\t ${CMSG}29${CEND}. us-gov-west-1                ${CMSG}30${CEND}. cn-north-1"
+    echo -e "\t ${CMSG}31${CEND}. cn-northwest-1"
     read -e -p "Please input a number:(Default 1 press Enter) " Location
     Location=${Location:-1}
-    if [[ "${Location}" =~ ^[1-9]$|^1[0-9]$|^2[0-1]$ ]]; then
+    if [[ "${Location}" =~ ^[1-9]$|^[1-2][0-9]$|^3[0-1]$ ]]; then
       break
     else
-      echo "${CWARNING}input error! Please only input number 1~21${CEND}"
+      echo "${CWARNING}input error! Please only input number 1~31${CEND}"
     fi
   done
   [ "${Location}" == '1' ] && REGION='us-east-2'
   [ "${Location}" == '2' ] && REGION='us-east-1'
   [ "${Location}" == '3' ] && REGION='us-west-1'
   [ "${Location}" == '4' ] && REGION='us-west-2'
-  [ "${Location}" == '5' ] && REGION='ap-south-1'
-  [ "${Location}" == '6' ] && REGION='ap-northeast-3'
-  [ "${Location}" == '7' ] && REGION='ap-northeast-2'
-  [ "${Location}" == '8' ] && REGION='ap-southeast-1'
-  [ "${Location}" == '9' ] && REGION='ap-southeast-2'
-  [ "${Location}" == '10' ] && REGION='ap-northeast-1'
-  [ "${Location}" == '11' ] && REGION='ca-central-1'
-  [ "${Location}" == '12' ] && REGION='cn-north-1'
-  [ "${Location}" == '13' ] && REGION='cn-northwest-1'
-  [ "${Location}" == '14' ] && REGION='eu-central-1'
-  [ "${Location}" == '15' ] && REGION='eu-west-1'
-  [ "${Location}" == '16' ] && REGION='eu-west-2'
-  [ "${Location}" == '17' ] && REGION='eu-west-3'
-  [ "${Location}" == '18' ] && REGION='eu-north-1'
-  [ "${Location}" == '19' ] && REGION='sa-east-1'
-  [ "${Location}" == '20' ] && REGION='us-gov-east-1'
-  [ "${Location}" == '21' ] && REGION='us-gov-west-1'
+  [ "${Location}" == '5' ] && REGION='af-south-1'
+  [ "${Location}" == '6' ] && REGION='ap-east-1'
+  [ "${Location}" == '7' ] && REGION='ap-south-2'
+  [ "${Location}" == '8' ] && REGION='ap-southeast-3'
+  [ "${Location}" == '9' ] && REGION='ap-southeast-4'
+  [ "${Location}" == '10' ] && REGION='ap-south-1'
+  [ "${Location}" == '11' ] && REGION='ap-northeast-3'
+  [ "${Location}" == '12' ] && REGION='ap-northeast-2'
+  [ "${Location}" == '13' ] && REGION='ap-southeast-1'
+  [ "${Location}" == '14' ] && REGION='ap-southeast-2'
+  [ "${Location}" == '15' ] && REGION='ap-northeast-1'
+  [ "${Location}" == '16' ] && REGION='ca-central-1'
+  [ "${Location}" == '17' ] && REGION='eu-central-1'
+  [ "${Location}" == '18' ] && REGION='eu-west-1'
+  [ "${Location}" == '19' ] && REGION='eu-west-2'
+  [ "${Location}" == '20' ] && REGION='eu-south-1'
+  [ "${Location}" == '21' ] && REGION='eu-west-3'
+  [ "${Location}" == '22' ] && REGION='eu-south-2'
+  [ "${Location}" == '23' ] && REGION='eu-north-1'
+  [ "${Location}" == '24' ] && REGION='eu-central-2'
+  [ "${Location}" == '25' ] && REGION='me-south-1'
+  [ "${Location}" == '26' ] && REGION='me-central-1'
+  [ "${Location}" == '27' ] && REGION='sa-east-1'
+  [ "${Location}" == '28' ] && REGION='us-gov-east-1'
+  [ "${Location}" == '29' ] && REGION='us-gov-west-1'
+  [ "${Location}" == '30' ] && REGION='cn-north-1'
+  [ "${Location}" == '31' ] && REGION='cn-northwest-1'
   while :; do echo
     read -e -p "Please enter the AWS Access Key: " ACCESS_KEY
     [ -z "${ACCESS_KEY}" ] && continue
     echo
     read -e -p "Please enter the AWS Access Key: " SECRET_KEY
     [ -z "${SECRET_KEY}" ] && continue
-    ${python_install_dir}/bin/s3cmd --access_key=${ACCESS_KEY} --secret_key=${SECRET_KEY} --region=${REGION} la > /dev/null 2>&1
+    aws configure set aws_access_key_id ${ACCESS_KEY}
+    aws configure set aws_secret_access_key ${SECRET_KEY}
+    aws configure set region ${REGION}
+    aws sts get-caller-identity > /dev/null 2>&1
     if [ $? -eq 0 ]; then
-      ${python_install_dir}/bin/s3cmd --configure --access_key=${ACCESS_KEY} --secret_key=${SECRET_KEY} --region=${REGION} --dump-config > ~/.s3cfg
       echo "${CMSG}ACCESS_KEY/SECRET_KEY OK${CEND}"
       while :; do echo
         read -e -p "Please enter the Amazon S3 bucket: " S3_BUCKET
         [ -z "${S3_BUCKET}" ] && continue
-        ${python_install_dir}/bin/s3cmd ls s3://${S3_BUCKET} > /dev/null 2>&1
+        aws s3 ls s3://${S3_BUCKET} > /dev/null 2>&1
         if [ $? -eq 0 ]; then
           echo "${CMSG}Bucket s3://${S3_BUCKET}/ existed${CEND}"
           sed -i "s@^s3_bucket=.*@s3_bucket=${S3_BUCKET}@" ./options.conf
           break
         else
-          ${python_install_dir}/bin/s3cmd mb s3://${S3_BUCKET} > /dev/null 2>&1
+          aws s3 mb s3://${S3_BUCKET} > /dev/null 2>&1
           if [ $? -eq 0 ]; then
             echo "${CMSG}Bucket s3://${S3_BUCKET}/ created${CEND}"
             sed -i "s@^s3_bucket=.*@s3_bucket=${S3_BUCKET}@" ./options.conf
@@ -515,9 +549,9 @@ fi
 if [ -n "`echo ${desc_bk} | grep -w 8`" ]; then
   if [ ! -e "/usr/local/bin/dbxcli" ]; then
     if [ "${armplatform}" == 'y' ]; then
-      wget -qc http://mirrors.linuxeye.com/oneinstack/src/dbxcli-linux-arm -O /usr/local/bin/dbxcli
+      wget -qc ${mirror_link}/oneinstack/src/dbxcli-linux-arm -O /usr/local/bin/dbxcli
     else
-      wget -qc http://mirrors.linuxeye.com/oneinstack/src/dbxcli-linux-amd64 -O /usr/local/bin/dbxcli
+      wget -qc ${mirror_link}/oneinstack/src/dbxcli-linux-amd64 -O /usr/local/bin/dbxcli
     fi
     chmod +x /usr/local/bin/dbxcli
   fi

+ 54 - 55
include/check_download.sh

@@ -8,12 +8,11 @@
 #       https://github.com/oneinstack/oneinstack
 
 checkDownload() {
-  mirrorLink=http://mirrors.linuxeye.com/oneinstack/src
   pushd ${oneinstack_dir}/src > /dev/null
   # icu
   if ! command -v icu-config >/dev/null 2>&1 || icu-config --version | grep '^3.' || [ "${Ubuntu_ver}" == "20" ]; then
     echo "Download icu..."
-    src_url=${mirrorLink}/icu4c-${icu4c_ver}-src.tgz && Download_src
+    src_url=${mirror_link}/oneinstack/src/icu4c-${icu4c_ver}-src.tgz && Download_src
   fi
 
   # General system utils
@@ -33,7 +32,7 @@ checkDownload() {
   # jemalloc
   if [[ ${nginx_option} =~ ^[1-3]$ ]] || [[ "${db_option}" =~ ^[1-9]$|^1[0-2]$ ]]; then
     echo "Download jemalloc..."
-    src_url=${mirrorLink}/jemalloc-${jemalloc_ver}.tar.bz2 && Download_src
+    src_url=${mirror_link}/oneinstack/src/jemalloc-${jemalloc_ver}.tar.bz2 && Download_src
   fi
 
   # nginx/tengine/openresty
@@ -45,7 +44,7 @@ checkDownload() {
     2)
       echo "Download tengine..."
       #src_url=http://tengine.taobao.org/download/tengine-${tengine_ver}.tar.gz && Download_src
-      src_url=${mirrorLink}/tengine-${tengine_ver}.tar.gz && Download_src
+      src_url=${mirror_link}/oneinstack/src/tengine-${tengine_ver}.tar.gz && Download_src
       ;;
     3)
       echo "Download openresty..."
@@ -65,27 +64,27 @@ checkDownload() {
     src_url=http://archive.apache.org/dist/httpd/httpd-${apache_ver}.tar.gz && Download_src
     src_url=http://archive.apache.org/dist/apr/apr-${apr_ver}.tar.gz && Download_src
     src_url=http://archive.apache.org/dist/apr/apr-util-${apr_util_ver}.tar.gz && Download_src
-    src_url=http://mirrors.linuxeye.com/apache/httpd/nghttp2-${nghttp2_ver}.tar.gz && Download_src
+    src_url=${mirror_link}/apache/httpd/nghttp2-${nghttp2_ver}.tar.gz && Download_src
   fi
 
   # tomcat
   case "${tomcat_option}" in
     1)
       echo "Download tomcat 10..."
-      src_url=http://mirrors.linuxeye.com/apache/tomcat/v${tomcat10_ver}/apache-tomcat-${tomcat10_ver}.tar.gz && Download_src
+      src_url=${mirror_link}/apache/tomcat/v${tomcat10_ver}/apache-tomcat-${tomcat10_ver}.tar.gz && Download_src
       ;;
     2)
       echo "Download tomcat 9..."
-      src_url=http://mirrors.linuxeye.com/apache/tomcat/v${tomcat9_ver}/apache-tomcat-${tomcat9_ver}.tar.gz && Download_src
+      src_url=${mirror_link}/apache/tomcat/v${tomcat9_ver}/apache-tomcat-${tomcat9_ver}.tar.gz && Download_src
       ;;
     3)
       echo "Download tomcat 8..."
-      src_url=http://mirrors.linuxeye.com/apache/tomcat/v${tomcat8_ver}/apache-tomcat-${tomcat8_ver}.tar.gz && Download_src
+      src_url=${mirror_link}/apache/tomcat/v${tomcat8_ver}/apache-tomcat-${tomcat8_ver}.tar.gz && Download_src
       ;;
     4)
       echo "Download tomcat 7..."
-      src_url=http://mirrors.linuxeye.com/apache/tomcat/v${tomcat7_ver}/apache-tomcat-${tomcat7_ver}.tar.gz && Download_src
-      src_url=http://mirrors.linuxeye.com/apache/tomcat/v${tomcat7_ver}/catalina-jmx-remote.jar && Download_src
+      src_url=${mirror_link}/apache/tomcat/v${tomcat7_ver}/apache-tomcat-${tomcat7_ver}.tar.gz && Download_src
+      src_url=${mirror_link}/apache/tomcat/v${tomcat7_ver}/catalina-jmx-remote.jar && Download_src
       ;;
   esac
 
@@ -100,7 +99,7 @@ checkDownload() {
       [[ "${db_option}" =~ ^[2,5,6,7]$|^10$ ]] && boost_ver=${boost_oldver}
       [[ "${db_option}" =~ ^9$ ]] && boost_ver=${boost_percona_ver}
       echo "Download boost..."
-      [ "${OUTIP_STATE}"x == "China"x ] && DOWN_ADDR_BOOST=${mirrorLink} || DOWN_ADDR_BOOST=https://downloads.sourceforge.net/project/boost/boost/${boost_ver}
+      [ "${OUTIP_STATE}"x == "China"x ] && DOWN_ADDR_BOOST=${mirror_link}/oneinstack/src || DOWN_ADDR_BOOST=https://downloads.sourceforge.net/project/boost/boost/${boost_ver}
       boostVersion2=$(echo ${boost_ver} | awk -F. '{print $1"_"$2"_"$3}')
       src_url=${DOWN_ADDR_BOOST}/boost_${boostVersion2}.tar.gz && Download_src
     fi
@@ -228,7 +227,7 @@ checkDownload() {
         elif [ "${dbinstallmethod}" == '2' ]; then
           echo "Download MySQL 5.5 source package..."
           FILE_NAME=mysql-${mysql55_ver}.tar.gz
-          src_url=${mirrorLink}/mysql-5.5-fix-arm-client_plugin.patch && Download_src
+          src_url=${mirror_link}/oneinstack/src/mysql-5.5-fix-arm-client_plugin.patch && Download_src
         fi
         # start download
         src_url=${DOWN_ADDR_MYSQL}/${FILE_NAME} && Download_src
@@ -310,17 +309,17 @@ checkDownload() {
           echo "Download Percona 8.0 source package..."
           FILE_NAME=percona-server-${percona80_ver}.tar.gz
           if [ "${OUTIP_STATE}"x == "China"x ]; then
-            DOWN_ADDR_PERCONA=${mirrorLink}
+            DOWN_ADDR_PERCONA=${mirror_link}/oneinstack/src
           else
             DOWN_ADDR_PERCONA=https://downloads.percona.com/downloads/Percona-Server-8.0/Percona-Server-${percona80_ver}/source/tarball
           fi
         fi
         # start download
         src_url=${DOWN_ADDR_PERCONA}/${FILE_NAME} && Download_src
-        src_url=${mirrorLink}/${FILE_NAME}.md5sum && Download_src
+        src_url=${mirror_link}/oneinstack/src/${FILE_NAME}.md5sum && Download_src
         # verifying download
         PERCONA_TAR_MD5=$(awk '{print $1}' ${FILE_NAME}.md5sum)
-        [ -z "${PERCONA_TAR_MD5}" ] && PERCONA_TAR_MD5=$(curl -s ${mirrorLink}/${FILE_NAME}.md5sum | grep ${FILE_NAME} | awk '{print $1}')
+        [ -z "${PERCONA_TAR_MD5}" ] && PERCONA_TAR_MD5=$(curl -s ${mirror_link}/oneinstack/src/${FILE_NAME}.md5sum | grep ${FILE_NAME} | awk '{print $1}')
         tryDlCount=0
         while [ "$(md5sum ${FILE_NAME} | awk '{print $1}')" != "${PERCONA_TAR_MD5}" ]; do
           wget -c --no-check-certificate ${DOWN_ADDR_PERCONA}/${FILE_NAME}; sleep 1
@@ -342,17 +341,17 @@ checkDownload() {
           echo "Download Percona 5.7 source package..."
           FILE_NAME=percona-server-${percona57_ver}.tar.gz
           if [ "${OUTIP_STATE}"x == "China"x ]; then
-            DOWN_ADDR_PERCONA=${mirrorLink}
+            DOWN_ADDR_PERCONA=${mirror_link}/oneinstack/src
           else
             DOWN_ADDR_PERCONA=https://downloads.percona.com/downloads/Percona-Server-5.7/Percona-Server-${percona57_ver}/source/tarball
           fi
         fi
         # start download
         src_url=${DOWN_ADDR_PERCONA}/${FILE_NAME} && Download_src
-        src_url=${mirrorLink}/${FILE_NAME}.md5sum && Download_src
+        src_url=${mirror_link}/oneinstack/src/${FILE_NAME}.md5sum && Download_src
         # verifying download
         PERCONA_TAR_MD5=$(awk '{print $1}' ${FILE_NAME}.md5sum)
-        [ -z "${PERCONA_TAR_MD5}" ] && PERCONA_TAR_MD5=$(curl -s ${mirrorLink}/${FILE_NAME}.md5sum | grep ${FILE_NAME} | awk '{print $1}')
+        [ -z "${PERCONA_TAR_MD5}" ] && PERCONA_TAR_MD5=$(curl -s ${mirror_link}/oneinstack/src/${FILE_NAME}.md5sum | grep ${FILE_NAME} | awk '{print $1}')
         tryDlCount=0
         while [ "$(md5sum ${FILE_NAME} | awk '{print $1}')" != "${PERCONA_TAR_MD5}" ]; do
           wget -c --no-check-certificate ${DOWN_ADDR_PERCONA}/${FILE_NAME}; sleep 1
@@ -375,17 +374,17 @@ checkDownload() {
           echo "Download Percona 5.6 source package..."
           FILE_NAME=percona-server-${percona56_ver}.tar.gz
           if [ "${OUTIP_STATE}"x == "China"x ]; then
-            DOWN_ADDR_PERCONA=${mirrorLink}
+            DOWN_ADDR_PERCONA=${mirror_link}/oneinstack/src
           else
             DOWN_ADDR_PERCONA=https://downloads.percona.com/downloads/Percona-Server-5.6/Percona-Server-${percona56_ver}/source/tarball
           fi
         fi
         # start download
         src_url=${DOWN_ADDR_PERCONA}/${FILE_NAME} && Download_src
-        src_url=${mirrorLink}/${FILE_NAME}.md5sum && Download_src
+        src_url=${mirror_link}/oneinstack/src/${FILE_NAME}.md5sum && Download_src
         # verifying download
         PERCONA_TAR_MD5=$(awk '{print $1}' ${FILE_NAME}.md5sum)
-        [ -z "${PERCONA_TAR_MD5}" ] && PERCONA_TAR_MD5=$(curl -s ${mirrorLink}/${FILE_NAME}.md5sum | grep ${FILE_NAME} | awk '{print $1}')
+        [ -z "${PERCONA_TAR_MD5}" ] && PERCONA_TAR_MD5=$(curl -s ${mirror_link}/oneinstack/src/${FILE_NAME}.md5sum | grep ${FILE_NAME} | awk '{print $1}')
         tryDlCount=0
         while [ "$(md5sum ${FILE_NAME} | awk '{print $1}')" != "${PERCONA_TAR_MD5}" ]; do
           wget -c --no-check-certificate ${DOWN_ADDR_PERCONA}/${FILE_NAME}; sleep 1
@@ -408,17 +407,17 @@ checkDownload() {
           echo "Download Percona 5.5 source package..."
           FILE_NAME=percona-server-${percona55_ver}.tar.gz
           if [ "${OUTIP_STATE}"x == "China"x ]; then
-            DOWN_ADDR_PERCONA=${mirrorLink}
+            DOWN_ADDR_PERCONA=${mirror_link}/oneinstack/src
           else
             DOWN_ADDR_PERCONA=https://downloads.percona.com/downloads/Percona-Server-5.5/Percona-Server-${percona55_ver}/source/tarball
           fi
         fi
         # start download
         src_url=${DOWN_ADDR_PERCONA}/${FILE_NAME} && Download_src
-        src_url=${mirrorLink}/${FILE_NAME}.md5sum && Download_src
+        src_url=${mirror_link}/oneinstack/src/${FILE_NAME}.md5sum && Download_src
         # verifying download
         PERCONA_TAR_MD5=$(awk '{print $1}' ${FILE_NAME}.md5sum)
-        [ -z "${PERCONA_TAR_MD5}" ] && PERCONA_TAR_MD5=$(curl -s ${mirrorLink}/${FILE_NAME}.md5sum | grep ${FILE_NAME} | awk '{print $1}')
+        [ -z "${PERCONA_TAR_MD5}" ] && PERCONA_TAR_MD5=$(curl -s ${mirror_link}/oneinstack/src/${FILE_NAME}.md5sum | grep ${FILE_NAME} | awk '{print $1}')
         tryDlCount=0
         while [ "$(md5sum ${FILE_NAME} | awk '{print $1}')" != "${PERCONA_TAR_MD5}" ]; do
           wget -c --no-check-certificate ${DOWN_ADDR_PERCONA}/${FILE_NAME}; sleep 1
@@ -459,7 +458,7 @@ checkDownload() {
         echo "Download MongoDB binary package..."
         FILE_NAME=mongodb-linux-x86_64-${mongodb_ver}.tgz
         if [ "${OUTIP_STATE}"x == "China"x ]; then
-          DOWN_ADDR_MongoDB=${mirrorLink}
+          DOWN_ADDR_MongoDB=${mirror_link}/oneinstack/src
         else
           DOWN_ADDR_MongoDB=https://fastdl.mongodb.org/linux
         fi
@@ -484,25 +483,25 @@ checkDownload() {
   # PHP
   if [[ "${php_option}" =~ ^[1-9]$|^1[0-2]$ ]] || [[ "${mphp_ver}" =~ ^5[3-6]$|^7[0-4]$|^8[0-2]$ ]]; then
     echo "PHP common..."
-    src_url=${mirrorLink}/libiconv-${libiconv_ver}.tar.gz && Download_src
+    src_url=${mirror_link}/oneinstack/src/libiconv-${libiconv_ver}.tar.gz && Download_src
     src_url=https://curl.haxx.se/download/curl-${curl_ver}.tar.gz && Download_src
     src_url=https://downloads.sourceforge.net/project/mhash/mhash/${mhash_ver}/mhash-${mhash_ver}.tar.gz && Download_src
     src_url=https://downloads.sourceforge.net/project/mcrypt/Libmcrypt/${libmcrypt_ver}/libmcrypt-${libmcrypt_ver}.tar.gz && Download_src
     src_url=https://downloads.sourceforge.net/project/mcrypt/MCrypt/${mcrypt_ver}/mcrypt-${mcrypt_ver}.tar.gz && Download_src
-    src_url=${mirrorLink}/freetype-${freetype_ver}.tar.gz && Download_src
+    src_url=${mirror_link}/oneinstack/src/freetype-${freetype_ver}.tar.gz && Download_src
   fi
 
   if [ "${php_option}" == '1' ] || [ "${mphp_ver}" == '53' ]; then
-    src_url=${mirrorLink}/debian_patches_disable_SSLv2_for_openssl_1_0_0.patch && Download_src
-    src_url=${mirrorLink}/php5.3patch && Download_src
+    src_url=${mirror_link}/oneinstack/src/debian_patches_disable_SSLv2_for_openssl_1_0_0.patch && Download_src
+    src_url=${mirror_link}/oneinstack/src/php5.3patch && Download_src
     src_url=https://secure.php.net/distributions/php-${php53_ver}.tar.gz && Download_src
-    src_url=${mirrorLink}/fpm-race-condition.patch && Download_src
+    src_url=${mirror_link}/oneinstack/src/fpm-race-condition.patch && Download_src
   elif [ "${php_option}" == '2' ] || [ "${mphp_ver}" == '54' ]; then
     src_url=https://secure.php.net/distributions/php-${php54_ver}.tar.gz && Download_src
-    src_url=${mirrorLink}/fpm-race-condition.patch && Download_src
+    src_url=${mirror_link}/oneinstack/src/fpm-race-condition.patch && Download_src
   elif [ "${php_option}" == '3' ] || [ "${mphp_ver}" == '55' ]; then
     src_url=https://secure.php.net/distributions/php-${php55_ver}.tar.gz && Download_src
-    src_url=${mirrorLink}/fpm-race-condition.patch && Download_src
+    src_url=${mirror_link}/oneinstack/src/fpm-race-condition.patch && Download_src
   elif [ "${php_option}" == '4' ] || [ "${mphp_ver}" == '56' ]; then
     src_url=https://secure.php.net/distributions/php-${php56_ver}.tar.gz && Download_src
   elif [ "${php_option}" == '5' ] || [ "${mphp_ver}" == '70' ]; then
@@ -511,32 +510,32 @@ checkDownload() {
     src_url=https://secure.php.net/distributions/php-${php71_ver}.tar.gz && Download_src
   elif [ "${php_option}" == '7' ] || [ "${mphp_ver}" == '72' ]; then
     src_url=https://secure.php.net/distributions/php-${php72_ver}.tar.gz && Download_src
-    src_url=http://mirrors.linuxeye.com/oneinstack/src/argon2-${argon2_ver}.tar.gz && Download_src
-    src_url=http://mirrors.linuxeye.com/oneinstack/src/libsodium-${libsodium_ver}.tar.gz && Download_src
+    src_url=${mirror_link}/oneinstack/src/argon2-${argon2_ver}.tar.gz && Download_src
+    src_url=${mirror_link}/oneinstack/src/libsodium-${libsodium_ver}.tar.gz && Download_src
   elif [ "${php_option}" == '8' ] || [ "${mphp_ver}" == '73' ]; then
     src_url=https://secure.php.net/distributions/php-${php73_ver}.tar.gz && Download_src
-    src_url=http://mirrors.linuxeye.com/oneinstack/src/argon2-${argon2_ver}.tar.gz && Download_src
-    src_url=http://mirrors.linuxeye.com/oneinstack/src/libsodium-${libsodium_ver}.tar.gz && Download_src
+    src_url=${mirror_link}/oneinstack/src/argon2-${argon2_ver}.tar.gz && Download_src
+    src_url=${mirror_link}/oneinstack/src/libsodium-${libsodium_ver}.tar.gz && Download_src
   elif [ "${php_option}" == '9' ] || [ "${mphp_ver}" == '74' ]; then
     src_url=https://secure.php.net/distributions/php-${php74_ver}.tar.gz && Download_src
-    src_url=http://mirrors.linuxeye.com/oneinstack/src/argon2-${argon2_ver}.tar.gz && Download_src
-    src_url=http://mirrors.linuxeye.com/oneinstack/src/libsodium-${libsodium_ver}.tar.gz && Download_src
-    src_url=http://mirrors.linuxeye.com/oneinstack/src/libzip-${libzip_ver}.tar.gz && Download_src
+    src_url=${mirror_link}/oneinstack/src/argon2-${argon2_ver}.tar.gz && Download_src
+    src_url=${mirror_link}/oneinstack/src/libsodium-${libsodium_ver}.tar.gz && Download_src
+    src_url=${mirror_link}/oneinstack/src/libzip-${libzip_ver}.tar.gz && Download_src
   elif [ "${php_option}" == '10' ] || [ "${mphp_ver}" == '80' ]; then
     src_url=https://secure.php.net/distributions/php-${php80_ver}.tar.gz && Download_src
-    src_url=http://mirrors.linuxeye.com/oneinstack/src/argon2-${argon2_ver}.tar.gz && Download_src
-    src_url=http://mirrors.linuxeye.com/oneinstack/src/libsodium-${libsodium_ver}.tar.gz && Download_src
-    src_url=http://mirrors.linuxeye.com/oneinstack/src/libzip-${libzip_ver}.tar.gz && Download_src
+    src_url=${mirror_link}/oneinstack/src/argon2-${argon2_ver}.tar.gz && Download_src
+    src_url=${mirror_link}/oneinstack/src/libsodium-${libsodium_ver}.tar.gz && Download_src
+    src_url=${mirror_link}/oneinstack/src/libzip-${libzip_ver}.tar.gz && Download_src
   elif [ "${php_option}" == '11' ] || [ "${mphp_ver}" == '81' ]; then
     src_url=https://secure.php.net/distributions/php-${php81_ver}.tar.gz && Download_src
-    src_url=http://mirrors.linuxeye.com/oneinstack/src/argon2-${argon2_ver}.tar.gz && Download_src
-    src_url=http://mirrors.linuxeye.com/oneinstack/src/libsodium-${libsodium_ver}.tar.gz && Download_src
-    src_url=http://mirrors.linuxeye.com/oneinstack/src/libzip-${libzip_ver}.tar.gz && Download_src
+    src_url=${mirror_link}/oneinstack/src/argon2-${argon2_ver}.tar.gz && Download_src
+    src_url=${mirror_link}/oneinstack/src/libsodium-${libsodium_ver}.tar.gz && Download_src
+    src_url=${mirror_link}/oneinstack/src/libzip-${libzip_ver}.tar.gz && Download_src
   elif [ "${php_option}" == '12' ] || [ "${mphp_ver}" == '82' ]; then
     src_url=https://secure.php.net/distributions/php-${php82_ver}.tar.gz && Download_src
-    src_url=http://mirrors.linuxeye.com/oneinstack/src/argon2-${argon2_ver}.tar.gz && Download_src
-    src_url=http://mirrors.linuxeye.com/oneinstack/src/libsodium-${libsodium_ver}.tar.gz && Download_src
-    src_url=http://mirrors.linuxeye.com/oneinstack/src/libzip-${libzip_ver}.tar.gz && Download_src
+    src_url=${mirror_link}/oneinstack/src/argon2-${argon2_ver}.tar.gz && Download_src
+    src_url=${mirror_link}/oneinstack/src/libsodium-${libsodium_ver}.tar.gz && Download_src
+    src_url=${mirror_link}/oneinstack/src/libzip-${libzip_ver}.tar.gz && Download_src
   fi
 
   # PHP OPCache
@@ -580,19 +579,19 @@ checkDownload() {
     case "${php_option}" in
       4)
         echo "Download zend loader for php 5.6..."
-        src_url=${mirrorLink}/zend-loader-php5.6-linux-x86_64.tar.gz && Download_src
+        src_url=${mirror_link}/oneinstack/src/zend-loader-php5.6-linux-x86_64.tar.gz && Download_src
         ;;
       3)
         echo "Download zend loader for php 5.5..."
-        src_url=${mirrorLink}/zend-loader-php5.5-linux-x86_64.tar.gz && Download_src
+        src_url=${mirror_link}/oneinstack/src/zend-loader-php5.5-linux-x86_64.tar.gz && Download_src
         ;;
       2)
         echo "Download zend loader for php 5.4..."
-        src_url=${mirrorLink}/ZendGuardLoader-70429-PHP-5.4-linux-glibc23-x86_64.tar.gz && Download_src
+        src_url=${mirror_link}/oneinstack/src/ZendGuardLoader-70429-PHP-5.4-linux-glibc23-x86_64.tar.gz && Download_src
         ;;
       1)
         echo "Download zend loader for php 5.3..."
-        src_url=${mirrorLink}/ZendGuardLoader-php-5.3-linux-glibc23-x86_64.tar.gz && Download_src
+        src_url=${mirror_link}/oneinstack/src/ZendGuardLoader-php-5.3-linux-glibc23-x86_64.tar.gz && Download_src
         ;;
     esac
   fi
@@ -606,13 +605,13 @@ checkDownload() {
   # SourceGuardian
   if [ "${pecl_sourceguardian}" == '1' ]; then
     echo "Download SourceGuardian..."
-    src_url=${mirrorLink}/loaders.linux-${ARCH}.tar.gz && Download_src
+    src_url=${mirror_link}/oneinstack/src/loaders.linux-${ARCH}.tar.gz && Download_src
   fi
 
   # imageMagick
   if [ "${pecl_imagick}" == '1' ]; then
     echo "Download ImageMagick..."
-    src_url=${mirrorLink}/ImageMagick-${imagemagick_ver}.tar.gz && Download_src
+    src_url=${mirror_link}/oneinstack/src/ImageMagick-${imagemagick_ver}.tar.gz && Download_src
     echo "Download imagick..."
     if [[ "${php_option}" =~ ^1$ ]]; then
       src_url=https://pecl.php.net/get/imagick-${imagick_oldver}.tgz && Download_src
@@ -654,7 +653,7 @@ checkDownload() {
   # memcached-server
   if [ "${memcached_flag}" == 'y' ]; then
     echo "Download memcached-server..."
-    [ "${OUTIP_STATE}"x == "China"x ] && DOWN_ADDR=${mirrorLink} || DOWN_ADDR=http://www.memcached.org/files
+    [ "${OUTIP_STATE}"x == "China"x ] && DOWN_ADDR=${mirror_link}/oneinstack/src || DOWN_ADDR=http://www.memcached.org/files
     src_url=${DOWN_ADDR}/memcached-${memcached_ver}.tar.gz && Download_src
   fi
 

+ 2 - 2
include/demo.sh

@@ -15,13 +15,13 @@ DEMO() {
   fi
 
   if [ -e "${php_install_dir}/bin/php" ]; then
-    src_url=http://mirrors.linuxeye.com/oneinstack/src/xprober.php && Download_src
+    src_url=${mirror_link}/oneinstack/src/xprober.php && Download_src
     /bin/cp xprober.php ${wwwroot_dir}/default
 
     echo "<?php phpinfo() ?>" > ${wwwroot_dir}/default/phpinfo.php
     case "${phpcache_option}" in
       1)
-        src_url=http://mirrors.linuxeye.com/oneinstack/src/ocp.php && Download_src
+        src_url=${mirror_link}/oneinstack/src/ocp.php && Download_src
         /bin/cp ocp.php ${wwwroot_dir}/default
         ;;
       2)

+ 11 - 8
include/fail2ban.sh

@@ -10,11 +10,14 @@
 
 Install_fail2ban() {
   pushd ${oneinstack_dir}/src > /dev/null
-  src_url=http://mirrors.linuxeye.com/oneinstack/src/fail2ban-${fail2ban_ver}.tar.gz && Download_src
+  src_url=${mirror_link}/oneinstack/src/fail2ban-${fail2ban_ver}.tar.gz && Download_src
   tar xzf fail2ban-${fail2ban_ver}.tar.gz
   pushd fail2ban-${fail2ban_ver} > /dev/null
-  sed -i 's@for i in xrange(50)@for i in range(50)@' fail2ban/__init__.py
-  ${python_install_dir}/bin/python setup.py install
+  if command -v python3 > /dev/null 2>&1; then
+    python3 setup.py install
+  else
+    python setup.py install
+  fi
   /bin/cp build/fail2ban.service /lib/systemd/system/
   systemctl enable fail2ban
   [ -z "`grep ^Port /etc/ssh/sshd_config`" ] && now_ssh_port=22 || now_ssh_port=`grep ^Port /etc/ssh/sshd_config | awk '{print $2}' | head -1`
@@ -70,14 +73,14 @@ EOF
     missingok
     notifempty
     postrotate
-      ${python_install_dir}/bin/fail2ban-client flushlogs >/dev/null || true
+      /usr/local/bin/fail2ban-client flushlogs >/dev/null || true
     endscript
 }
 EOF
   kill -9 `ps -ef | grep fail2ban | grep -v grep | awk '{print $2}'` > /dev/null 2>&1
   systemctl start fail2ban
   popd > /dev/null
-  if [ -e "${python_install_dir}/bin/fail2ban-server" ]; then
+  if [ -e "/usr/local/bin/fail2ban-server" ]; then
     echo; echo "${CSUCCESS}fail2ban installed successfully! ${CEND}"
   else
     echo; echo "${CFAILURE}fail2ban install failed, Please try again! ${CEND}"
@@ -86,8 +89,8 @@ EOF
 }
 
 Uninstall_fail2ban() {
-  service fail2ban stop
-  ${python_install_dir}/bin/pip uninstall -y fail2ban > /dev/null 2>&1
-  rm -rf /etc/init.d/fail2ban /etc/fail2ban /etc/logrotate.d/fail2ban /var/log/fail2ban.* /var/run/fail2ban
+  systemctl stop fail2ban
+  systemctl disable fail2ban
+  rm -rf /usr/local/bin/fail2ban* /etc/init.d/fail2ban /etc/fail2ban /etc/logrotate.d/fail2ban /var/log/fail2ban.* /var/run/fail2ban /lib/systemd/system/fail2ban.service
   echo; echo "${CMSG}fail2ban uninstall completed${CEND}";
 }

+ 13 - 13
include/ngx_lua_waf.sh

@@ -13,7 +13,7 @@ Nginx_lua_waf() {
   [ ! -e "${nginx_install_dir}/sbin/nginx" ] && echo "${CWARNING}Nginx is not installed on your system! ${CEND}" && exit 1
   if [ ! -e "/usr/local/lib/libluajit-5.1.so.2.1.0" ]; then
     [ -e "/usr/local/lib/libluajit-5.1.so.2.0.5" ] && find /usr/local -name *luajit* | xargs rm -rf
-    src_url=http://mirrors.linuxeye.com/oneinstack/src/luajit2-${luajit2_ver}.tar.gz && Download_src
+    src_url=${mirror_link}/oneinstack/src/luajit2-${luajit2_ver}.tar.gz && Download_src
     tar xzf luajit2-${luajit2_ver}.tar.gz
     pushd luajit2-${luajit2_ver}
     make && make install
@@ -22,14 +22,14 @@ Nginx_lua_waf() {
     rm -rf luajit2-${luajit2_ver}
   fi
 
-  src_url=http://mirrors.linuxeye.com/oneinstack/src/lua-resty-core-${lua_resty_core_ver}.tar.gz && Download_src
+  src_url=${mirror_link}/oneinstack/src/lua-resty-core-${lua_resty_core_ver}.tar.gz && Download_src
   tar xzf lua-resty-core-${lua_resty_core_ver}.tar.gz
   pushd lua-resty-core-${lua_resty_core_ver}
   make install
   popd > /dev/null
   rm -rf lua-resty-core-${lua_resty_core_ver}
 
-  src_url=http://mirrors.linuxeye.com/oneinstack/src/lua-resty-lrucache-${lua_resty_lrucache_ver}.tar.gz && Download_src
+  src_url=${mirror_link}/oneinstack/src/lua-resty-lrucache-${lua_resty_lrucache_ver}.tar.gz && Download_src
   tar xzf lua-resty-lrucache-${lua_resty_lrucache_ver}.tar.gz
   pushd lua-resty-lrucache-${lua_resty_lrucache_ver}
   make install
@@ -38,7 +38,7 @@ Nginx_lua_waf() {
 
   [ ! -h "/usr/local/share/lua/5.1" ] && { rm -rf /usr/local/share/lua/5.1 ; ln -s /usr/local/lib/lua /usr/local/share/lua/5.1; }
   if [ ! -e "/usr/local/lib/lua/5.1/cjson.so" ]; then
-    src_url=http://mirrors.linuxeye.com/oneinstack/src/lua-cjson-${lua_cjson_ver}.tar.gz && Download_src
+    src_url=${mirror_link}/oneinstack/src/lua-cjson-${lua_cjson_ver}.tar.gz && Download_src
     tar xzf lua-cjson-${lua_cjson_ver}.tar.gz
     pushd lua-cjson-${lua_cjson_ver}
     sed -i 's@^LUA_INCLUDE_DIR.*@&/luajit-2.1@' Makefile
@@ -53,9 +53,9 @@ Nginx_lua_waf() {
   if [ -z "`echo ${nginx_configure_args} | grep lua-nginx-module`" ]; then
     src_url=http://nginx.org/download/nginx-${nginx_ver}.tar.gz && Download_src
     src_url=https://www.openssl.org/source/openssl-${openssl11_ver}.tar.gz && Download_src
-    src_url=http://mirrors.linuxeye.com/oneinstack/src/pcre-${pcre_ver}.tar.gz && Download_src
-    src_url=http://mirrors.linuxeye.com/oneinstack/src/ngx_devel_kit.tar.gz && Download_src
-    src_url=http://mirrors.linuxeye.com/oneinstack/src/lua-nginx-module-${lua_nginx_module_ver}.tar.gz && Download_src
+    src_url=${mirror_link}/oneinstack/src/pcre-${pcre_ver}.tar.gz && Download_src
+    src_url=${mirror_link}/oneinstack/src/ngx_devel_kit.tar.gz && Download_src
+    src_url=${mirror_link}/oneinstack/src/lua-nginx-module-${lua_nginx_module_ver}.tar.gz && Download_src
     tar xzf nginx-${nginx_ver}.tar.gz
     tar xzf openssl-${openssl11_ver}.tar.gz
     tar xzf pcre-${pcre_ver}.tar.gz
@@ -91,7 +91,7 @@ Tengine_lua_waf() {
   [ ! -e "${tengine_install_dir}/sbin/nginx" ] && echo "${CWARNING}Tengine is not installed on your system! ${CEND}" && exit 1
   if [ ! -e "/usr/local/lib/libluajit-5.1.so.2.1.0" ]; then
     [ -e "/usr/local/lib/libluajit-5.1.so.2.0.5" ] && find /usr/local -name *luajit* | xargs rm -rf
-    src_url=http://mirrors.linuxeye.com/oneinstack/src/luajit2-${luajit2_ver}.tar.gz && Download_src
+    src_url=${mirror_link}/oneinstack/src/luajit2-${luajit2_ver}.tar.gz && Download_src
     tar xzf luajit2-${luajit2_ver}.tar.gz
     pushd luajit2-${luajit2_ver}
     make && make install
@@ -99,7 +99,7 @@ Tengine_lua_waf() {
     popd > /dev/null
   fi
   if [ ! -e "/usr/local/lib/lua/5.1/cjson.so" ]; then
-    src_url=http://mirrors.linuxeye.com/oneinstack/src/lua-cjson-${lua_cjson_ver}.tar.gz && Download_src
+    src_url=${mirror_link}/oneinstack/src/lua-cjson-${lua_cjson_ver}.tar.gz && Download_src
     tar xzf lua-cjson-${lua_cjson_ver}.tar.gz
     pushd lua-cjson-${lua_cjson_ver}
     sed -i 's@^LUA_INCLUDE_DIR.*@&/luajit-2.1@' Makefile
@@ -114,9 +114,9 @@ Tengine_lua_waf() {
   if [ -z "`echo ${tengine_configure_args} | grep lua`" ]; then
     src_url=http://tengine.taobao.org/download/tengine-${tengine_ver}.tar.gz && Download_src
     src_url=https://www.openssl.org/source/openssl-${openssl11_ver}.tar.gz && Download_src
-    src_url=http://mirrors.linuxeye.com/oneinstack/src/pcre-${pcre_ver}.tar.gz && Download_src
-    src_url=http://mirrors.linuxeye.com/oneinstack/src/ngx_devel_kit.tar.gz && Download_src
-    src_url=http://mirrors.linuxeye.com/oneinstack/src/lua-nginx-module.tar.gz && Download_src
+    src_url=${mirror_link}/oneinstack/src/pcre-${pcre_ver}.tar.gz && Download_src
+    src_url=${mirror_link}/oneinstack/src/ngx_devel_kit.tar.gz && Download_src
+    src_url=${mirror_link}/oneinstack/src/lua-nginx-module.tar.gz && Download_src
     tar xzf tengine-${tengine_ver}.tar.gz
     tar xzf openssl-${openssl11_ver}.tar.gz
     tar xzf pcre-${pcre_ver}.tar.gz
@@ -153,7 +153,7 @@ enable_lua_waf() {
   pushd ${oneinstack_dir}/src > /dev/null
   . ../include/check_dir.sh
   rm -f ngx_lua_waf.tar.gz
-  src_url=http://mirrors.linuxeye.com/oneinstack/src/ngx_lua_waf.tar.gz && Download_src
+  src_url=${mirror_link}/oneinstack/src/ngx_lua_waf.tar.gz && Download_src
   tar xzf ngx_lua_waf.tar.gz -C ${web_install_dir}/conf
   [ -e "${web_install_dir}/conf/resty" ] && /bin/mv ${web_install_dir}/conf/resty{,_bak}
   sed -i "s@/usr/local/nginx@${web_install_dir}@g" ${web_install_dir}/conf/waf.conf

+ 1 - 1
include/pecl_phalcon.sh

@@ -24,7 +24,7 @@ Install_pecl_phalcon() {
       make -j ${THREAD} && make install
       popd > /dev/null
     elif [[ "${PHP_main_ver}" =~ ^5.[5-6]$|^7.[0-1]$ ]]; then
-      src_url=http://mirrors.linuxeye.com/oneinstack/src/cphalcon-${phalcon_oldver}.tar.gz && Download_src
+      src_url=${mirror_link}/oneinstack/src/cphalcon-${phalcon_oldver}.tar.gz && Download_src
       tar xzf cphalcon-${phalcon_oldver}.tar.gz
       pushd cphalcon-${phalcon_oldver}/build > /dev/null
       echo "${CMSG}It may take a few minutes... ${CEND}"

+ 1 - 1
include/pecl_xdebug.sh

@@ -29,7 +29,7 @@ Install_pecl_xdebug() {
       make -j ${THREAD} && make install
       popd > /dev/null
       if [ -f "${phpExtensionDir}/xdebug.so" ]; then
-        src_url=http://mirrors.linuxeye.com/oneinstack/src/webgrind-master.zip && Download_src
+        src_url=${mirror_link}/oneinstack/src/webgrind-master.zip && Download_src
         unzip -q webgrind-master.zip
         /bin/mv webgrind-master ${wwwroot_dir}/default/webgrind
         [ ! -e /tmp/xdebug ] && { mkdir /tmp/xdebug; chown ${run_user}:${run_group} /tmp/xdebug; }

+ 2 - 2
include/php-5.3.sh

@@ -94,7 +94,7 @@ Install_PHP53() {
   patch -p1 < ../debian_patches_disable_SSLv2_for_openssl_1_0_0.patch
   make clean
   [ ! -d "${php_install_dir}" ] && mkdir -p ${php_install_dir}
-  { [ ${Debian_ver} -ge 10 >/dev/null 2>&1 ] || [ ${Ubuntu_ver} -ge 19 >/dev/null 2>&1 ]; } || intl_modules_options='--enable-intl'
+  { [ ${RHEL_ver} -ge 9 >/dev/null 2>&1 ] || [ ${Debian_ver} -ge 10 >/dev/null 2>&1 ] || [ ${Ubuntu_ver} -ge 19 >/dev/null 2>&1 ]; } || intl_modules_options='--enable-intl'
   if [ "${apache_mode_option}" == '2' ]; then
     ./configure --prefix=${php_install_dir} --with-config-file-path=${php_install_dir}/etc \
     --with-config-file-scan-dir=${php_install_dir}/etc/php.d \
@@ -118,7 +118,7 @@ Install_PHP53() {
     --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-ftp --with-xsl ${intl_modules_options} \
     --with-gettext --enable-zip --enable-soap --disable-debug ${php_modules_options}
   fi
-  { [ ${Debian_ver} -ge 10 >/dev/null 2>&1 ] || [ ${Ubuntu_ver} -ge 19 >/dev/null 2>&1 ]; } || sed -i '/^BUILD_/ s/\$(CC)/\$(CXX)/g' Makefile
+  { [ ${RHEL_ver} -ge 9 >/dev/null 2>&1 ] || [ ${Debian_ver} -ge 10 >/dev/null 2>&1 ] || [ ${Ubuntu_ver} -ge 19 >/dev/null 2>&1 ]; } || sed -i '/^BUILD_/ s/\$(CC)/\$(CXX)/g' Makefile
   make ZEND_EXTRA_LIBS='-liconv' -j ${THREAD}
   make install
 

+ 1 - 1
include/php-5.4.sh

@@ -92,7 +92,7 @@ Install_PHP54() {
   pushd php-${php54_ver} > /dev/null
   make clean
   [ ! -d "${php_install_dir}" ] && mkdir -p ${php_install_dir}
-  { [ ${Debian_ver} -ge 10 >/dev/null 2>&1 ] || [ ${Ubuntu_ver} -ge 19 >/dev/null 2>&1 ]; } || intl_modules_options='--enable-intl'
+  { [ ${RHEL_ver} -ge 9 >/dev/null 2>&1 ] || [ ${Debian_ver} -ge 10 >/dev/null 2>&1 ] || [ ${Ubuntu_ver} -ge 19 >/dev/null 2>&1 ]; } || intl_modules_options='--enable-intl'
   if [ "${apache_mode_option}" == '2' ]; then
     ./configure --prefix=${php_install_dir} --with-config-file-path=${php_install_dir}/etc \
     --with-config-file-scan-dir=${php_install_dir}/etc/php.d \

+ 1 - 1
include/php-5.5.sh

@@ -90,7 +90,7 @@ Install_PHP55() {
   patch -d php-${php55_ver} -p0 < fpm-race-condition.patch
   pushd php-${php55_ver} > /dev/null
   [ ! -d "${php_install_dir}" ] && mkdir -p ${php_install_dir}
-  { [ ${Debian_ver} -ge 10 >/dev/null 2>&1 ] || [ ${Ubuntu_ver} -ge 19 >/dev/null 2>&1 ]; } || intl_modules_options='--enable-intl'
+  { [ ${RHEL_ver} -ge 9 >/dev/null 2>&1 ] || [ ${Debian_ver} -ge 10 >/dev/null 2>&1 ] || [ ${Ubuntu_ver} -ge 19 >/dev/null 2>&1 ]; } || intl_modules_options='--enable-intl'
   [ "${phpcache_option}" == '1' ] && phpcache_arg='--enable-opcache' || phpcache_arg='--disable-opcache'
   if [ "${apache_mode_option}" == '2' ]; then
     ./configure --prefix=${php_install_dir} --with-config-file-path=${php_install_dir}/etc \

+ 1 - 1
include/php-5.6.sh

@@ -91,7 +91,7 @@ Install_PHP56() {
   pushd php-${php56_ver} > /dev/null
   make clean
   [ ! -d "${php_install_dir}" ] && mkdir -p ${php_install_dir}
-  { [ ${Debian_ver} -ge 10 >/dev/null 2>&1 ] || [ ${Ubuntu_ver} -ge 19 >/dev/null 2>&1 ]; } || intl_modules_options='--enable-intl'
+  { [ ${RHEL_ver} -ge 9 >/dev/null 2>&1 ] || [ ${Debian_ver} -ge 10 >/dev/null 2>&1 ] || [ ${Ubuntu_ver} -ge 19 >/dev/null 2>&1 ]; } || intl_modules_options='--enable-intl'
   [ "${phpcache_option}" == '1' ] && phpcache_arg='--enable-opcache' || phpcache_arg='--disable-opcache'
   if [ "${apache_mode_option}" == '2' ]; then
     ./configure --prefix=${php_install_dir} --with-config-file-path=${php_install_dir}/etc \

+ 0 - 75
include/python.sh

@@ -1,75 +0,0 @@
-#!/bin/bash
-# Author:  yeho <lj2007331 AT gmail.com>
-# BLOG:  https://linuxeye.com
-#
-# Notes: OneinStack for CentOS/RedHat 7+ Debian 9+ and Ubuntu 16+
-#
-# Project home page:
-#       https://oneinstack.com
-#       https://github.com/oneinstack/oneinstack
-
-Install_Python() {
-  if [ -e "${python_install_dir}/bin/python" ]; then
-    echo "${CWARNING}Python already installed! ${CEND}"
-  else
-    pushd ${oneinstack_dir}/src > /dev/null
-
-    if [ "${PM}" == 'yum' ]; then
-      [ -z "`grep -w epel /etc/yum.repos.d/*.repo`" ] && yum -y install epel-release
-      pkgList="gcc dialog augeas-libs openssl openssl-devel libffi-devel redhat-rpm-config ca-certificates"
-      for Package in ${pkgList}; do
-        yum -y install ${Package}
-      done
-    elif [ "${PM}" == 'apt-get' ]; then
-      pkgList="gcc dialog libaugeas0 augeas-lenses libssl-dev libffi-dev ca-certificates"
-      for Package in ${pkgList}; do
-        apt-get -y install $Package
-      done
-    fi
-
-    # Install Python3
-    if [ ! -e "${python_install_dir}/bin/python" -a ! -e "${python_install_dir}/bin/python3" ] ;then
-      src_url=http://mirrors.linuxeye.com/oneinstack/src/Python-${python_ver}.tgz && Download_src
-      tar xzf Python-${python_ver}.tgz
-      pushd Python-${python_ver} > /dev/null
-      ./configure --prefix=${python_install_dir}
-      make && make install
-      [ ! -e "${python_install_dir}/bin/python" -a -e "${python_install_dir}/bin/python3" ] && ln -s ${python_install_dir}/bin/python{3,}
-      [ ! -e "${python_install_dir}/bin/pip" -a -e "${python_install_dir}/bin/pip3" ] && ln -s ${python_install_dir}/bin/pip{3,}
-      popd > /dev/null
-    fi
-
-    if [ ! -e "${python_install_dir}/bin/pip" ]; then
-      src_url=http://mirrors.linuxeye.com/oneinstack/src/setuptools-${setuptools_ver}.zip && Download_src
-      src_url=http://mirrors.linuxeye.com/oneinstack/src/pip-${pip_ver}.tar.gz && Download_src
-      unzip -q setuptools-${setuptools_ver}.zip
-      tar xzf pip-${pip_ver}.tar.gz
-      pushd setuptools-${setuptools_ver} > /dev/null
-      ${python_install_dir}/bin/python setup.py install
-      popd > /dev/null
-      pushd pip-${pip_ver} > /dev/null
-      ${python_install_dir}/bin/python setup.py install
-      popd > /dev/null
-    fi
-
-    if [ ! -e "/root/.pip/pip.conf" ] ;then
-      if [ "${OUTIP_STATE}"x == "China"x ]; then
-        [ ! -d "/root/.pip" ] && mkdir /root/.pip
-        echo -e "[global]\nindex-url = https://pypi.tuna.tsinghua.edu.cn/simple" > /root/.pip/pip.conf
-      fi
-    fi
-
-    if [ -e "${python_install_dir}/bin/python3" ]; then
-      echo "${CSUCCESS}Python ${python_ver} installed successfully! ${CEND}"
-      rm -rf Python-${python_ver}
-    fi
-    popd > /dev/null
-  fi
-}
-
-Uninstall_Python() {
-  if [ -e "${python_install_dir}/bin/python" ]; then
-    echo "${CMSG}Python uninstall completed${CEND}"
-    rm -rf ${python_install_dir}
-  fi
-}

+ 1 - 1
include/upgrade_memcached.sh

@@ -19,7 +19,7 @@ Upgrade_Memcached() {
     [ "${memcached_flag}" != 'y' ] && read -e -p "Please input upgrade Memcached Version(default: ${Latest_memcached_ver}): " NEW_memcached_ver
     NEW_memcached_ver=${NEW_memcached_ver:-${Latest_memcached_ver}}
     if [ "${NEW_memcached_ver}" != "${OLD_memcached_ver}" ]; then
-      [ "${OUTIP_STATE}"x == "China"x ] && DOWN_ADDR=http://mirrors.linuxeye.com/oneinstack/src || DOWN_ADDR=http://www.memcached.org/files
+      [ "${OUTIP_STATE}"x == "China"x ] && DOWN_ADDR=${mirror_link}/oneinstack/src || DOWN_ADDR=http://www.memcached.org/files
       [ ! -e "memcached-${NEW_memcached_ver}.tar.gz" ] && wget --no-check-certificate -c ${DOWN_ADDR}/memcached-${NEW_memcached_ver}.tar.gz > /dev/null 2>&1
       if [ -e "memcached-${NEW_memcached_ver}.tar.gz" ]; then
         echo "Download [${CMSG}memcached-${NEW_memcached_ver}.tar.gz${CEND}] successfully! "

+ 3 - 3
include/upgrade_oneinstack.sh

@@ -10,13 +10,13 @@
 
 Upgrade_OneinStack() {
   pushd ${oneinstack_dir} > /dev/null
-  Latest_OneinStack_MD5=$(curl --connect-timeout 3 -m 5 -s http://mirrors.linuxeye.com/md5sum.txt | grep oneinstack.tar.gz | awk '{print $1}')
+  Latest_OneinStack_MD5=$(curl --connect-timeout 3 -m 5 -s ${mirror_link}/md5sum.txt | grep oneinstack.tar.gz | awk '{print $1}')
   [ ! -e README.md ] && ois_flag=n
   if [ "${oneinstack_md5}" != "${Latest_OneinStack_MD5}" ]; then
     /bin/mv options.conf /tmp
     sed -i '/oneinstack_dir=/d' /tmp/options.conf
     [ -e /tmp/oneinstack.tar.gz ] && rm -rf /tmp/oneinstack.tar.gz
-    wget --no-check-certificate -qc http://mirrors.linuxeye.com/oneinstack.tar.gz -O /tmp/oneinstack.tar.gz
+    wget --no-check-certificate -qc ${mirror_link}/oneinstack.tar.gz -O /tmp/oneinstack.tar.gz
     if [ -n "`echo ${oneinstack_dir} | grep lnmp`" ]; then
       tar xzf /tmp/oneinstack.tar.gz -C /tmp
       /bin/cp -R /tmp/oneinstack/* ${oneinstack_dir}/
@@ -37,7 +37,7 @@ Upgrade_OneinStack() {
     sed -i "s@^oneinstack_md5=.*@oneinstack_md5=${Latest_OneinStack_MD5}@" ./options.conf
     if [ -e "change_jdk_version.sh" ]; then
       rm -f change_jdk_version.sh
-      wget -qc http://mirrors.linuxeye.com/scripts/change_jdk_version.sh
+      wget -qc ${mirror_link}/scripts/change_jdk_version.sh
       chmod +x change_jdk_version.sh
     fi
     if [ -e "${php_install_dir}/sbin/php-fpm" ]; then

+ 4 - 2
include/upgrade_php.sh

@@ -12,7 +12,9 @@ Upgrade_PHP() {
   pushd ${oneinstack_dir}/src > /dev/null
   [ ! -e "${php_install_dir}" ] && echo "${CWARNING}PHP is not installed on your system! ${CEND}" && exit 1
   OLD_php_ver=`${php_install_dir}/bin/php-config --version`
-  Latest_php_ver=`curl --connect-timeout 2 -m 3 -s https://www.php.net/releases/active.php | python -mjson.tool | awk '/version/{print $2}' | sed 's/"//g' | grep "${OLD_php_ver%.*}"`
+  pythonCtl=python
+  command -v python3 > /dev/null 2>&1 && pythonCtl=python3
+  Latest_php_ver=`curl --connect-timeout 2 -m 3 -s https://www.php.net/releases/active.php | ${pythonCtl} -mjson.tool | awk '/version/{print $2}' | sed 's/"//g' | grep "${OLD_php_ver%.*}"`
   Latest_php_ver=${Latest_php_ver:-5.5.38}
   echo
   echo "Current PHP Version: ${CMSG}$OLD_php_ver${CEND}"
@@ -40,7 +42,7 @@ Upgrade_PHP() {
       char=`get_char`
     fi
     tar xzf php-${NEW_php_ver}.tar.gz
-    src_url=http://mirrors.linuxeye.com/oneinstack/src/fpm-race-condition.patch && Download_src
+    src_url=${mirror_link}/oneinstack/src/fpm-race-condition.patch && Download_src
     patch -d php-${NEW_php_ver} -p0 < fpm-race-condition.patch
     pushd php-${NEW_php_ver}
     if [[ "${OLD_php_ver%.*}" =~ ^7.[1-4]$|^8.[0-1]$ ]] && [ -e ext/openssl/openssl.c ] && ! grep -Eqi '^#ifdef RSA_SSLV23_PADDING' ext/openssl/openssl.c; then

+ 10 - 10
include/upgrade_web.sh

@@ -24,9 +24,9 @@ Upgrade_Nginx() {
       [ ! -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-${openssl11_ver}.tar.gz && Download_src
-        src_url=http://mirrors.linuxeye.com/oneinstack/src/pcre-${pcre_ver}.tar.gz && Download_src
-        src_url=http://mirrors.linuxeye.com/oneinstack/src/ngx_devel_kit.tar.gz && Download_src
-        src_url=http://mirrors.linuxeye.com/oneinstack/src/lua-nginx-module-${lua_nginx_module_ver}.tar.gz && Download_src
+        src_url=${mirror_link}/oneinstack/src/pcre-${pcre_ver}.tar.gz && Download_src
+        src_url=${mirror_link}/oneinstack/src/ngx_devel_kit.tar.gz && Download_src
+        src_url=${mirror_link}/oneinstack/src/lua-nginx-module-${lua_nginx_module_ver}.tar.gz && Download_src
         tar xzf openssl-${openssl11_ver}.tar.gz
         tar xzf pcre-${pcre_ver}.tar.gz
         tar xzf ngx_devel_kit.tar.gz
@@ -54,21 +54,21 @@ Upgrade_Nginx() {
     nginx_configure_args=`echo ${nginx_configure_args_tmp} | sed "s@lua-nginx-module-\w.\w\+.\w\+ @lua-nginx-module-${lua_nginx_module_ver} @" | sed "s@lua-nginx-module @lua-nginx-module-${lua_nginx_module_ver} @" | sed "s@--with-openssl=../openssl-\w.\w.\w\+ @--with-openssl=../openssl-${openssl11_ver} @" | sed "s@--with-pcre=../pcre-\w.\w\+ @--with-pcre=../pcre-${pcre_ver} @"`
     if [ -n "`echo $nginx_configure_args | grep lua-nginx-module`" ]; then
       ${oneinstack_dir}/upgrade.sh --oneinstack > /dev/null
-      src_url=http://mirrors.linuxeye.com/oneinstack/src/luajit2-${luajit2_ver}.tar.gz && Download_src
+      src_url=${mirror_link}/oneinstack/src/luajit2-${luajit2_ver}.tar.gz && Download_src
       tar xzf luajit2-${luajit2_ver}.tar.gz
       pushd luajit2-${luajit2_ver}
       make && make install
       popd > /dev/null
       rm -rf luajit2-${luajit2_ver}
 
-      src_url=http://mirrors.linuxeye.com/oneinstack/src/lua-resty-core-${lua_resty_core_ver}.tar.gz && Download_src
+      src_url=${mirror_link}/oneinstack/src/lua-resty-core-${lua_resty_core_ver}.tar.gz && Download_src
       tar xzf lua-resty-core-${lua_resty_core_ver}.tar.gz
       pushd lua-resty-core-${lua_resty_core_ver}
       make install
       popd > /dev/null
       rm -rf lua-resty-core-${lua_resty_core_ver}
 
-      src_url=http://mirrors.linuxeye.com/oneinstack/src/lua-resty-lrucache-${lua_resty_lrucache_ver}.tar.gz && Download_src
+      src_url=${mirror_link}/oneinstack/src/lua-resty-lrucache-${lua_resty_lrucache_ver}.tar.gz && Download_src
       tar xzf lua-resty-lrucache-${lua_resty_lrucache_ver}.tar.gz
       pushd lua-resty-lrucache-${lua_resty_lrucache_ver}
       make install
@@ -115,7 +115,7 @@ Upgrade_Tengine() {
       [ ! -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-${openssl11_ver}.tar.gz && Download_src
-        src_url=http://mirrors.linuxeye.com/oneinstack/src/pcre-${pcre_ver}.tar.gz && Download_src
+        src_url=${mirror_link}/oneinstack/src/pcre-${pcre_ver}.tar.gz && Download_src
         tar xzf openssl-${openssl11_ver}.tar.gz
         tar xzf pcre-${pcre_ver}.tar.gz
         echo "Download [${CMSG}tengine-${NEW_tengine_ver}.tar.gz${CEND}] successfully! "
@@ -180,7 +180,7 @@ Upgrade_OpenResty() {
       [ ! -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-${openssl11_ver}.tar.gz && Download_src
-        src_url=http://mirrors.linuxeye.com/oneinstack/src/pcre-${pcre_ver}.tar.gz && Download_src
+        src_url=${mirror_link}/oneinstack/src/pcre-${pcre_ver}.tar.gz && Download_src
         tar xzf openssl-${openssl11_ver}.tar.gz
         tar xzf pcre-${pcre_ver}.tar.gz
         echo "Download [${CMSG}openresty-${NEW_openresy_ver}.tar.gz${CEND}] successfully! "
@@ -315,10 +315,10 @@ Upgrade_Tomcat() {
     if [ "`echo ${NEW_tomcat_ver} | awk -F. '{print $1}'`" == "${Tomcat_flag}" ]; then
       rm -f catalina-jmx-remote.jar
       echo "Download tomcat-${NEW_tomcat_ver}..."
-      src_url=http://mirrors.linuxeye.com/apache/tomcat/v${NEW_tomcat_ver}/apache-tomcat-${NEW_tomcat_ver}.tar.gz && Download_src
+      src_url=${mirror_link}/apache/tomcat/v${NEW_tomcat_ver}/apache-tomcat-${NEW_tomcat_ver}.tar.gz && Download_src
       [ ! -e "apache-tomcat-${NEW_tomcat_ver}.tar.gz" ] && wget --no-check-certificate -c https://archive.apache.org/dist/tomcat-${OLD_tomcat_ver}/v${NEW_tomcat_ver}/bin/apache-tomcat-${NEW_tomcat_ver}.tar.gz > /dev/null 2>&1
       if [ -e "${tomcat_install_dir}/lib/catalina-jmx-remote.jar" ]; then
-        src_url=http://mirrors.linuxeye.com/apache/tomcat/v${NEW_tomcat_ver}/catalina-jmx-remote.jar && Download_src
+        src_url=${mirror_link}/apache/tomcat/v${NEW_tomcat_ver}/catalina-jmx-remote.jar && Download_src
         [ ! -e "catalina-jmx-remote.jar" ] && wget --no-check-certificate -c https://archive.apache.org/dist/tomcat-${OLD_tomcat_ver}/v${NEW_tomcat_ver}/bin/extras/catalina-jmx-remote.jar > /dev/null 2>&1
       fi
       if [ -e "apache-tomcat-${NEW_tomcat_ver}.tar.gz" ]; then

+ 1 - 11
install.sh

@@ -66,14 +66,13 @@ Show_Help() {
   --redis                     Install Redis
   --memcached                 Install Memcached
   --phpmyadmin                Install phpMyAdmin
-  --python                    Install Python (PATH: ${python_install_dir})
   --ssh_port [No.]            SSH port
   --firewall                  Enable firewall
   --reboot                    Restart the server after installation
   "
 }
 ARG_NUM=$#
-TEMP=`getopt -o hvV --long help,version,nginx_option:,apache,apache_mode_option:,apache_mpm_option:,php_option:,mphp_ver:,mphp_addons,phpcache_option:,php_extensions:,nodejs,tomcat_option:,jdk_option:,db_option:,dbrootpwd:,dbinstallmethod:,pureftpd,redis,memcached,phpmyadmin,python,ssh_port:,firewall,reboot -- "$@" 2>/dev/null`
+TEMP=`getopt -o hvV --long help,version,nginx_option:,apache,apache_mode_option:,apache_mpm_option:,php_option:,mphp_ver:,mphp_addons,phpcache_option:,php_extensions:,nodejs,tomcat_option:,jdk_option:,db_option:,dbrootpwd:,dbinstallmethod:,pureftpd,redis,memcached,phpmyadmin,ssh_port:,firewall,reboot -- "$@" 2>/dev/null`
 [ $? != 0 ] && echo "${CWARNING}ERROR: unknown argument! ${CEND}" && Show_Help && exit 1
 eval set -- "${TEMP}"
 while :; do
@@ -191,9 +190,6 @@ while :; do
       phpmyadmin_flag=y; shift 1
       [ -d "${wwwroot_dir}/default/phpMyAdmin" ] && { echo "${CWARNING}phpMyAdmin already installed! ${CEND}"; unset phpmyadmin_flag; }
       ;;
-    --python)
-      python_flag=y; shift 1
-      ;;
     --ssh_port)
       ssh_port=$2; shift 2
       ;;
@@ -1126,12 +1122,6 @@ fi
 # get web_install_dir and db_install_dir
 . include/check_dir.sh
 
-# Python
-if [ "${python_flag}" == 'y' ]; then
-  . include/python.sh
-  Install_Python 2>&1 | tee -a ${oneinstack_dir}/install.log
-fi
-
 # Starting DB
 [ -d "/etc/mysql" ] && /bin/mv /etc/mysql{,_bk}
 [ -d "${db_install_dir}/support-files" ] && [ -z "`ps -ef | grep mysqld_safe | grep -v grep`" ] && service mysqld start

+ 6 - 2
options.conf

@@ -1,3 +1,6 @@
+# mirror link
+mirror_link=http://mirrors.linuxeye.com
+
 # set the default timezone
 timezone=Asia/Shanghai
 
@@ -29,8 +32,6 @@ memcached_install_dir=/usr/local/memcached
 
 redis_install_dir=/usr/local/redis
 
-python_install_dir=/usr/local/python
-
 openssl_install_dir=/usr/local/openssl
 imagick_install_dir=/usr/local/imagemagick
 gmagick_install_dir=/usr/local/graphicsmagick
@@ -83,6 +84,9 @@ backup_content=
 # aliyun OSS Bucket, You can't change
 oss_bucket=
 
+# qcloud OSS Bucket, You can't change
+cos_bucket=
+
 # qiniu Bucket, You can't change
 qiniu_bucket=
 

+ 5 - 5
reset_db_root_password.sh

@@ -94,16 +94,16 @@ Reset_force_dbrootpwd() {
     sleep 1
   done
   echo "${CMSG}skip grant tables...${CEND}"
-  ${db_install_dir}/bin/mysqld_safe --skip-grant-tables > /dev/null 2>&1 &
-  sleep 5
+  sed -i '/\[mysqld\]/a\skip-grant-tables' /etc/my.cnf
+  service mysqld start > /dev/null 2>&1
+  sed -i '/^skip-grant-tables/d' /etc/my.cnf
   while [ -z "`ps -ef | grep 'mysqld ' | grep -v grep | awk '{print $2}'`" ]; do
     sleep 1
   done
-  if echo "${DB_Ver}" | grep -Eqi '^8.0.|^5.7.|^10.2.'; then
+  if echo "${DB_Ver}" | grep -Eqi '^8.0.|^5.7.|^10.[4-5].|^10.11.'; then
     ${db_install_dir}/bin/mysql -uroot -hlocalhost << EOF
+update mysql.user set authentication_string=password("${New_dbrootpwd}") where user="root";
 flush privileges;
-alter user 'root'@'localhost' identified by "${New_dbrootpwd}";
-alter user 'root'@'127.0.0.1' identified by "${New_dbrootpwd}";
 EOF
   else
     ${db_install_dir}/bin/mysql -uroot -hlocalhost << EOF

+ 3 - 22
uninstall.sh

@@ -48,13 +48,12 @@ Show_Help() {
   --redis                       Uninstall Redis-server
   --memcached                   Uninstall Memcached-server
   --phpmyadmin                  Uninstall phpMyAdmin
-  --python                      Uninstall Python (PATH: ${python_install_dir})
   --node                        Uninstall Nodejs (PATH: ${nodejs_install_dir})
   "
 }
 
 ARG_NUM=$#
-TEMP=`getopt -o hvVq --long help,version,quiet,all,web,mysql,postgresql,mongodb,php,mphp_ver:,allphp,phpcache,php_extensions:,pureftpd,redis,memcached,phpmyadmin,python,node -- "$@" 2>/dev/null`
+TEMP=`getopt -o hvVq --long help,version,quiet,all,web,mysql,postgresql,mongodb,php,mphp_ver:,allphp,phpcache,php_extensions:,pureftpd,redis,memcached,phpmyadmin,node -- "$@" 2>/dev/null`
 [ $? != 0 ] && echo "${CWARNING}ERROR: unknown argument! ${CEND}" && Show_Help && exit 1
 eval set -- "${TEMP}"
 while :; do
@@ -80,7 +79,6 @@ while :; do
       redis_flag=y
       memcached_flag=y
       phpmyadmin_flag=y
-      python_flag=y
       shift 1
       ;;
     --web)
@@ -144,9 +142,6 @@ while :; do
     --phpmyadmin)
       phpmyadmin_flag=y; shift 1
       ;;
-    --python)
-      python_flag=y; shift 1
-      ;;
     --)
       shift
       ;;
@@ -563,10 +558,6 @@ Uninstall_openssl() {
   [ -d "${openssl_install_dir}" ] && rm -rf ${openssl_install_dir}
 }
 
-Print_Python() {
-  [ -d "${python_install_dir}" ] && echo ${python_install_dir}
-}
-
 Print_Nodejs() {
   [ -e "${nodejs_install_dir}" ] && echo ${nodejs_install_dir}
   [ -e "/etc/profile.d/nodejs.sh" ] && echo /etc/profile.d/nodejs.sh
@@ -588,14 +579,13 @@ What Are You Doing?
 \t${CMSG} 9${CEND}. Uninstall Redis
 \t${CMSG}10${CEND}. Uninstall Memcached
 \t${CMSG}11${CEND}. Uninstall phpMyAdmin
-\t${CMSG}12${CEND}. Uninstall Python (PATH: ${python_install_dir})
-\t${CMSG}13${CEND}. Uninstall Nodejs (PATH: ${nodejs_install_dir})
+\t${CMSG}12${CEND}. Uninstall Nodejs (PATH: ${nodejs_install_dir})
 \t${CMSG} q${CEND}. Exit
 "
   echo
   read -e -p "Please input the correct option: " Number
   if [[ ! "${Number}" =~ ^[0-9,q]$|^1[0-3]$ ]]; then
-    echo "${CWARNING}input error! Please only input 0~13 and q${CEND}"
+    echo "${CWARNING}input error! Please only input 0~12 and q${CEND}"
   else
     case "$Number" in
     0)
@@ -610,7 +600,6 @@ What Are You Doing?
       Print_Memcached_server
       Print_openssl
       Print_phpMyAdmin
-      Print_Python
       Print_Nodejs
       Uninstall_status
       if [ "${uninstall_flag}" == 'y' ]; then
@@ -624,7 +613,6 @@ What Are You Doing?
         Uninstall_Memcached_server
         Uninstall_openssl
         Uninstall_phpMyAdmin
-        . include/python.sh; Uninstall_Python
         . include/nodejs.sh; Uninstall_Nodejs
       else
         exit
@@ -689,11 +677,6 @@ What Are You Doing?
       [ "${uninstall_flag}" == 'y' ] && Uninstall_phpMyAdmin || exit
       ;;
     12)
-      Print_Python
-      Uninstall_status
-      [ "${uninstall_flag}" == 'y' ] && { . include/python.sh; Uninstall_Python; } || exit
-      ;;
-    13)
       Print_Nodejs
       Uninstall_status
       [ "${uninstall_flag}" == 'y' ] && { . include/nodejs.sh; Uninstall_Nodejs; } || exit
@@ -723,7 +706,6 @@ else
   [ "${redis_flag}" == 'y' ] && Print_Redis_server
   [ "${memcached_flag}" == 'y' ] && Print_Memcached_server
   [ "${phpmyadmin_flag}" == 'y' ] && Print_phpMyAdmin
-  [ "${python_flag}" == 'y' ] && Print_Python
   [ "${nodejs_flag}" == 'y' ] && Print_Nodejs
   [ "${all_flag}" == 'y' ] && Print_openssl
   Uninstall_status
@@ -746,7 +728,6 @@ else
     [ "${redis_flag}" == 'y' ] && Uninstall_Redis_server
     [ "${memcached_flag}" == 'y' ] && Uninstall_Memcached_server
     [ "${phpmyadmin_flag}" == 'y' ] && Uninstall_phpMyAdmin
-    [ "${python_flag}" == 'y' ] && { . include/python.sh; Uninstall_Python; }
     [ "${nodejs_flag}" == 'y' ] && { . include/nodejs.sh; Uninstall_Nodejs; }
     [ "${all_flag}" == 'y' ] && Uninstall_openssl
   fi

+ 21 - 24
versions.txt

@@ -1,14 +1,14 @@
 # newest software version
 # Web
 nginx_ver=1.24.0
-tengine_ver=2.4.1
-openresty_ver=1.21.4.1
-openssl11_ver=1.1.1u
+tengine_ver=3.0.0
+openresty_ver=1.21.4.2
+openssl11_ver=1.1.1v
 openssl_ver=1.0.2u
 
-tomcat10_ver=10.1.9
-tomcat9_ver=9.0.75
-tomcat8_ver=8.5.89
+tomcat10_ver=10.1.12
+tomcat9_ver=9.0.79
+tomcat8_ver=8.5.92
 tomcat7_ver=7.0.109
 
 apache_ver=2.4.57
@@ -18,18 +18,18 @@ apr_util_ver=1.6.1
 nghttp2_ver=1.42.0
 
 # DB
-mysql80_ver=8.0.33
-mysql57_ver=5.7.42
+mysql80_ver=8.0.34
+mysql57_ver=5.7.43
 mysql56_ver=5.6.51
 mysql55_ver=5.5.62
 
-mariadb1011_ver=10.11.4
-mariadb105_ver=10.5.21
-mariadb104_ver=10.4.30
+mariadb1011_ver=10.11.5
+mariadb105_ver=10.5.22
+mariadb104_ver=10.4.31
 mariadb55_ver=5.5.68
 
-percona80_ver=8.0.32-24
-percona57_ver=5.7.42-45
+percona80_ver=8.0.33-25
+percona57_ver=5.7.42-46
 percona56_ver=5.6.51-91.0
 percona55_ver=5.5.62-38.14
 
@@ -47,12 +47,12 @@ php71_ver=7.1.33
 php72_ver=7.2.34
 php73_ver=7.3.33
 php74_ver=7.4.33
-php80_ver=8.0.29
-php81_ver=8.1.21
-php82_ver=8.2.8
+php80_ver=8.0.30
+php81_ver=8.1.22
+php82_ver=8.2.9
 
 # Nodejs
-nodejs_ver=18.14.2
+nodejs_ver=18.17.2
 
 libiconv_ver=1.16
 curl_ver=7.88.1
@@ -64,7 +64,7 @@ icu4c_ver=63_1
 libsodium_ver=1.0.18
 libzip_ver=1.2.0
 argon2_ver=20171227
-imagemagick_ver=7.1.1-12
+imagemagick_ver=7.1.1-15
 imagick_ver=3.7.0
 imagick_oldver=3.4.4
 graphicsmagick_ver=1.3.40
@@ -119,12 +119,9 @@ boost_percona_ver=1.73.0
 boost_oldver=1.59.0
 
 # Others
-lua_nginx_module_ver=0.10.24
+lua_nginx_module_ver=0.10.25
 luajit2_ver=2.1-20230410
-lua_resty_core_ver=0.1.26
+lua_resty_core_ver=0.1.27
 lua_resty_lrucache_ver=0.13
 lua_cjson_ver=2.1.0.12
-python_ver=3.6.15
-setuptools_ver=61.2.0
-pip_ver=22.0.4
-fail2ban_ver=0.11.2
+fail2ban_ver=master

+ 1 - 1
vhost.sh

@@ -390,7 +390,7 @@ What Are You Doing?
 
   if [ "${Domian_Mode}" == '3' -o "${dnsapi_flag}" == 'y' ] && [ ! -e ~/.acme.sh/acme.sh ]; then
     pushd ${oneinstack_dir}/src > /dev/null
-    [ ! -e acme.sh-master.tar.gz ] && wget -qc http://mirrors.linuxeye.com/oneinstack/src/acme.sh-master.tar.gz
+    [ ! -e acme.sh-master.tar.gz ] && wget -qc ${mirror_link}/oneinstack/src/acme.sh-master.tar.gz
     tar xzf acme.sh-master.tar.gz
     pushd acme.sh-master > /dev/null
     ./acme.sh --install > /dev/null 2>&1