Переглянути джерело

feat: Add PHP-8.3 and Update version

oneinstack 1 рік тому
батько
коміт
05ea5855f6
10 змінених файлів з 335 додано та 30 видалено
  1. 1 1
      README.md
  2. 6 1
      include/check_download.sh
  3. 4 0
      include/mphp.sh
  4. 12 0
      include/openssl.sh
  5. 1 1
      include/pecl_phalcon.sh
  6. 276 0
      include/php-8.3.sh
  7. 14 9
      install.sh
  8. 2 2
      uninstall.sh
  9. 17 16
      versions.txt
  10. 2 0
      vhost.sh

+ 1 - 1
README.md

@@ -5,7 +5,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.11, MariaDB-10.5, MariaDB-10.4, MariaDB-5.5, Percona-8.0, Percona-5.7, Percona-5.6, Percona-5.5, PostgreSQL, MongoDB)
-- 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)
+- Providing multiple PHP versions (PHP-8.3, 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, OpenJDK-17)

+ 6 - 1
include/check_download.sh

@@ -481,7 +481,7 @@ checkDownload() {
   fi
 
   # PHP
-  if [[ "${php_option}" =~ ^[1-9]$|^1[0-2]$ ]] || [[ "${mphp_ver}" =~ ^5[3-6]$|^7[0-4]$|^8[0-2]$ ]]; then
+  if [[ "${php_option}" =~ ^[1-9]$|^1[0-3]$ ]] || [[ "${mphp_ver}" =~ ^5[3-6]$|^7[0-4]$|^8[0-3]$ ]]; then
     echo "PHP common..."
     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
@@ -536,6 +536,11 @@ checkDownload() {
     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}" == '13' ] || [ "${mphp_ver}" == '83' ]; then
+    src_url=https://secure.php.net/distributions/php-${php83_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

+ 4 - 0
include/mphp.sh

@@ -64,6 +64,10 @@ Install_MPHP() {
           . include/php-8.2.sh
           Install_PHP82 2>&1 | tee -a ${oneinstack_dir}/install.log
           ;;
+        83)
+          . include/php-8.3.sh
+          Install_PHP83 2>&1 | tee -a ${oneinstack_dir}/install.log
+          ;;
       esac
       if [ -e "${php_install_dir}/sbin/php-fpm" ]; then
         systemctl stop php-fpm

+ 12 - 0
include/openssl.sh

@@ -18,6 +18,7 @@ if openssl version | grep -Eqi 'OpenSSL 1.0.2*'; then
   php80_with_openssl="--with-openssl"
   php81_with_openssl="--with-openssl"
   php82_with_openssl="--with-openssl"
+  php83_with_openssl="--with-openssl"
 
   php5_with_ssl="--with-ssl"
   php70_with_ssl="--with-ssl"
@@ -28,6 +29,7 @@ if openssl version | grep -Eqi 'OpenSSL 1.0.2*'; then
   php80_with_ssl="--with-ssl"
   php81_with_ssl="--with-ssl"
   php82_with_ssl="--with-ssl"
+  php83_with_ssl="--with-ssl"
 
   php5_with_curl="--with-curl"
   php70_with_curl="--with-curl"
@@ -38,6 +40,7 @@ if openssl version | grep -Eqi 'OpenSSL 1.0.2*'; then
   php80_with_curl="--with-curl"
   php81_with_curl="--with-curl"
   php82_with_curl="--with-curl"
+  php83_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"
@@ -48,6 +51,7 @@ elif openssl version | grep -Eqi 'OpenSSL 1.1.*'; then
   php80_with_openssl="--with-openssl"
   php81_with_openssl="--with-openssl"
   php82_with_openssl="--with-openssl"
+  php83_with_openssl="--with-openssl"
 
   php5_with_ssl="--with-ssl=${openssl_install_dir}"
   php70_with_ssl="--with-ssl"
@@ -58,6 +62,7 @@ elif openssl version | grep -Eqi 'OpenSSL 1.1.*'; then
   php80_with_ssl="--with-ssl"
   php81_with_ssl="--with-ssl"
   php82_with_ssl="--with-ssl"
+  php83_with_ssl="--with-ssl"
 
   php5_with_curl="--with-curl=${curl_install_dir}"
   php70_with_curl="--with-curl"
@@ -68,6 +73,7 @@ elif openssl version | grep -Eqi 'OpenSSL 1.1.*'; then
   php80_with_curl="--with-curl"
   php81_with_curl="--with-curl"
   php82_with_curl="--with-curl"
+  php83_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}"
@@ -79,6 +85,7 @@ elif openssl version | grep -Eqi 'OpenSSL 3.*'; then
   php80_with_openssl="--with-openssl"
   php81_with_openssl="--with-openssl"
   php82_with_openssl="--with-openssl"
+  php83_with_openssl="--with-openssl"
 
   php5_with_ssl="--with-ssl=${openssl_install_dir}"
   php70_with_ssl="--with-ssl=${openssl_install_dir}"
@@ -89,6 +96,7 @@ elif openssl version | grep -Eqi 'OpenSSL 3.*'; then
   php80_with_ssl="--with-ssl"
   php81_with_ssl="--with-ssl"
   php82_with_ssl="--with-ssl"
+  php83_with_ssl="--with-ssl"
 
   php5_with_curl="--with-curl=${curl_install_dir}"
   php70_with_curl="--with-curl=${curl_install_dir}"
@@ -99,6 +107,7 @@ elif openssl version | grep -Eqi 'OpenSSL 3.*'; then
   php80_with_curl="--with-curl"
   php81_with_curl="--with-curl"
   php82_with_curl="--with-curl"
+  php83_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}"
@@ -110,6 +119,7 @@ else
   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}"
+  php83_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}"
@@ -120,6 +130,7 @@ else
   php80_with_ssl="--with-ssl=${openssl_install_dir}"
   php81_with_ssl="--with-ssl=${openssl_install_dir}"
   php82_with_ssl="--with-ssl=${openssl_install_dir}"
+  php83_with_ssl="--with-ssl=${openssl_install_dir}"
 
   php5_with_curl="--with-curl=${curl_install_dir}"
   php70_with_curl="--with-curl=${curl_install_dir}"
@@ -130,6 +141,7 @@ else
   php80_with_curl="--with-curl=${curl_install_dir}"
   php81_with_curl="--with-curl=${curl_install_dir}"
   php82_with_curl="--with-curl=${curl_install_dir}"
+  php83_with_curl="--with-curl=${curl_install_dir}"
   with_old_openssl_flag=y
 fi
 

+ 1 - 1
include/pecl_phalcon.sh

@@ -14,7 +14,7 @@ Install_pecl_phalcon() {
     PHP_detail_ver=$(${php_install_dir}/bin/php-config --version)
     PHP_main_ver=${PHP_detail_ver%.*}
     phpExtensionDir=$(${php_install_dir}/bin/php-config --extension-dir)
-    if [[ "${PHP_main_ver}" =~ ^7.[2-4]$|^8.0$ ]]; then
+    if [[ "${PHP_main_ver}" =~ ^7.[2-4]$|^8.3$ ]]; then
       src_url=https://pecl.php.net/get/phalcon-${phalcon_ver}.tgz && Download_src
       tar xzf phalcon-${phalcon_ver}.tgz
       pushd phalcon-${phalcon_ver} > /dev/null

+ 276 - 0
include/php-8.3.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_PHP83() {
+  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} ${php83_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-${php83_ver}.tar.gz
+  pushd php-${php83_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 ${php83_with_curl} --enable-mbregex \
+    --enable-mbstring --with-password-argon2 --with-sodium=/usr/local --enable-gd ${php83_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 ${php83_with_curl} --enable-mbregex \
+    --enable-mbstring --with-password-argon2 --with-sodium=/usr/local --enable-gd ${php83_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-${php83_ver}
+  popd > /dev/null
+}

+ 14 - 9
install.sh

@@ -49,8 +49,8 @@ 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-12]         Install PHP version
-  --mphp_ver [53~82]          Install another PHP version (PATH: ${php_install_dir}\${mphp_ver})
+  --php_option [1-13]         Install PHP version
+  --mphp_ver [53~83]          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
   --php_extensions [ext name] Install PHP extensions, include zendguardloader,ioncube,
@@ -106,12 +106,12 @@ while :; do
       ;;
     --php_option)
       php_option=$2; shift 2
-      [[ ! ${php_option} =~ ^[1-9]$|^1[0-2]$ ]] && { echo "${CWARNING}php_option input error! Please only input number 1~12${CEND}"; exit 1; }
+      [[ ! ${php_option} =~ ^[1-9]$|^1[0-3]$ ]] && { echo "${CWARNING}php_option input error! Please only input number 1~13${CEND}"; exit 1; }
       [ -e "${php_install_dir}/bin/phpize" ] && { echo "${CWARNING}PHP already installed! ${CEND}"; unset php_option; }
       ;;
     --mphp_ver)
       mphp_ver=$2; mphp_flag=y; shift 2
-      [[ ! "${mphp_ver}" =~ ^5[3-6]$|^7[0-4]$|^8[0-2]$ ]] && { echo "${CWARNING}mphp_ver input error! Please only input number 53~82${CEND}"; exit 1; }
+      [[ ! "${mphp_ver}" =~ ^5[3-6]$|^7[0-4]$|^8[0-3]$ ]] && { echo "${CWARNING}mphp_ver input error! Please only input number 53~83${CEND}"; exit 1; }
       ;;
     --mphp_addons)
       mphp_addons_flag=y; shift 1
@@ -506,10 +506,11 @@ if [ ${ARG_NUM} == 0 ]; then
           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"
+          echo -e "\t${CMSG}13${CEND}. Install php-8.3"
           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-2]$ ]]; then
-            echo "${CWARNING}input error! Please only input number 1~12${CEND}"
+          if [[ ! ${php_option} =~ ^[1-9]$|^1[0-3]$ ]]; then
+            echo "${CWARNING}input error! Please only input number 1~13${CEND}"
           else
             break
           fi
@@ -526,7 +527,7 @@ if [ ${ARG_NUM} == 0 ]; then
   fi
 
   # PHP opcode cache and extensions
-  if [[ ${php_option} =~ ^[1-9]$|^1[0-2]$ ]] || [ -e "${php_install_dir}/bin/phpize" ]; then
+  if [[ ${php_option} =~ ^[1-9]$|^1[0-3]$ ]] || [ -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
@@ -595,7 +596,7 @@ if [ ${ARG_NUM} == 0 ]; then
               fi
             done
           fi
-          if [[ ${php_option} =~ ^[5-9]$|^1[0-2]$ ]] || [[ "${PHP_main_ver}" =~ ^7.[0-4]$|^8.[0-2]$ ]]; then
+          if [[ ${php_option} =~ ^[5-9]$|^1[0-3]$ ]] || [[ "${PHP_main_ver}" =~ ^7.[0-4]$|^8.[0-3]$ ]]; then
             while :; do
               echo 'Please select a opcode cache of the PHP:'
               echo -e "\t${CMSG}1${CEND}. Install Zend OPcache"
@@ -699,7 +700,7 @@ if [ ${ARG_NUM} == 0 ]; then
   done
 
   # check phpMyAdmin
-  if [[ ${php_option} =~ ^[1-9]$|^1[0-2]$ ]] || [ -e "${php_install_dir}/bin/phpize" ]; then
+  if [[ ${php_option} =~ ^[1-9]$|^1[0-3]$ ]] || [ -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
@@ -932,6 +933,10 @@ case "${php_option}" in
     . include/php-8.2.sh
     Install_PHP82 2>&1 | tee -a ${oneinstack_dir}/install.log
     ;;
+  13)
+    . include/php-8.3.sh
+    Install_PHP83 2>&1 | tee -a ${oneinstack_dir}/install.log
+    ;;
 esac
 
 PHP_addons() {

+ 2 - 2
uninstall.sh

@@ -38,7 +38,7 @@ Show_Help() {
   --postgresql                  Uninstall PostgreSQL
   --mongodb                     Uninstall MongoDB
   --php                         Uninstall PHP (PATH: ${php_install_dir})
-  --mphp_ver [53~82]            Uninstall another PHP version (PATH: ${php_install_dir}\${mphp_ver})
+  --mphp_ver [53~83]            Uninstall another PHP version (PATH: ${php_install_dir}\${mphp_ver})
   --allphp                      Uninstall all PHP
   --phpcache                    Uninstall PHP opcode cache
   --php_extensions [ext name]   Uninstall PHP extensions, include zendguardloader,ioncube,
@@ -314,7 +314,7 @@ Uninstall_ALLPHP() {
   [ -e "${apache_install_dir}/conf/httpd.conf" ] && [ -n "`grep libphp ${apache_install_dir}/conf/httpd.conf`" ] && sed -i '/libphp/d' ${apache_install_dir}/conf/httpd.conf
   [ -e "${php_install_dir}" ] && { rm -rf ${php_install_dir}; echo "${CMSG}PHP uninstall completed! ${CEND}"; }
   sed -i "s@${php_install_dir}/bin:@@" /etc/profile
-  for php_ver in 53 54 55 56 70 71 72 73 74 80 81; do
+  for php_ver in 53 54 55 56 70 71 72 73 74 80 81 82 83; do
     [ -e "/etc/init.d/php${php_ver}-fpm" ] && { service php${php_ver}-fpm stop > /dev/null 2>&1; rm -f /etc/init.d/php${php_ver}-fpm; }
     [ -e "/lib/systemd/system/php${php_ver}-fpm.service" ] && { systemctl stop php${php_ver}-fpm > /dev/null 2>&1; systemctl disable php${php_ver}-fpm > /dev/null 2>&1; rm -f /lib/systemd/system/php${php_ver}-fpm.service; }
     [ -e "${php_install_dir}${php_ver}" ] && { rm -rf ${php_install_dir}${php_ver}; echo "${CMSG}PHP${php_ver} uninstall completed! ${CEND}"; }

+ 17 - 16
versions.txt

@@ -6,9 +6,9 @@ openresty_ver=1.21.4.3
 openssl11_ver=1.1.1w
 openssl_ver=1.0.2u
 
-tomcat10_ver=10.1.15
-tomcat9_ver=9.0.82
-tomcat8_ver=8.5.95
+tomcat10_ver=10.1.16
+tomcat9_ver=9.0.83
+tomcat8_ver=8.5.96
 tomcat7_ver=7.0.109
 
 apache_ver=2.4.58
@@ -18,14 +18,14 @@ apr_util_ver=1.6.1
 nghttp2_ver=1.42.0
 
 # DB
-mysql80_ver=8.0.34
-mysql57_ver=5.7.43
+mysql80_ver=8.0.35
+mysql57_ver=5.7.44
 mysql56_ver=5.6.51
 mysql55_ver=5.5.62
 
-mariadb1011_ver=10.11.5
-mariadb105_ver=10.5.22
-mariadb104_ver=10.4.31
+mariadb1011_ver=10.11.6
+mariadb105_ver=10.5.23
+mariadb104_ver=10.4.32
 mariadb55_ver=5.5.68
 
 percona80_ver=8.0.33-25
@@ -48,11 +48,12 @@ php72_ver=7.2.34
 php73_ver=7.3.33
 php74_ver=7.4.33
 php80_ver=8.0.30
-php81_ver=8.1.25
-php82_ver=8.2.12
+php81_ver=8.1.26
+php82_ver=8.2.13
+php83_ver=8.3.0
 
 # Nodejs
-nodejs_ver=20.9.0
+nodejs_ver=20.10.0
 
 libiconv_ver=1.16
 curl_ver=8.4.0
@@ -75,7 +76,7 @@ apcu_ver=5.1.21
 apcu_oldver=4.0.11
 xcache_ver=3.2.0
 eaccelerator_ver=0.9.6.1
-phalcon_ver=4.1.2
+phalcon_ver=5.4.0
 phalcon_oldver=3.4.5
 yaf_ver=3.3.2
 yar_ver=2.2.0
@@ -88,8 +89,8 @@ xdebug_oldver=2.9.8
 pureftpd_ver=1.0.51
 
 # Redis
-redis_ver=7.2.2
-redis_oldver=6.2.13
+redis_ver=7.2.3
+redis_oldver=6.2.14
 pecl_redis_ver=6.0.2
 
 # Memcached
@@ -97,11 +98,11 @@ memcached_ver=1.6.22
 libmemcached_ver=1.0.18
 pecl_memcached_ver=3.2.0
 pecl_memcached_oldver=2.2.0
-pecl_memcache_ver=8.0
+pecl_memcache_ver=8.2
 pecl_memcache_oldver=4.0.5.2
 
 # MongoDB
-pecl_mongodb_ver=1.15.0
+pecl_mongodb_ver=1.16.2
 pecl_mongodb_oldver=1.9.2
 pecl_mongo_ver=1.6.16
 

+ 2 - 0
vhost.sh

@@ -355,6 +355,7 @@ What Are You Doing?
         [ -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}11${CEND}. PHP 8.1"
         [ -e "/dev/shm/php82-cgi.sock" ] && echo -e "\t${CMSG}12${CEND}. PHP 8.2"
+        [ -e "/dev/shm/php83-cgi.sock" ] && echo -e "\t${CMSG}13${CEND}. PHP 8.3"
         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-2]$ ]]; then
@@ -376,6 +377,7 @@ What Are You Doing?
     [ "${php_option}" == '10' ] && mphp_ver=80
     [ "${php_option}" == '11' ] && mphp_ver=81
     [ "${php_option}" == '12' ] && mphp_ver=82
+    [ "${php_option}" == '13' ] && mphp_ver=83
     [ ! -e "/dev/shm/php${mphp_ver}-cgi.sock" ] && unset mphp_ver
   fi