Browse Source

feat: Add PHP-8.2

lj2007331@gmail.com 2 years ago
parent
commit
d720a7bf9a

+ 1 - 1
README.md

@@ -7,7 +7,7 @@ Script properties:
 - Source compiler installation, most stable source is the latest version, and download from the official site
 - Some security optimization
 - Providing a plurality of database versions (MySQL-8.0, MySQL-5.7, MySQL-5.6, MySQL-5.5, MariaDB-10.5, MariaDB-10.4, MariaDB-10.3, MariaDB-5.5, Percona-8.0, Percona-5.7, Percona-5.6, Percona-5.5, PostgreSQL, MongoDB)
-- Providing multiple PHP versions (PHP-8.1, PHP-8.0, PHP-7.4, PHP-7.3, PHP-7.2, PHP-7.1, PHP-7.0, PHP-5.6, PHP-5.5, PHP-5.4, PHP-5.3)
+- Providing multiple PHP versions (PHP-8.2, PHP-8.1, PHP-8.0, PHP-7.4, PHP-7.3, PHP-7.2, PHP-7.1, PHP-7.0, PHP-5.6, PHP-5.5, PHP-5.4, PHP-5.3)
 - Provide Nginx, Tengine, OpenResty, Apache and ngx_lua_waf
 - Providing a plurality of Tomcat version (Tomcat-10, Tomcat-9, Tomcat-8, Tomcat-7)
 - Providing a plurality of JDK version (OpenJDK-8, OpenJDK-11)

+ 3 - 0
addons.sh

@@ -25,6 +25,9 @@ oneinstack_dir=$(dirname "`readlink -f $0`")
 # shellcheck disable=SC2164
 pushd ${oneinstack_dir} > /dev/null
 
+# get the out ip country
+OUTIP_STATE=$(./include/ois.${ARCH} ip_state)
+
 . ./versions.txt
 . ./options.conf
 . ./include/color.sh

+ 1 - 1
backup_setup.sh

@@ -235,7 +235,7 @@ if [ -n "`echo ${desc_bk} | grep -w 3`" ]; then
   [ "${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
-  [ "$(./include/check_port.py ${Host} 80)" == "False" ] && Host=`echo ${Host} | sed 's@-internal@@g'`
+  [ "$(./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
     read -e -p "Please enter the aliyun oss Access Key ID: " KeyID

+ 21 - 16
include/check_download.sh

@@ -99,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..."
-      [ "${IPADDR_COUNTRY}"x == "CN"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=${mirrorLink} || 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
@@ -107,7 +107,7 @@ checkDownload() {
     case "${db_option}" in
       1)
         # MySQL 8.0
-        if [ "${IPADDR_COUNTRY}"x == "CN"x ]; then
+        if [ "${OUTIP_STATE}"x == "China"x ]; then
           DOWN_ADDR_MYSQL=https://cdn.mysql.com/Downloads/MySQL-8.0
           DOWN_ADDR_MYSQL_BK=http://repo.huaweicloud.com/mysql/Downloads/MySQL-8.0
           DOWN_ADDR_MYSQL_BK2=http://mirrors.tuna.tsinghua.edu.cn/mysql/downloads/MySQL-8.0
@@ -142,7 +142,7 @@ checkDownload() {
         ;;
       2)
         # MySQL 5.7
-        if [ "${IPADDR_COUNTRY}"x == "CN"x ]; then
+        if [ "${OUTIP_STATE}"x == "China"x ]; then
           DOWN_ADDR_MYSQL=https://cdn.mysql.com/Downloads/MySQL-5.7
           DOWN_ADDR_MYSQL_BK=http://repo.huaweicloud.com/mysql/Downloads/MySQL-5.7
           DOWN_ADDR_MYSQL_BK2=http://mirrors.tuna.tsinghua.edu.cn/mysql/downloads/MySQL-5.7
@@ -177,7 +177,7 @@ checkDownload() {
         ;;
       3)
         # MySQL 5.6
-        if [ "${IPADDR_COUNTRY}"x == "CN"x ]; then
+        if [ "${OUTIP_STATE}"x == "China"x ]; then
           DOWN_ADDR_MYSQL=http://mirrors.aliyun.com/mysql/MySQL-5.6
           DOWN_ADDR_MYSQL_BK=http://mirrors.tuna.tsinghua.edu.cn/mysql/downloads/MySQL-5.6
           DOWN_ADDR_MYSQL_BK2=http://repo.huaweicloud.com/mysql/Downloads/MySQL-5.6
@@ -212,7 +212,7 @@ checkDownload() {
         ;;
       4)
         # MySQL 5.5
-        if [ "${IPADDR_COUNTRY}"x == "CN"x ]; then
+        if [ "${OUTIP_STATE}"x == "China"x ]; then
           DOWN_ADDR_MYSQL=http://mirrors.aliyun.com/mysql/MySQL-5.5
           DOWN_ADDR_MYSQL_BK=http://mirrors.tuna.tsinghua.edu.cn/mysql/downloads/MySQL-5.5
           DOWN_ADDR_MYSQL_BK2=http://repo.huaweicloud.com/mysql/Downloads/MySQL-5.5
@@ -270,7 +270,7 @@ checkDownload() {
 	  FILE_TYPE=source
         fi
 
-        if [ "${IPADDR_COUNTRY}"x == "CN"x ]; then
+        if [ "${OUTIP_STATE}"x == "China"x ]; then
           DOWN_ADDR_MARIADB=http://mirrors.tuna.tsinghua.edu.cn/mariadb/mariadb-${mariadb_ver}/${FILE_TYPE}
           DOWN_ADDR_MARIADB_BK=http://mirrors.ustc.edu.cn/mariadb/mariadb-${mariadb_ver}/${FILE_TYPE}
         else
@@ -303,12 +303,12 @@ checkDownload() {
         # Percona 8.0
         if [ "${dbinstallmethod}" == '1' ]; then
           echo "Download Percona 8.0 binary package..."
-          FILE_NAME=Percona-Server-${percona80_ver}-Linux.x86_64.glibc2.27.tar.gz
+          FILE_NAME=Percona-Server-${percona80_ver}-Linux.x86_64.glibc2.28.tar.gz
           DOWN_ADDR_PERCONA=https://downloads.percona.com/downloads/Percona-Server-8.0/Percona-Server-${percona80_ver}/binary/tarball
         elif [ "${dbinstallmethod}" == '2' ]; then
           echo "Download Percona 8.0 source package..."
           FILE_NAME=percona-server-${percona80_ver}.tar.gz
-          if [ "${IPADDR_COUNTRY}"x == "CN"x ]; then
+          if [ "${OUTIP_STATE}"x == "China"x ]; then
             DOWN_ADDR_PERCONA=${mirrorLink}
           else
             DOWN_ADDR_PERCONA=https://downloads.percona.com/downloads/Percona-Server-8.0/Percona-Server-${percona80_ver}/source/tarball
@@ -335,12 +335,12 @@ checkDownload() {
         # Precona 5.7
         if [ "${dbinstallmethod}" == '1' ]; then
           echo "Download Percona 5.7 binary package..."
-          FILE_NAME=Percona-Server-${percona57_ver}-Linux.x86_64.glibc2.12.tar.gz
+          FILE_NAME=Percona-Server-${percona57_ver}-Linux.x86_64.glibc2.17.tar.gz
           DOWN_ADDR_PERCONA=https://downloads.percona.com/downloads/Percona-Server-5.7/Percona-Server-${percona57_ver}/binary/tarball
         elif [ "${dbinstallmethod}" == '2' ]; then
           echo "Download Percona 5.7 source package..."
           FILE_NAME=percona-server-${percona57_ver}.tar.gz
-          if [ "${IPADDR_COUNTRY}"x == "CN"x ]; then
+          if [ "${OUTIP_STATE}"x == "China"x ]; then
             DOWN_ADDR_PERCONA=${mirrorLink}
           else
             DOWN_ADDR_PERCONA=https://downloads.percona.com/downloads/Percona-Server-5.7/Percona-Server-${percona57_ver}/source/tarball
@@ -373,7 +373,7 @@ checkDownload() {
         elif [ "${dbinstallmethod}" == '2' ]; then
           echo "Download Percona 5.6 source package..."
           FILE_NAME=percona-server-${percona56_ver}.tar.gz
-          if [ "${IPADDR_COUNTRY}"x == "CN"x ]; then
+          if [ "${OUTIP_STATE}"x == "China"x ]; then
             DOWN_ADDR_PERCONA=${mirrorLink}
           else
             DOWN_ADDR_PERCONA=https://downloads.percona.com/downloads/Percona-Server-5.6/Percona-Server-${percona56_ver}/source/tarball
@@ -406,7 +406,7 @@ checkDownload() {
         elif [ "${dbinstallmethod}" == '2' ]; then
           echo "Download Percona 5.5 source package..."
           FILE_NAME=percona-server-${percona55_ver}.tar.gz
-          if [ "${IPADDR_COUNTRY}"x == "CN"x ]; then
+          if [ "${OUTIP_STATE}"x == "China"x ]; then
             DOWN_ADDR_PERCONA=${mirrorLink}
           else
             DOWN_ADDR_PERCONA=https://downloads.percona.com/downloads/Percona-Server-5.5/Percona-Server-${percona55_ver}/source/tarball
@@ -431,7 +431,7 @@ checkDownload() {
         ;;
       13)
         FILE_NAME=postgresql-${pgsql_ver}.tar.gz
-        if [ "${IPADDR_COUNTRY}"x == "CN"x ]; then
+        if [ "${OUTIP_STATE}"x == "China"x ]; then
           DOWN_ADDR_PGSQL=https://mirrors.tuna.tsinghua.edu.cn/postgresql/source/v${pgsql_ver}
           DOWN_ADDR_PGSQL_BK=https://mirrors.ustc.edu.cn/postgresql/source/v${pgsql_ver}
         else
@@ -457,7 +457,7 @@ checkDownload() {
         # MongoDB
         echo "Download MongoDB binary package..."
         FILE_NAME=mongodb-linux-x86_64-${mongodb_ver}.tgz
-        if [ "${IPADDR_COUNTRY}"x == "CN"x ]; then
+        if [ "${OUTIP_STATE}"x == "China"x ]; then
           DOWN_ADDR_MongoDB=${mirrorLink}
         else
           DOWN_ADDR_MongoDB=https://fastdl.mongodb.org/linux
@@ -531,6 +531,11 @@ checkDownload() {
     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
+  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
   fi
 
   # PHP OPCache
@@ -652,7 +657,7 @@ checkDownload() {
   # memcached-server
   if [ "${memcached_flag}" == 'y' ]; then
     echo "Download memcached-server..."
-    [ "${IPADDR_COUNTRY}"x == "CN"x ] && DOWN_ADDR=${mirrorLink} || DOWN_ADDR=http://www.memcached.org/files
+    [ "${OUTIP_STATE}"x == "China"x ] && DOWN_ADDR=${mirrorLink} || DOWN_ADDR=http://www.memcached.org/files
     src_url=${DOWN_ADDR}/memcached-${memcached_ver}.tar.gz && Download_src
   fi
 
@@ -692,7 +697,7 @@ checkDownload() {
   # nodejs
   if [ "${nodejs_flag}" == 'y' ]; then
     echo "Download Nodejs..."
-    [ "${IPADDR_COUNTRY}"x == "CN"x ] && DOWN_ADDR_NODE=https://mirrors.tuna.tsinghua.edu.cn/nodejs-release || DOWN_ADDR_NODE=https://nodejs.org/dist
+    [ "${OUTIP_STATE}"x == "China"x ] && DOWN_ADDR_NODE=https://mirrors.tuna.tsinghua.edu.cn/nodejs-release || DOWN_ADDR_NODE=https://nodejs.org/dist
     src_url=${DOWN_ADDR_NODE}/v${nodejs_ver}/node-v${nodejs_ver}-linux-${SYS_ARCH_n}.tar.gz && Download_src
   fi
 

+ 26 - 21
include/check_os.sh

@@ -17,37 +17,42 @@ fi
 
 # Get OS Version
 Platform=${ID,,}
-VERSION_ID=${VERSION_ID%%.*}
+VERSION_MAIN_ID=${VERSION_ID%%.*}
 ARCH=$(arch)
-if [[ "${Platform}" =~ ^centos$|^rhel$|^almalinux$|^rocky$|^fedora$|^amzn$|^ol$|^alinux$|^anolis$|^tencentos$|^euleros$|^openeuler$|^kylin$ ]]; then
+if [[ "${Platform}" =~ ^centos$|^rhel$|^almalinux$|^rocky$|^fedora$|^amzn$|^ol$|^alinux$|^anolis$|^tencentos$|^euleros$|^openeuler$|^kylin$|^uos$|^kylinsecos$ ]]; then
   PM=yum
   Family=rhel
-  RHEL_ver=${VERSION_ID}
+  RHEL_ver=${VERSION_MAIN_ID}
   if [[ "${Platform}" =~ ^centos$ ]]; then
-    if [ "${VERSION_ID}" == '6' ]; then
+    if [ "${VERSION_MAIN_ID}" == '6' ]; then
       sed -i "s@centos/\$releasever@centos-vault/6.10@g" /etc/yum.repos.d/CentOS-Base.repo
       sed -i 's@centos/RPM-GPG@centos-vault/RPM-GPG@g' /etc/yum.repos.d/CentOS-Base.repo
       [ -e /etc/yum.repos.d/epel.repo ] && rm -f /etc/yum.repos.d/epel.repo
     fi
   elif [[ "${Platform}" =~ ^fedora$ ]]; then
-    Fedora_ver=${VERSION_ID}
-    [ ${VERSION_ID} -ge 19 ] && [ ${VERSION_ID} -lt 28 ] && RHEL_ver=7
-    [ ${VERSION_ID} -ge 28 ] && [ ${VERSION_ID} -lt 34 ] && RHEL_ver=8
-    [ ${VERSION_ID} -ge 34 ] && RHEL_ver=9
+    Fedora_ver=${VERSION_MAIN_ID}
+    [ ${VERSION_MAIN_ID} -ge 19 ] && [ ${VERSION_MAIN_ID} -lt 28 ] && RHEL_ver=7
+    [ ${VERSION_MAIN_ID} -ge 28 ] && [ ${VERSION_MAIN_ID} -lt 34 ] && RHEL_ver=8
+    [ ${VERSION_MAIN_ID} -ge 34 ] && RHEL_ver=9
   elif [[ "${Platform}" =~ ^amzn$|^alinux$|^tencentos$|^euleros$ ]]; then
-    [[ "${VERSION_ID}" =~ ^2$ ]] && RHEL_ver=7
-    [[ "${VERSION_ID}" =~ ^3$ ]] && RHEL_ver=8
+    [[ "${VERSION_MAIN_ID}" =~ ^2$ ]] && RHEL_ver=7
+    [[ "${VERSION_MAIN_ID}" =~ ^3$ ]] && RHEL_ver=8
   elif [[ "${Platform}" =~ ^openeuler$ ]]; then
     [[ "${RHEL_ver}" =~ ^20$ ]] && RHEL_ver=7
     [[ "${RHEL_ver}" =~ ^2[1,2]$ ]] && RHEL_ver=8
   elif [[ "${Platform}" =~ ^kylin$ ]]; then
     [[ "${RHEL_ver}" =~ ^V10$ ]] && RHEL_ver=7
+  elif [[ "${Platform}" =~ ^uos$ ]]; then
+    [[ "${RHEL_ver}" =~ ^20$ ]] && RHEL_ver=8
+  elif [[ "${Platform}" =~ ^kylinsecos$ ]]; then
+    [[ "${VERSION_ID}" =~ ^3.4 ]] && RHEL_ver=7
+    [[ "${VERSION_ID}" =~ ^3.5 ]] && RHEL_ver=8
   fi
-elif [[ "${Platform}" =~ ^debian$|^deepin$|^uos$|^kali$ ]]; then
+elif [[ "${Platform}" =~ ^debian$|^deepin$|^kali$ ]]; then
   PM=apt-get
   Family=debian
-  Debian_ver=${VERSION_ID}
-  if [[ "${Platform}" =~ ^deepin$|^uos$ ]]; then
+  Debian_ver=${VERSION_MAIN_ID}
+  if [[ "${Platform}" =~ ^deepin$ ]]; then
     [[ "${Debian_ver}" =~ ^20$ ]] && Debian_ver=10
     [[ "${Debian_ver}" =~ ^23$ ]] && Debian_ver=11
   elif [[ "${Platform}" =~ ^kali$ ]]; then
@@ -56,16 +61,16 @@ elif [[ "${Platform}" =~ ^debian$|^deepin$|^uos$|^kali$ ]]; then
 elif [[ "${Platform}" =~ ^ubuntu$|^linuxmint$|^elementary$ ]]; then
   PM=apt-get
   Family=ubuntu
-  Ubuntu_ver=${VERSION_ID}
+  Ubuntu_ver=${VERSION_MAIN_ID}
   if [[ "${Platform}" =~ ^linuxmint$ ]]; then
-    [[ "${VERSION_ID}" =~ ^18$ ]] && Ubuntu_ver=16
-    [[ "${VERSION_ID}" =~ ^19$ ]] && Ubuntu_ver=18
-    [[ "${VERSION_ID}" =~ ^20$ ]] && Ubuntu_ver=20
-    [[ "${VERSION_ID}" =~ ^21$ ]] && Ubuntu_ver=22
+    [[ "${VERSION_MAIN_ID}" =~ ^18$ ]] && Ubuntu_ver=16
+    [[ "${VERSION_MAIN_ID}" =~ ^19$ ]] && Ubuntu_ver=18
+    [[ "${VERSION_MAIN_ID}" =~ ^20$ ]] && Ubuntu_ver=20
+    [[ "${VERSION_MAIN_ID}" =~ ^21$ ]] && Ubuntu_ver=22
   elif [[ "${Platform}" =~ ^elementary$ ]]; then
-    [[ "${VERSION_ID}" =~ ^5$ ]] && Ubuntu_ver=18
-    [[ "${VERSION_ID}" =~ ^6$ ]] && Ubuntu_ver=20
-    [[ "${VERSION_ID}" =~ ^7$ ]] && Ubuntu_ver=22
+    [[ "${VERSION_MAIN_ID}" =~ ^5$ ]] && Ubuntu_ver=18
+    [[ "${VERSION_MAIN_ID}" =~ ^6$ ]] && Ubuntu_ver=20
+    [[ "${VERSION_MAIN_ID}" =~ ^7$ ]] && Ubuntu_ver=22
   fi
 else
   echo "${CFAILURE}Does not support this OS ${CEND}"

+ 0 - 13
include/check_port.py

@@ -1,13 +0,0 @@
-#!/usr/bin/env python
-import sys,os,socket
-def IsOpen(ip,port):
-  socket.setdefaulttimeout(5)
-  s = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
-  try:
-    s.connect((ip,int(port)))
-    s.shutdown(2)
-    print(True)
-  except:
-    print(False)
-if __name__ == '__main__':
-  IsOpen(sys.argv[1],int(sys.argv[2]))

+ 2 - 2
include/check_sw.sh

@@ -75,7 +75,7 @@ installDepsRHEL() {
       [ -z "`grep -w epel /etc/yum.repos.d/*.repo`" ] && yum -y install epel-release
       if grep -qw "^\[PowerTools\]" /etc/yum.repos.d/*.repo; then
         dnf -y --enablerepo=PowerTools install chrony oniguruma-devel rpcgen
-      else
+      elif grep -qw "^\[powertools\]" /etc/yum.repos.d/*.repo; then
         dnf -y --enablerepo=powertools install chrony oniguruma-devel rpcgen
       fi
     fi
@@ -87,7 +87,7 @@ installDepsRHEL() {
 
   echo "${CMSG}Installing dependencies packages...${CEND}"
   # Install needed packages
-  pkgList="perl-FindBin deltarpm drpm gcc gcc-c++ make cmake autoconf libjpeg libjpeg-devel libjpeg-turbo libjpeg-turbo-devel libpng libpng-devel libxml2 libxml2-devel zlib zlib-devel libzip libzip-devel glibc glibc-devel krb5-devel libc-client libc-client-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel libaio numactl numactl-libs readline-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5-devel libidn libidn-devel openssl openssl-devel net-tools libxslt-devel libicu-devel libevent-devel libtool libtool-ltdl bison gd-devel vim-enhanced pcre-devel libmcrypt libmcrypt-devel mhash mhash-devel mcrypt zip unzip chrony sqlite-devel sysstat patch bc expect expat-devel perl-devel oniguruma oniguruma-devel libtirpc-devel nss libnsl rsync rsyslog git lsof lrzsz psmisc wget which libatomic tmux chkconfig firewalld"
+  pkgList="perl-FindBin deltarpm drpm gcc gcc-c++ make cmake autoconf libjpeg libjpeg-devel libjpeg-turbo libjpeg-turbo-devel libpng libpng-devel libxml2 libxml2-devel zlib zlib-devel libzip libzip-devel glibc glibc-devel krb5-devel libc-client libc-client-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel libaio numactl numactl-libs readline-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5-devel libidn libidn-devel openssl openssl-devel net-tools libxslt-devel libicu-devel libevent-devel libtool libtool-ltdl bison gd-devel vim-enhanced pcre-devel libmcrypt libmcrypt-devel mhash mhash-devel mcrypt zip unzip chrony oniguruma-devel rpcgen sqlite-devel sysstat patch bc expect expat-devel perl-devel oniguruma oniguruma-devel libtirpc-devel nss libnsl rsync rsyslog git lsof lrzsz psmisc wget which libatomic tmux chkconfig firewalld"
   for Package in ${pkgList}; do
     yum -y install ${Package}
   done

+ 1 - 4
include/composer.sh

@@ -14,10 +14,7 @@ Install_composer() {
       echo "${CWARNING}PHP Composer already installed! ${CEND}"
     else
       pushd ${oneinstack_dir}/src > /dev/null
-      # get the IP information
-      PUBLIC_IPADDR=$(../include/get_public_ipaddr.py)
-      IPADDR_COUNTRY=$(../include/get_ipaddr_state.py ${PUBLIC_IPADDR})
-      if [ "${IPADDR_COUNTRY}"x == "CN"x ]; then
+      if [ "${OUTIP_STATE}"x == "China"x ]; then
         wget -c https://mirrors.aliyun.com/composer/composer.phar -O /usr/local/bin/composer > /dev/null 2>&1
         ${php_install_dir}/bin/php /usr/local/bin/composer config -g repo.packagist composer https://packagist.phpcomposer.com
       else

+ 1 - 1
include/demo.sh

@@ -11,7 +11,7 @@
 DEMO() {
   pushd ${oneinstack_dir}/src > /dev/null
   if [ ! -e ${wwwroot_dir}/default/index.html ]; then 
-    [ "${IPADDR_COUNTRY}"x == "CN"x ] && /bin/cp ${oneinstack_dir}/config/index_cn.html ${wwwroot_dir}/default/index.html || /bin/cp ${oneinstack_dir}/config/index.html ${wwwroot_dir}/default
+    [ "${OUTIP_STATE}"x == "China"x ] && /bin/cp ${oneinstack_dir}/config/index_cn.html ${wwwroot_dir}/default/index.html || /bin/cp ${oneinstack_dir}/config/index.html ${wwwroot_dir}/default
   fi
 
   if [ -e "${php_install_dir}/bin/php" ]; then

+ 0 - 23
include/get_ipaddr.py

@@ -1,23 +0,0 @@
-#!/usr/bin/env python
-import socket
-def Get_local_ip():
-  """
-  Returns the actual ip of the local machine.
-  This code figures out what source address would be used if some traffic
-  were to be sent out to some well known address on the Internet. In this
-  case, a Google DNS server is used, but the specific address does not
-  matter much.  No traffic is actually sent.
-  """
-  try:
-    socket.setdefaulttimeout(5)
-    csock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
-    csock.connect(('1.1.1.1', 80))
-    (addr, port) = csock.getsockname()
-    csock.close()
-    return addr
-  except socket.error:
-    return "127.0.0.1"
-
-if __name__ == "__main__":
-  IPADDR = Get_local_ip()
-  print(IPADDR)

+ 0 - 25
include/get_ipaddr_state.py

@@ -1,25 +0,0 @@
-#!/usr/bin/env python
-#coding:utf-8
-import sys,socket,json
-
-if sys.version_info[0] == 2:
-  import urllib2 as request
-else:
-  import urllib.request as request
-
-try:
-  socket.setdefaulttimeout(5)
-  if len(sys.argv) == 1:
-      apiurl = "http://ip-api.com/json"
-  elif len(sys.argv) == 2:
-      apiurl = "http://ip-api.com/json/%s" % sys.argv[1]
-  content = request.urlopen(apiurl).read().decode('utf-8')
-  content = json.JSONDecoder().decode(content)
-  #print(content)
-  if content['status'] == 'success':
-    if content['country'] == 'China':
-      print("CN")
-    else:
-      print(content['country'])
-except:
-  print("Usage:%s IP" % sys.argv[0])

+ 0 - 28
include/get_public_ipaddr.py

@@ -1,28 +0,0 @@
-#!/usr/bin/env python
-import sys,re,socket
-
-if sys.version_info[0] == 2:
-  import urllib2 as request
-else:
-  import urllib.request as request
-
-class Get_public_ip:
-  socket.setdefaulttimeout(5)
-  def getip(self):
-    try:
-      myip = self.visit("http://ipv4.icanhazip.com/")
-    except:
-      try:
-        myip = self.visit("http://pv.sohu.com/cityjson?ie=utf-8")
-      except:
-        myip = "So sorry!!!"
-    return myip
-  def visit(self,url):
-    opener = request.urlopen(url)
-    if url == opener.geturl():
-      str = opener.read().decode('utf-8')
-    return re.search('\d+\.\d+\.\d+\.\d+',str).group(0)
-
-if __name__ == "__main__":
-  getmyip = Get_public_ip()
-  print(getmyip.getip())

+ 1 - 1
include/init_RHEL.sh

@@ -74,7 +74,7 @@ net.core.wmem_default = 8388608
 net.core.rmem_default = 8388608
 net.core.rmem_max = 16777216
 net.core.wmem_max = 16777216
-net.ipv4.tcp_timestamps = 1
+net.ipv4.tcp_timestamps = 0
 net.ipv4.tcp_fin_timeout = 20
 net.ipv4.tcp_synack_retries = 2
 net.ipv4.tcp_syn_retries = 2

BIN
include/ois.aarch64


BIN
include/ois.x86_64


+ 12 - 0
include/openssl.sh

@@ -17,6 +17,7 @@ if openssl version | grep -Eqi 'OpenSSL 1.0.2*'; then
   php74_with_openssl="--with-openssl"
   php80_with_openssl="--with-openssl"
   php81_with_openssl="--with-openssl"
+  php82_with_openssl="--with-openssl"
 
   php5_with_ssl="--with-ssl"
   php70_with_ssl="--with-ssl"
@@ -26,6 +27,7 @@ if openssl version | grep -Eqi 'OpenSSL 1.0.2*'; then
   php74_with_ssl="--with-ssl"
   php80_with_ssl="--with-ssl"
   php81_with_ssl="--with-ssl"
+  php82_with_ssl="--with-ssl"
 
   php5_with_curl="--with-curl"
   php70_with_curl="--with-curl"
@@ -35,6 +37,7 @@ if openssl version | grep -Eqi 'OpenSSL 1.0.2*'; then
   php74_with_curl="--with-curl"
   php80_with_curl="--with-curl"
   php81_with_curl="--with-curl"
+  php82_with_curl="--with-curl"
 elif openssl version | grep -Eqi 'OpenSSL 1.1.*'; then
   php5_with_openssl="--with-openssl=${openssl_install_dir}"
   php70_with_openssl="--with-openssl"
@@ -44,6 +47,7 @@ elif openssl version | grep -Eqi 'OpenSSL 1.1.*'; then
   php74_with_openssl="--with-openssl"
   php80_with_openssl="--with-openssl"
   php81_with_openssl="--with-openssl"
+  php82_with_openssl="--with-openssl"
 
   php5_with_ssl="--with-ssl=${openssl_install_dir}"
   php70_with_ssl="--with-ssl"
@@ -53,6 +57,7 @@ elif openssl version | grep -Eqi 'OpenSSL 1.1.*'; then
   php74_with_ssl="--with-ssl"
   php80_with_ssl="--with-ssl"
   php81_with_ssl="--with-ssl"
+  php82_with_ssl="--with-ssl"
 
   php5_with_curl="--with-curl=${curl_install_dir}"
   php70_with_curl="--with-curl"
@@ -62,6 +67,7 @@ elif openssl version | grep -Eqi 'OpenSSL 1.1.*'; then
   php74_with_curl="--with-curl"
   php80_with_curl="--with-curl"
   php81_with_curl="--with-curl"
+  php82_with_curl="--with-curl"
   [[ ${php_option} =~ ^[1-4]$ ]] || [[ "${mphp_ver}" =~ ^5[3-6]$ ]] && with_old_openssl_flag=y
 elif openssl version | grep -Eqi 'OpenSSL 3.*'; then
   php5_with_openssl="--with-openssl=${openssl_install_dir}"
@@ -72,6 +78,7 @@ elif openssl version | grep -Eqi 'OpenSSL 3.*'; then
   php74_with_openssl="--with-openssl"
   php80_with_openssl="--with-openssl"
   php81_with_openssl="--with-openssl"
+  php82_with_openssl="--with-openssl"
 
   php5_with_ssl="--with-ssl=${openssl_install_dir}"
   php70_with_ssl="--with-ssl=${openssl_install_dir}"
@@ -81,6 +88,7 @@ elif openssl version | grep -Eqi 'OpenSSL 3.*'; then
   php74_with_ssl="--with-ssl"
   php80_with_ssl="--with-ssl"
   php81_with_ssl="--with-ssl"
+  php82_with_ssl="--with-ssl"
 
   php5_with_curl="--with-curl=${curl_install_dir}"
   php70_with_curl="--with-curl=${curl_install_dir}"
@@ -90,6 +98,7 @@ elif openssl version | grep -Eqi 'OpenSSL 3.*'; then
   php74_with_curl="--with-curl"
   php80_with_curl="--with-curl"
   php81_with_curl="--with-curl"
+  php82_with_curl="--with-curl"
   [[ ${php_option} =~ ^[1-5]$ ]] || [[ "${mphp_ver}" =~ ^5[3-6]$|^70$ ]] && with_old_openssl_flag=y
 else
   php5_with_openssl="--with-openssl=${openssl_install_dir}"
@@ -100,6 +109,7 @@ else
   php74_with_openssl="--with-openssl=${openssl_install_dir} --with-openssl-dir=${openssl_install_dir}"
   php80_with_openssl="--with-openssl=${openssl_install_dir} --with-openssl-dir=${openssl_install_dir}"
   php81_with_openssl="--with-openssl=${openssl_install_dir} --with-openssl-dir=${openssl_install_dir}"
+  php82_with_openssl="--with-openssl=${openssl_install_dir} --with-openssl-dir=${openssl_install_dir}"
 
   php5_with_ssl="--with-ssl=${openssl_install_dir}"
   php70_with_ssl="--with-ssl=${openssl_install_dir}"
@@ -109,6 +119,7 @@ else
   php74_with_ssl="--with-ssl=${openssl_install_dir}"
   php80_with_ssl="--with-ssl=${openssl_install_dir}"
   php81_with_ssl="--with-ssl=${openssl_install_dir}"
+  php82_with_ssl="--with-ssl=${openssl_install_dir}"
 
   php5_with_curl="--with-curl=${curl_install_dir}"
   php70_with_curl="--with-curl=${curl_install_dir}"
@@ -118,6 +129,7 @@ else
   php74_with_curl="--with-curl=${curl_install_dir}"
   php80_with_curl="--with-curl=${curl_install_dir}"
   php81_with_curl="--with-curl=${curl_install_dir}"
+  php82_with_curl="--with-curl=${curl_install_dir}"
   with_old_openssl_flag=y
 fi
 

+ 8 - 2
include/pecl_swoole.sh

@@ -21,11 +21,17 @@ Install_pecl_swoole() {
       ${php_install_dir}/bin/phpize
       ./configure --with-php-config=${php_install_dir}/bin/php-config --enable-openssl --with-openssl-dir=${openssl_install_dir}
     elif [[ "${PHP_main_ver}" =~ ^7.[0-1]$ ]]; then
+      src_url=https://pecl.php.net/get/swoole-4.5.2.tgz && Download_src
+      tar xzf swoole-4.5.2.tgz
+      pushd swoole-4.5.2 > /dev/null
+      ${php_install_dir}/bin/phpize
+      ./configure --with-php-config=${php_install_dir}/bin/php-config --enable-openssl --with-openssl-dir=${openssl_install_dir}
+    elif [[ "${PHP_main_ver}" =~ ^7.[2-4]$ ]]; then
       src_url=https://pecl.php.net/get/swoole-${swoole_oldver}.tgz && Download_src
       tar xzf swoole-${swoole_oldver}.tgz
       pushd swoole-${swoole_oldver} > /dev/null
       ${php_install_dir}/bin/phpize
-      ./configure --with-php-config=${php_install_dir}/bin/php-config --enable-openssl --with-openssl-dir=${openssl_install_dir}
+      ./configure --with-php-config=${php_install_dir}/bin/php-config --enable-openssl --with-openssl-dir=${openssl_install_dir} --enable-http2 --enable-swoole-json --enable-swoole-curl
     else
       src_url=https://pecl.php.net/get/swoole-${swoole_ver}.tgz && Download_src
       tar xzf swoole-${swoole_ver}.tgz
@@ -38,7 +44,7 @@ Install_pecl_swoole() {
     if [ -f "${phpExtensionDir}/swoole.so" ]; then
       echo 'extension=swoole.so' > ${php_install_dir}/etc/php.d/06-swoole.ini
       echo "${CSUCCESS}PHP swoole module installed successfully! ${CEND}"
-      rm -rf swoole-${swoole_ver} swoole-${swoole_oldver}
+      rm -rf swoole-${swoole_ver} swoole-${swoole_oldver} swoole-1.10.5 swoole-4.5.2
     else
       echo "${CFAILURE}PHP swoole module install failed, Please contact the author! ${CEND}" && grep -Ew 'NAME|ID|ID_LIKE|VERSION_ID|PRETTY_NAME' /etc/os-release
     fi

+ 3 - 3
include/percona-5.7.sh

@@ -17,10 +17,10 @@ Install_Percona57() {
   mkdir -p ${percona_data_dir};chown mysql.mysql -R ${percona_data_dir}
 
   if [ "${dbinstallmethod}" == "1" ]; then
-    tar xzf Percona-Server-${percona57_ver}-Linux.x86_64.glibc2.12.tar.gz
-    mv Percona-Server-${percona57_ver}-Linux.x86_64.glibc2.12/* ${percona_install_dir}
+    tar xzf Percona-Server-${percona57_ver}-Linux.x86_64.glibc2.17.tar.gz
+    mv Percona-Server-${percona57_ver}-Linux.x86_64.glibc2.17/* ${percona_install_dir}
     sed -i 's@executing mysqld_safe@executing mysqld_safe\nexport LD_PRELOAD=/usr/local/lib/libjemalloc.so@' ${percona_install_dir}/bin/mysqld_safe
-    sed -i "s@Percona-Server-${percona57_ver}-Linux.x86_64.glibc2.12@${percona_install_dir}@g" ${percona_install_dir}/bin/mysqld_safe
+    sed -i "s@Percona-Server-${percona57_ver}-Linux.x86_64.glibc2.17@${percona_install_dir}@g" ${percona_install_dir}/bin/mysqld_safe
   elif [ "${dbinstallmethod}" == "2" ]; then
     boostVersion2=$(echo ${boost_oldver} | awk -F. '{print $1"_"$2"_"$3}')
     tar xzf boost_${boostVersion2}.tar.gz

+ 4 - 4
include/percona-8.0.sh

@@ -17,10 +17,10 @@ Install_Percona80() {
   mkdir -p ${percona_data_dir};chown mysql.mysql -R ${percona_data_dir}
 
   if [ "${dbinstallmethod}" == "1" ]; then
-    tar xzf ./Percona-Server-${percona80_ver}-Linux.x86_64.glibc2.27.tar.gz
-    mv Percona-Server-${percona80_ver}-Linux.x86_64.glibc2.27/* ${percona_install_dir}
+    tar xzf ./Percona-Server-${percona80_ver}-Linux.x86_64.glibc2.28.tar.gz
+    mv Percona-Server-${percona80_ver}-Linux.x86_64.glibc2.28/* ${percona_install_dir}
     #sed -i 's@executing mysqld_safe@executing mysqld_safe\nexport LD_PRELOAD=/usr/local/lib/libjemalloc.so@' ${percona_install_dir}/bin/mysqld_safe
-    sed -i "s@/usr/local/Percona-Server-${percona80_ver}-Linux.x86_64.glibc2.27@${percona_install_dir}@g" ${percona_install_dir}/bin/mysqld_safe
+    sed -i "s@/usr/local/Percona-Server-${percona80_ver}-Linux.x86_64.glibc2.28@${percona_install_dir}@g" ${percona_install_dir}/bin/mysqld_safe
   elif [ "${dbinstallmethod}" == "2" ]; then
     boostVersion2=$(echo ${boost_percona_ver} | awk -F. '{print $1"_"$2"_"$3}')
     tar xzf boost_${boostVersion2}.tar.gz
@@ -56,7 +56,7 @@ Install_Percona80() {
     sed -i "s+^dbrootpwd.*+dbrootpwd='${dbrootpwd}'+" ../options.conf
     echo "${CSUCCESS}Percona installed successfully! ${CEND}"
     if [ "${dbinstallmethod}" == "1" ]; then
-      rm -rf Percona-Server-${percona80_ver}-Linux.x86_64.glibc2.12
+      rm -rf Percona-Server-${percona80_ver}-Linux.x86_64.glibc2.28
     elif [ "${dbinstallmethod}" == "2" ]; then
       rm -rf percona-server-${percona80_ver} boost_${boostVersion2}
     fi

+ 276 - 0
include/php-8.2.sh

@@ -0,0 +1,276 @@
+#!/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_PHP82() {
+  pushd ${oneinstack_dir}/src > /dev/null
+  if [ ! -e "/usr/local/lib/libiconv.la" ]; then
+    tar xzf libiconv-${libiconv_ver}.tar.gz
+    pushd libiconv-${libiconv_ver} > /dev/null
+    ./configure
+    make -j ${THREAD} && make install
+    popd > /dev/null
+    rm -rf libiconv-${libiconv_ver}
+  fi
+
+  if [ ! -e "${curl_install_dir}/lib/libcurl.la" ]; then
+    tar xzf curl-${curl_ver}.tar.gz
+    pushd curl-${curl_ver} > /dev/null
+    [ -e "/usr/local/lib/libnghttp2.so" ] && with_nghttp2='--with-nghttp2=/usr/local'
+    ./configure --prefix=${curl_install_dir} ${php82_with_ssl} ${with_nghttp2}
+    make -j ${THREAD} && make install
+    popd > /dev/null
+    rm -rf curl-${curl_ver}
+  fi
+
+  if [ ! -e "${freetype_install_dir}/lib/libfreetype.la" ]; then
+    tar xzf freetype-${freetype_ver}.tar.gz
+    pushd freetype-${freetype_ver} > /dev/null
+    ./configure --prefix=${freetype_install_dir} --enable-freetype-config
+    make -j ${THREAD} && make install
+    ln -sf ${freetype_install_dir}/include/freetype2/* /usr/include/
+    [ -d /usr/lib/pkgconfig ] && /bin/cp ${freetype_install_dir}/lib/pkgconfig/freetype2.pc /usr/lib/pkgconfig/
+    popd > /dev/null
+    rm -rf freetype-${freetype_ver}
+  fi
+
+  if [ ! -e "/usr/local/lib/pkgconfig/libargon2.pc" ]; then
+    tar xzf argon2-${argon2_ver}.tar.gz
+    pushd argon2-${argon2_ver} > /dev/null
+    make -j ${THREAD} && make install
+    [ ! -d /usr/local/lib/pkgconfig ] && mkdir -p /usr/local/lib/pkgconfig
+    /bin/cp libargon2.pc /usr/local/lib/pkgconfig/
+    popd > /dev/null
+    rm -rf argon2-${argon2_ver}
+  fi
+
+  if [ ! -e "/usr/local/lib/libsodium.la" ]; then
+    tar xzf libsodium-${libsodium_ver}.tar.gz
+    pushd libsodium-${libsodium_ver} > /dev/null
+    ./configure --disable-dependency-tracking --enable-minimal
+    make -j ${THREAD} && make install
+    popd > /dev/null
+    rm -rf libsodium-${libsodium_ver}
+  fi
+
+  if [ ! -e "/usr/local/lib/libzip.la" ]; then
+    tar xzf libzip-${libzip_ver}.tar.gz
+    pushd libzip-${libzip_ver} > /dev/null
+    ./configure
+    make -j ${THREAD} && make install
+    popd > /dev/null
+    rm -rf libzip-${libzip_ver}
+  fi
+
+  if [ ! -e "/usr/local/include/mhash.h" -a ! -e "/usr/include/mhash.h" ]; then
+    tar xzf mhash-${mhash_ver}.tar.gz
+    pushd mhash-${mhash_ver} > /dev/null
+    ./configure
+    make -j ${THREAD} && make install
+    popd > /dev/null
+    rm -rf mhash-${mhash_ver}
+  fi
+
+  [ -z "`grep /usr/local/lib /etc/ld.so.conf.d/*.conf`" ] && echo '/usr/local/lib' > /etc/ld.so.conf.d/local.conf
+  ldconfig
+
+  if [ "${PM}" == 'yum' ]; then
+    [ ! -e "/lib64/libpcre.so.1" ] && ln -s /lib64/libpcre.so.0.0.1 /lib64/libpcre.so.1
+    [ ! -e "/usr/lib/libc-client.so" ] && ln -s /usr/lib64/libc-client.so /usr/lib/libc-client.so
+  fi
+
+  id -g ${run_group} >/dev/null 2>&1
+  [ $? -ne 0 ] && groupadd ${run_group}
+  id -u ${run_user} >/dev/null 2>&1
+  [ $? -ne 0 ] && useradd -g ${run_group} -M -s /sbin/nologin ${run_user}
+
+  tar xzf php-${php82_ver}.tar.gz
+  pushd php-${php82_ver} > /dev/null
+  make clean
+  export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/:$PKG_CONFIG_PATH
+  [ ! -d "${php_install_dir}" ] && mkdir -p ${php_install_dir}
+  [ "${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 \
+    --with-config-file-scan-dir=${php_install_dir}/etc/php.d \
+    --with-apxs2=${apache_install_dir}/bin/apxs ${phpcache_arg} --disable-fileinfo \
+    --enable-mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd \
+    --with-iconv=/usr/local --with-freetype --with-jpeg --with-zlib \
+    --enable-xml --disable-rpath --enable-bcmath --enable-shmop --enable-exif \
+    --enable-sysvsem ${php82_with_curl} --enable-mbregex \
+    --enable-mbstring --with-password-argon2 --with-sodium=/usr/local --enable-gd ${php82_with_openssl} \
+    --with-mhash --enable-pcntl --enable-sockets --enable-ftp --enable-intl --with-xsl \
+    --with-gettext --with-zip=/usr/local --enable-soap --disable-debug ${php_modules_options}
+  else
+    ./configure --prefix=${php_install_dir} --with-config-file-path=${php_install_dir}/etc \
+    --with-config-file-scan-dir=${php_install_dir}/etc/php.d \
+    --with-fpm-user=${run_user} --with-fpm-group=${run_group} --enable-fpm ${phpcache_arg} --disable-fileinfo \
+    --enable-mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd \
+    --with-iconv=/usr/local --with-freetype --with-jpeg --with-zlib \
+    --enable-xml --disable-rpath --enable-bcmath --enable-shmop --enable-exif \
+    --enable-sysvsem ${php82_with_curl} --enable-mbregex \
+    --enable-mbstring --with-password-argon2 --with-sodium=/usr/local --enable-gd ${php82_with_openssl} \
+    --with-mhash --enable-pcntl --enable-sockets --enable-ftp --enable-intl --with-xsl \
+    --with-gettext --with-zip=/usr/local --enable-soap --disable-debug ${php_modules_options}
+  fi
+  make ZEND_EXTRA_LIBS='-liconv' -j ${THREAD}
+  make install
+
+  if [ -e "${php_install_dir}/bin/phpize" ]; then
+    [ ! -e "${php_install_dir}/etc/php.d" ] && mkdir -p ${php_install_dir}/etc/php.d
+    echo "${CSUCCESS}PHP installed successfully! ${CEND}"
+  else
+    rm -rf ${php_install_dir}
+    echo "${CFAILURE}PHP install failed, Please Contact the author! ${CEND}"
+    kill -9 $$; exit 1;
+  fi
+
+  [ -z "`grep ^'export PATH=' /etc/profile`" ] && echo "export PATH=${php_install_dir}/bin:\$PATH" >> /etc/profile
+  [ -n "`grep ^'export PATH=' /etc/profile`" -a -z "`grep ${php_install_dir} /etc/profile`" ] && sed -i "s@^export PATH=\(.*\)@export PATH=${php_install_dir}/bin:\1@" /etc/profile
+  . /etc/profile
+
+  # wget -c http://pear.php.net/go-pear.phar
+  # ${php_install_dir}/bin/php go-pear.phar
+
+  /bin/cp php.ini-production ${php_install_dir}/etc/php.ini
+
+  sed -i "s@^memory_limit.*@memory_limit = ${Memory_limit}M@" ${php_install_dir}/etc/php.ini
+  sed -i 's@^output_buffering =@output_buffering = On\noutput_buffering =@' ${php_install_dir}/etc/php.ini
+  #sed -i 's@^;cgi.fix_pathinfo.*@cgi.fix_pathinfo=0@' ${php_install_dir}/etc/php.ini
+  sed -i 's@^short_open_tag = Off@short_open_tag = On@' ${php_install_dir}/etc/php.ini
+  sed -i 's@^expose_php = On@expose_php = Off@' ${php_install_dir}/etc/php.ini
+  sed -i 's@^request_order.*@request_order = "CGP"@' ${php_install_dir}/etc/php.ini
+  sed -i "s@^;date.timezone.*@date.timezone = ${timezone}@" ${php_install_dir}/etc/php.ini
+  sed -i 's@^post_max_size.*@post_max_size = 100M@' ${php_install_dir}/etc/php.ini
+  sed -i 's@^upload_max_filesize.*@upload_max_filesize = 50M@' ${php_install_dir}/etc/php.ini
+  sed -i 's@^max_execution_time.*@max_execution_time = 600@' ${php_install_dir}/etc/php.ini
+  sed -i 's@^;realpath_cache_size.*@realpath_cache_size = 2M@' ${php_install_dir}/etc/php.ini
+  sed -i 's@^disable_functions.*@disable_functions = passthru,exec,system,chroot,chgrp,chown,shell_exec,proc_open,proc_get_status,ini_alter,ini_restore,dl,readlink,symlink,popepassthru,stream_socket_server,fsocket,popen@' ${php_install_dir}/etc/php.ini
+  [ -e /usr/sbin/sendmail ] && sed -i 's@^;sendmail_path.*@sendmail_path = /usr/sbin/sendmail -t -i@' ${php_install_dir}/etc/php.ini
+  if [ "${with_old_openssl_flag}" = 'y' ]; then
+    sed -i "s@^;curl.cainfo.*@curl.cainfo = \"${openssl_install_dir}/cert.pem\"@" ${php_install_dir}/etc/php.ini
+    sed -i "s@^;openssl.cafile.*@openssl.cafile = \"${openssl_install_dir}/cert.pem\"@" ${php_install_dir}/etc/php.ini
+    sed -i "s@^;openssl.capath.*@openssl.capath = \"${openssl_install_dir}/cert.pem\"@" ${php_install_dir}/etc/php.ini
+  fi
+
+  [ "${phpcache_option}" == '1' ] && cat > ${php_install_dir}/etc/php.d/02-opcache.ini << EOF
+[opcache]
+zend_extension=opcache.so
+opcache.enable=1
+opcache.enable_cli=1
+opcache.memory_consumption=${Memory_limit}
+opcache.interned_strings_buffer=8
+opcache.max_accelerated_files=100000
+opcache.max_wasted_percentage=5
+opcache.use_cwd=1
+opcache.validate_timestamps=1
+opcache.revalidate_freq=60
+;opcache.save_comments=0
+opcache.consistency_checks=0
+;opcache.optimization_level=0
+EOF
+
+  if [ "${apache_mode_option}" != '2' ]; then
+    # php-fpm Init Script
+    /bin/cp ${oneinstack_dir}/init.d/php-fpm.service /lib/systemd/system/
+    sed -i "s@/usr/local/php@${php_install_dir}@g" /lib/systemd/system/php-fpm.service
+    systemctl enable php-fpm
+
+    cat > ${php_install_dir}/etc/php-fpm.conf <<EOF
+;;;;;;;;;;;;;;;;;;;;;
+; FPM Configuration ;
+;;;;;;;;;;;;;;;;;;;;;
+
+;;;;;;;;;;;;;;;;;;
+; Global Options ;
+;;;;;;;;;;;;;;;;;;
+
+[global]
+pid = run/php-fpm.pid
+error_log = log/php-fpm.log
+log_level = warning
+
+emergency_restart_threshold = 30
+emergency_restart_interval = 60s
+process_control_timeout = 5s
+daemonize = yes
+
+;;;;;;;;;;;;;;;;;;;;
+; Pool Definitions ;
+;;;;;;;;;;;;;;;;;;;;
+
+[${run_user}]
+listen = /dev/shm/php-cgi.sock
+listen.backlog = -1
+listen.allowed_clients = 127.0.0.1
+listen.owner = ${run_user}
+listen.group = ${run_group}
+listen.mode = 0666
+user = ${run_user}
+group = ${run_group}
+
+pm = dynamic
+pm.max_children = 12
+pm.start_servers = 8
+pm.min_spare_servers = 6
+pm.max_spare_servers = 12
+pm.max_requests = 2048
+pm.process_idle_timeout = 10s
+request_terminate_timeout = 120
+request_slowlog_timeout = 0
+
+pm.status_path = /php-fpm_status
+slowlog = var/log/slow.log
+rlimit_files = 51200
+rlimit_core = 0
+
+catch_workers_output = yes
+;env[HOSTNAME] = $HOSTNAME
+env[PATH] = /usr/local/bin:/usr/bin:/bin
+env[TMP] = /tmp
+env[TMPDIR] = /tmp
+env[TEMP] = /tmp
+EOF
+
+    if [ $Mem -le 3000 ]; then
+      sed -i "s@^pm.max_children.*@pm.max_children = $(($Mem/3/20))@" ${php_install_dir}/etc/php-fpm.conf
+      sed -i "s@^pm.start_servers.*@pm.start_servers = $(($Mem/3/30))@" ${php_install_dir}/etc/php-fpm.conf
+      sed -i "s@^pm.min_spare_servers.*@pm.min_spare_servers = $(($Mem/3/40))@" ${php_install_dir}/etc/php-fpm.conf
+      sed -i "s@^pm.max_spare_servers.*@pm.max_spare_servers = $(($Mem/3/20))@" ${php_install_dir}/etc/php-fpm.conf
+    elif [ $Mem -gt 3000 -a $Mem -le 4500 ]; then
+      sed -i "s@^pm.max_children.*@pm.max_children = 50@" ${php_install_dir}/etc/php-fpm.conf
+      sed -i "s@^pm.start_servers.*@pm.start_servers = 30@" ${php_install_dir}/etc/php-fpm.conf
+      sed -i "s@^pm.min_spare_servers.*@pm.min_spare_servers = 20@" ${php_install_dir}/etc/php-fpm.conf
+      sed -i "s@^pm.max_spare_servers.*@pm.max_spare_servers = 50@" ${php_install_dir}/etc/php-fpm.conf
+    elif [ $Mem -gt 4500 -a $Mem -le 6500 ]; then
+      sed -i "s@^pm.max_children.*@pm.max_children = 60@" ${php_install_dir}/etc/php-fpm.conf
+      sed -i "s@^pm.start_servers.*@pm.start_servers = 40@" ${php_install_dir}/etc/php-fpm.conf
+      sed -i "s@^pm.min_spare_servers.*@pm.min_spare_servers = 30@" ${php_install_dir}/etc/php-fpm.conf
+      sed -i "s@^pm.max_spare_servers.*@pm.max_spare_servers = 60@" ${php_install_dir}/etc/php-fpm.conf
+    elif [ $Mem -gt 6500 -a $Mem -le 8500 ]; then
+      sed -i "s@^pm.max_children.*@pm.max_children = 70@" ${php_install_dir}/etc/php-fpm.conf
+      sed -i "s@^pm.start_servers.*@pm.start_servers = 50@" ${php_install_dir}/etc/php-fpm.conf
+      sed -i "s@^pm.min_spare_servers.*@pm.min_spare_servers = 40@" ${php_install_dir}/etc/php-fpm.conf
+      sed -i "s@^pm.max_spare_servers.*@pm.max_spare_servers = 70@" ${php_install_dir}/etc/php-fpm.conf
+    elif [ $Mem -gt 8500 ]; then
+      sed -i "s@^pm.max_children.*@pm.max_children = 80@" ${php_install_dir}/etc/php-fpm.conf
+      sed -i "s@^pm.start_servers.*@pm.start_servers = 60@" ${php_install_dir}/etc/php-fpm.conf
+      sed -i "s@^pm.min_spare_servers.*@pm.min_spare_servers = 50@" ${php_install_dir}/etc/php-fpm.conf
+      sed -i "s@^pm.max_spare_servers.*@pm.max_spare_servers = 80@" ${php_install_dir}/etc/php-fpm.conf
+    fi
+
+    systemctl start php-fpm
+
+  elif [ "${apache_mode_option}" == '2' ]; then
+    systemctl restart httpd
+  fi
+  popd > /dev/null
+  [ -e "${php_install_dir}/bin/phpize" ] && rm -rf php-${php82_ver}
+  popd > /dev/null
+}

+ 1 - 4
include/python.sh

@@ -53,10 +53,7 @@ Install_Python() {
     fi
 
     if [ ! -e "/root/.pip/pip.conf" ] ;then
-      # get the IP information
-      PUBLIC_IPADDR=$(../include/get_public_ipaddr.py)
-      IPADDR_COUNTRY=$(../include/get_ipaddr_state.py ${PUBLIC_IPADDR})
-      if [ "${IPADDR_COUNTRY}"x == "CN"x ]; 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

+ 5 - 4
include/upgrade_db.sh

@@ -34,14 +34,15 @@ Upgrade_DB() {
 
   OLD_db_ver_tmp=`${db_install_dir}/bin/mysql -uroot -p${dbrootpwd} -e 'select version()\G;' | grep version | awk '{print $2}'`
   if [ -n "`${db_install_dir}/bin/mysql -V | grep -o MariaDB`" ]; then
-    [ "${IPADDR_COUNTRY}"x == "CN"x ] && DOWN_ADDR=https://mirrors.tuna.tsinghua.edu.cn/mariadb || DOWN_ADDR=https://downloads.mariadb.org/f
+    [ "${OUTIP_STATE}"x == "China"x ] && DOWN_ADDR=https://mirrors.tuna.tsinghua.edu.cn/mariadb || DOWN_ADDR=https://downloads.mariadb.org/f
     DB=MariaDB
     OLD_db_ver=`echo ${OLD_db_ver_tmp} | awk -F'-' '{print $1}'`
   elif [ -n "`${db_install_dir}/bin/mysql -V | grep -o Percona`" ]; then
     DB=Percona
     OLD_db_ver=${OLD_db_ver_tmp}
   else
-    [ "${IPADDR_COUNTRY}"x == "CN"x ] && DOWN_ADDR=http://mirrors.ustc.edu.cn/mysql-ftp/Downloads || DOWN_ADDR=http://cdn.mysql.com/Downloads
+    #[ "${OUTIP_STATE}"x == "China"x ] && DOWN_ADDR=http://mirrors.ustc.edu.cn/mysql-ftp/Downloads || DOWN_ADDR=http://cdn.mysql.com/Downloads
+    DOWN_ADDR=http://cdn.mysql.com/Downloads
     DB=MySQL
     OLD_db_ver=${OLD_db_ver_tmp%%-log}
   fi
@@ -68,7 +69,7 @@ Upgrade_DB() {
           perconaVerStr1=${NEW_db_ver}
         fi
         if [[ "`echo ${NEW_db_ver} | awk -F. '{print $1"."$2}'`" =~ ^8.0$ ]]; then
-           DB_filename=Percona-Server-${perconaVerStr1}-Linux.x86_64.glibc2.27
+           DB_filename=Percona-Server-${perconaVerStr1}-Linux.x86_64.glibc2.28
         elif [[ "`echo ${NEW_db_ver} | awk -F. '{print $1"."$2}'`" =~ ^5.7$ ]]; then
            DB_filename=Percona-Server-${perconaVerStr1}-Linux.x86_64.glibc2.17
         else
@@ -121,7 +122,7 @@ Upgrade_DB() {
       ${mariadb_install_dir}/bin/mysql_upgrade -uroot -p${dbrootpwd} >/dev/null 2>&1
       [ $? -eq 0 ] &&  echo "You have ${CMSG}successfully${CEND} upgrade from ${CMSG}${OLD_db_ver}${CEND} to ${CMSG}${NEW_db_ver}${CEND}"
     elif [ "${DB}" == 'Percona' ]; then
-      tar xzf ./${DB_filename}.tar.gz
+      tar xzf ${DB_filename}.tar.gz
       service mysqld stop
       mv ${percona_install_dir}{,_old_`date +"%Y%m%d_%H%M%S"`}
       mv ${percona_data_dir}{,_old_`date +"%Y%m%d_%H%M%S"`}

+ 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
-      [ "${IPADDR_COUNTRY}"x == "CN"x ] && DOWN_ADDR=http://mirrors.linuxeye.com/oneinstack/src || DOWN_ADDR=http://www.memcached.org/files
+      [ "${OUTIP_STATE}"x == "China"x ] && DOWN_ADDR=http://mirrors.linuxeye.com/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! "

+ 21 - 20
install.sh

@@ -37,7 +37,7 @@ dbinstallmethod=1
 
 version() {
   echo "version: 2.6"
-  echo "updated date: 2022-09-03"
+  echo "updated date: 2022-11-22"
 }
 
 Show_Help() {
@@ -49,7 +49,7 @@ Show_Help() {
   --apache                    Install Apache
   --apache_mode_option [1-2]  Apache2.4 mode, 1(default): php-fpm, 2: mod_php
   --apache_mpm_option [1-3]   Apache2.4 MPM, 1(default): event, 2: prefork, 3: worker
-  --php_option [1-11]         Install PHP version
+  --php_option [1-12]         Install PHP version
   --mphp_ver [53~81]          Install another PHP version (PATH: ${php_install_dir}\${mphp_ver})
   --mphp_addons               Only install another PHP addons
   --phpcache_option [1-4]     Install PHP opcode cache, default: 1 opcache
@@ -106,7 +106,7 @@ while :; do
       ;;
     --php_option)
       php_option=$2; shift 2
-      [[ ! ${php_option} =~ ^[1-9]$|^1[0-1]$ ]] && { echo "${CWARNING}php_option input error! Please only input number 1~11${CEND}"; exit 1; }
+      [[ ! ${php_option} =~ ^[1-9]$|^1[0-2]$ ]] && { echo "${CWARNING}php_option input error! Please only input number 1~12${CEND}"; exit 1; }
       [ -e "${php_install_dir}/bin/phpize" ] && { echo "${CWARNING}PHP already installed! ${CEND}"; unset php_option; }
       ;;
     --mphp_ver)
@@ -462,10 +462,11 @@ if [ ${ARG_NUM} == 0 ]; then
           echo -e "\t${CMSG} 9${CEND}. Install php-7.4"
           echo -e "\t${CMSG}10${CEND}. Install php-8.0"
           echo -e "\t${CMSG}11${CEND}. Install php-8.1"
+          echo -e "\t${CMSG}12${CEND}. Install php-8.2"
           read -e -p "Please input a number:(Default 7 press Enter) " php_option
           php_option=${php_option:-7}
-          if [[ ! ${php_option} =~ ^[1-9]$|^1[0-1]$ ]]; then
-            echo "${CWARNING}input error! Please only input number 1~11${CEND}"
+          if [[ ! ${php_option} =~ ^[1-9]$|^1[0-2]$ ]]; then
+            echo "${CWARNING}input error! Please only input number 1~12${CEND}"
           else
             break
           fi
@@ -482,7 +483,7 @@ if [ ${ARG_NUM} == 0 ]; then
   fi
 
   # PHP opcode cache and extensions
-  if [[ ${php_option} =~ ^[1-9]$|^1[0-1]$ ]] || [ -e "${php_install_dir}/bin/phpize" ]; then
+  if [[ ${php_option} =~ ^[1-9]$|^1[0-2]$ ]] || [ -e "${php_install_dir}/bin/phpize" ]; then
     while :; do echo
       read -e -p "Do you want to install opcode cache of the PHP? [y/n]: " phpcache_flag
       if [[ ! ${phpcache_flag} =~ ^[y,n]$ ]]; then
@@ -540,8 +541,8 @@ if [ ${ARG_NUM} == 0 ]; then
             while :; do
               echo 'Please select a opcode cache of the PHP:'
               echo -e "\t${CMSG}1${CEND}. Install Zend OPcache"
-              echo -e "\t${CMSG}2${CEND}. Install XCache"
-              echo -e "\t${CMSG}3${CEND}. Install APCU"
+              echo -e "\t${CMSG}2${CEND}. Install APCU"
+              echo -e "\t${CMSG}3${CEND}. Install XCache"
               read -e -p "Please input a number:(Default 1 press Enter) " phpcache_option
               phpcache_option=${phpcache_option:-1}
               if [[ ! ${phpcache_option} =~ ^[1-3]$ ]]; then
@@ -551,7 +552,7 @@ if [ ${ARG_NUM} == 0 ]; then
               fi
             done
           fi
-          if [[ ${php_option} =~ ^[5-9]$|^1[0-1]$ ]] || [[ "${PHP_main_ver}" =~ ^7.[0-4]$|^8.[0-1]$ ]]; then
+          if [[ ${php_option} =~ ^[5-9]$|^1[0-2]$ ]] || [[ "${PHP_main_ver}" =~ ^7.[0-4]$|^8.[0-2]$ ]]; then
             while :; do
               echo 'Please select a opcode cache of the PHP:'
               echo -e "\t${CMSG}1${CEND}. Install Zend OPcache"
@@ -655,7 +656,7 @@ if [ ${ARG_NUM} == 0 ]; then
   done
 
   # check phpMyAdmin
-  if [[ ${php_option} =~ ^[1-9]$|^1[0-1]$ ]] || [ -e "${php_install_dir}/bin/phpize" ]; then
+  if [[ ${php_option} =~ ^[1-9]$|^1[0-2]$ ]] || [ -e "${php_install_dir}/bin/phpize" ]; then
     while :; do echo
       read -e -p "Do you want to install phpMyAdmin? [y/n]: " phpmyadmin_flag
       if [[ ! ${phpmyadmin_flag} =~ ^[y,n]$ ]]; then
@@ -696,21 +697,17 @@ if [[ ${nginx_option} =~ ^[1-3]$ ]] || [ "${apache_flag}" == 'y' ] || [[ ${tomca
 fi
 [ -d /data ] && chmod 755 /data
 
-# install wget gcc curl python
+# install wget gcc curl
 if [ ! -e ~/.oneinstack ]; then
   downloadDepsSrc=1
   [ "${PM}" == 'apt-get' ] && apt-get -y update > /dev/null
-  [ "${PM}" == 'yum' ] && yum clean all
-  ${PM} -y install wget gcc curl python
-  [ "${RHEL_ver}" == '8' ] && { yum -y install python36; sudo alternatives --set python /usr/bin/python3; }
-  [ ! -e "/usr/bin/python" ] && [ -e "/usr/bin/python3" ] && ln -s /usr/bin/python3 /usr/bin/python
-  clear
+  [ "${PM}" == 'yum' ] && yum clean all > /dev/null
+  ${PM} -y install wget gcc curl > /dev/null
 fi
 
 # get the IP information
-IPADDR=$(./include/get_ipaddr.py)
-PUBLIC_IPADDR=$(./include/get_public_ipaddr.py)
-IPADDR_COUNTRY=$(./include/get_ipaddr_state.py ${PUBLIC_IPADDR})
+IPADDR=$(./include/ois.${ARCH} ip_local)
+OUTIP_STATE=$(./include/ois.${ARCH} ip_state)
 
 # openSSL
 . ./include/openssl.sh
@@ -889,6 +886,10 @@ case "${php_option}" in
     . include/php-8.1.sh
     Install_PHP81 2>&1 | tee -a ${oneinstack_dir}/install.log
     ;;
+  12)
+    . include/php-8.2.sh
+    Install_PHP82 2>&1 | tee -a ${oneinstack_dir}/install.log
+    ;;
 esac
 
 PHP_addons() {
@@ -1142,7 +1143,7 @@ echo "Total OneinStack Install Time: ${CQUESTION}${installTime}${CEND} minutes"
 [ "${db_option}" == '14' ] && echo "$(printf "%-32s" "MongoDB data dir:")${CMSG}${mongo_data_dir}${CEND}"
 [ "${db_option}" == '14' ] && echo "$(printf "%-32s" "MongoDB user:")${CMSG}root${CEND}"
 [ "${db_option}" == '14' ] && echo "$(printf "%-32s" "MongoDB password:")${CMSG}${dbmongopwd}${CEND}"
-[[ "${php_option}" =~ ^[1-9]$|^1[0-1]$ ]] && echo -e "\n$(printf "%-32s" "PHP install dir:")${CMSG}${php_install_dir}${CEND}"
+[[ "${php_option}" =~ ^[1-9]$|^1[0-2]$ ]] && echo -e "\n$(printf "%-32s" "PHP install dir:")${CMSG}${php_install_dir}${CEND}"
 [ "${phpcache_option}" == '1' ] && echo "$(printf "%-32s" "Opcache Control Panel URL:")${CMSG}http://${IPADDR}/ocp.php${CEND}"
 [ "${phpcache_option}" == '2' ] && echo "$(printf "%-32s" "APC Control Panel URL:")${CMSG}http://${IPADDR}/apc.php${CEND}"
 [ "${phpcache_option}" == '3' -a -e "${php_install_dir}/etc/php.d/04-xcache.ini" ] && echo "$(printf "%-32s" "xcache Control Panel URL:")${CMSG}http://${IPADDR}/xcache${CEND}"

+ 0 - 13
tools/ckssh.py

@@ -1,13 +0,0 @@
-#!/usr/bin/env python
-# Author:  yeho <lj2007331 AT gmail.com>
-# Blog:  http://linuxeye.com
-
-import socket,sys
-sk = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
-sk.settimeout(1)
-try:
-  sk.connect((sys.argv[1],int(sys.argv[2])))
-  print ('ok')
-except Exception:
-  print ('no')
-sk.close()

+ 1 - 1
tools/mabs.sh

@@ -113,7 +113,7 @@ do
   # while read Line
   do
     #[ -z "`echo $IP | grep -E '^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}|CNS'`" ] && continue
-    if [ "`python ./ckssh.py $IP $PORT`" == 'no' ]; then
+    if [ "$(../include/ois.${ARCH} conn_port --host ${IP} --port ${PORT})" == "false" ]; then
       [ ! -e ipnologin.txt ] && > ipnologin.txt
       [ -z "`grep $IP ipnologin.txt | grep $(date +%F)`" ] && echo "`date +%F_%H%M` $IP" >> ipnologin.txt
       continue

+ 2 - 3
upgrade.sh

@@ -37,9 +37,8 @@ pushd ${oneinstack_dir} > /dev/null
 . ./include/upgrade_phpmyadmin.sh
 . ./include/upgrade_oneinstack.sh
 
-# get the IP information
-PUBLIC_IPADDR=$(./include/get_public_ipaddr.py)
-IPADDR_COUNTRY=$(./include/get_ipaddr_state.py ${PUBLIC_IPADDR})
+# get the out ip country
+OUTIP_STATE=$(./include/ois.${ARCH} ip_state)
 
 Show_Help() {
   echo

+ 12 - 11
versions.txt

@@ -7,8 +7,8 @@ openssl11_ver=1.1.1s
 openssl_ver=1.0.2u
 
 tomcat10_ver=10.0.27
-tomcat9_ver=9.0.68
-tomcat8_ver=8.5.83
+tomcat9_ver=9.0.70
+tomcat8_ver=8.5.84
 tomcat7_ver=7.0.109
 
 apache_ver=2.4.54
@@ -28,8 +28,8 @@ mariadb105_ver=10.5.18
 mariadb104_ver=10.4.27
 mariadb55_ver=5.5.68
 
-percona80_ver=8.0.29-21
-percona57_ver=5.7.39-42
+percona80_ver=8.0.30-22
+percona57_ver=5.7.40-43
 percona56_ver=5.6.51-91.0
 percona55_ver=5.5.62-38.14
 
@@ -49,9 +49,10 @@ php73_ver=7.3.33
 php74_ver=7.4.32
 php80_ver=8.0.25
 php81_ver=8.1.12
+php82_ver=8.2.0
 
 # Nodejs
-nodejs_ver=18.12.0
+nodejs_ver=18.12.1
 
 libiconv_ver=1.16
 curl_ver=7.86.0
@@ -63,8 +64,8 @@ icu4c_ver=63_1
 libsodium_ver=1.0.18
 libzip_ver=1.2.0
 argon2_ver=20171227
-imagemagick_ver=7.1.0-52
-imagick_ver=3.5.1
+imagemagick_ver=7.1.0-55
+imagick_ver=3.7.0
 imagick_oldver=3.4.4
 graphicsmagick_ver=1.3.36
 gmagick_ver=2.0.6RC1
@@ -78,8 +79,8 @@ phalcon_ver=4.1.2
 phalcon_oldver=3.4.5
 yaf_ver=3.3.2
 yar_ver=2.2.0
-swoole_ver=4.8.10
-swoole_oldver=4.5.2
+swoole_ver=5.0.1
+swoole_oldver=4.8.12
 xdebug_ver=3.1.2
 xdebug_oldver=2.9.8
 
@@ -87,7 +88,7 @@ xdebug_oldver=2.9.8
 pureftpd_ver=1.0.51
 
 # Redis
-redis_ver=7.0.5
+redis_ver=7.0.6
 redis_oldver=5.0.14
 pecl_redis_ver=5.3.7
 pecl_redis_oldver=4.3.0
@@ -95,7 +96,7 @@ pecl_redis_oldver=4.3.0
 # Memcached
 memcached_ver=1.6.17
 libmemcached_ver=1.0.18
-pecl_memcached_ver=3.1.5
+pecl_memcached_ver=3.2.0
 pecl_memcached_oldver=2.2.0
 pecl_memcache_ver=4.0.5.2
 pecl_memcache_oldver=3.0.8

+ 6 - 4
vhost.sh

@@ -191,7 +191,7 @@ If you enter '.', the field will be left blank.
           echo "${CWARNING}input error!${CEND}"
         fi
       done
-    if [ ! -e ~/.acme.sh/ca/acme.zerossl.com/account.key ]; then
+    if [ ! -e ~/.acme.sh/ca/acme.zerossl.com/v2/DV90/account.key ]; then
       while :; do echo
         read -e -p "Please enter your email: " EMAIL
         echo
@@ -353,11 +353,12 @@ What Are You Doing?
         [ -e "/dev/shm/php73-cgi.sock" ] && echo -e "\t${CMSG} 8${CEND}. PHP 7.3"
         [ -e "/dev/shm/php74-cgi.sock" ] && echo -e "\t${CMSG} 9${CEND}. PHP 7.4"
         [ -e "/dev/shm/php80-cgi.sock" ] && echo -e "\t${CMSG}10${CEND}. PHP 8.0"
-        [ -e "/dev/shm/php81-cgi.sock" ] && echo -e "\t${CMSG}10${CEND}. PHP 8.1"
+        [ -e "/dev/shm/php81-cgi.sock" ] && echo -e "\t${CMSG}11${CEND}. PHP 8.1"
+        [ -e "/dev/shm/php82-cgi.sock" ] && echo -e "\t${CMSG}12${CEND}. PHP 8.2"
         read -e -p "Please input a number:(Default 0 press Enter) " php_option
         php_option=${php_option:-0}
-        if [[ ! ${php_option} =~ ^[0-9]$|^1[0-1]$ ]]; then
-          echo "${CWARNING}input error! Please only input number 0~11${CEND}"
+        if [[ ! ${php_option} =~ ^[0-9]$|^1[0-2]$ ]]; then
+          echo "${CWARNING}input error! Please only input number 1~12${CEND}"
         else
           break
         fi
@@ -374,6 +375,7 @@ What Are You Doing?
     [ "${php_option}" == '9' ] && mphp_ver=74
     [ "${php_option}" == '10' ] && mphp_ver=80
     [ "${php_option}" == '11' ] && mphp_ver=81
+    [ "${php_option}" == '12' ] && mphp_ver=82
     [ ! -e "/dev/shm/php${mphp_ver}-cgi.sock" ] && unset mphp_ver
   fi