Browse Source

[fix] Update PHP-8.0

lj2007331@gmail.com 4 years ago
parent
commit
dd71b2fc3d
5 changed files with 55 additions and 67 deletions
  1. 2 2
      README.md
  2. 39 51
      include/check_download.sh
  3. 3 3
      include/percona-8.0.sh
  4. 6 6
      include/php-8.0.sh
  5. 5 5
      versions.txt

+ 2 - 2
README.md

@@ -1,13 +1,13 @@
 [![PayPal donate button](https://img.shields.io/badge/paypal-donate-green.svg)](https://paypal.me/yeho) [![支付宝捐助按钮](https://img.shields.io/badge/%E6%94%AF%E4%BB%98%E5%AE%9D-%E5%90%91TA%E6%8D%90%E5%8A%A9-green.svg)](https://static.oneinstack.com/images/alipay.png) [![微信捐助按钮](https://img.shields.io/badge/%E5%BE%AE%E4%BF%A1-%E5%90%91TA%E6%8D%90%E5%8A%A9-green.svg)](https://static.oneinstack.com/images/weixin.png)
 
-This script is written using the shell, in order to quickly deploy `LEMP`/`LAMP`/`LNMP`/`LNMPA`/`LTMP`(Linux, Nginx/Tengine/OpenResty, MySQL in a production environment/MariaDB/Percona, PHP, JAVA), applicable to CentOS 6 ~ 8(including redhat), Debian 8 ~ 10, Ubuntu 14 ~ 19, Fedora 27+ of 32 and 64.
+This script is written using the shell, in order to quickly deploy `LEMP`/`LAMP`/`LNMP`/`LNMPA`/`LTMP`(Linux, Nginx/Tengine/OpenResty, MySQL in a production environment/MariaDB/Percona, PHP, JAVA), applicable to CentOS 6 ~ 8(including redhat), Debian 8 ~ 10, Ubuntu 14 ~ 20, Fedora 27+ of 32 and 64.
 
 Script properties:
 - Continually updated, Provide Shell Interaction and Autoinstall
 - 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, AliSQL-5.6, PostgreSQL, MongoDB)
-- Providing multiple PHP versions (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.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 and ngx_lua_waf
 - Providing a plurality of Tomcat version (Tomcat-9, Tomcat-8, Tomcat-7, Tomcat-6)
 - Providing a plurality of JDK version (JDK-11.0, JDK-1.8, JDK-1.7, JDK-1.6)

+ 39 - 51
include/check_download.sh

@@ -331,7 +331,7 @@ checkDownload() {
         # Percona 8.0
         if [ "${dbinstallmethod}" == '1' ]; then
           echo "Download Percona 8.0 binary package..."
-          FILE_NAME=Percona-Server-${percona80_ver}-Linux.${SYS_BIT_b}.glibc2.12.tar.gz
+          FILE_NAME=Percona-Server-${percona80_ver}-Linux.${SYS_BIT_b}.glibc2.17.tar.gz
           DOWN_ADDR_PERCONA=https://www.percona.com/downloads/Percona-Server-8.0/Percona-Server-${percona80_ver}/binary/tarball
         elif [ "${dbinstallmethod}" == '2' ]; then
           echo "Download Percona 8.0 source package..."
@@ -524,9 +524,9 @@ checkDownload() {
   fi
 
   # PHP
-  if [[ "${php_option}" =~ ^[1-9]$|^10$ ]]; then
+  if [[ "${php_option}" =~ ^[1-9]$|^10$ ]] || [[ "${mphp_ver}" =~ ^5[3-6]$|^7[0-4]$|^80$ ]]; then
     echo "PHP common..."
-    src_url=http://ftp.gnu.org/pub/gnu/libiconv/libiconv-${libiconv_ver}.tar.gz && Download_src
+    src_url=${mirrorLink}/libiconv-${libiconv_ver}.tar.gz && Download_src
     src_url=https://curl.haxx.se/download/curl-${curl_ver}.tar.gz && Download_src
     src_url=http://downloads.sourceforge.net/project/mhash/mhash/${mhash_ver}/mhash-${mhash_ver}.tar.gz && Download_src
     src_url=http://downloads.sourceforge.net/project/mcrypt/Libmcrypt/${libmcrypt_ver}/libmcrypt-${libmcrypt_ver}.tar.gz && Download_src
@@ -534,54 +534,42 @@ checkDownload() {
     src_url=${mirrorLink}/freetype-${freetype_ver}.tar.gz && Download_src
   fi
 
-  case "${php_option}" in
-    1)
-      # php 5.3
-      src_url=${mirrorLink}/debian_patches_disable_SSLv2_for_openssl_1_0_0.patch && Download_src
-      src_url=${mirrorLink}/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
-      ;;
-    2)
-      src_url=https://secure.php.net/distributions/php-${php54_ver}.tar.gz && Download_src
-      src_url=${mirrorLink}/fpm-race-condition.patch && Download_src
-      ;;
-    3)
-      src_url=https://secure.php.net/distributions/php-${php55_ver}.tar.gz && Download_src
-      src_url=${mirrorLink}/fpm-race-condition.patch && Download_src
-      ;;
-    4)
-      src_url=https://secure.php.net/distributions/php-${php56_ver}.tar.gz && Download_src
-      ;;
-    5)
-      src_url=https://secure.php.net/distributions/php-${php70_ver}.tar.gz && Download_src
-      ;;
-    6)
-      src_url=https://secure.php.net/distributions/php-${php71_ver}.tar.gz && Download_src
-      ;;
-    7)
-      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
-      ;;
-    8)
-      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
-      ;;
-    9)
-      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
-      ;;
-    10)
-      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
-      ;;
-  esac
+  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=https://secure.php.net/distributions/php-${php53_ver}.tar.gz && Download_src
+    src_url=${mirrorLink}/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
+  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
+  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
+    src_url=https://secure.php.net/distributions/php-${php70_ver}.tar.gz && Download_src
+  elif [ "${php_option}" == '6' ] || [ "${mphp_ver}" == '71' ]; then
+    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
+  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
+  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
+  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
+  fi
 
   # PHP OPCache
   case "${phpcache_option}" in

+ 3 - 3
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.${SYS_BIT_b}.glibc2.12.tar.gz
-    mv Percona-Server-${percona80_ver}-Linux.${SYS_BIT_b}.glibc2.12/* ${percona_install_dir}
+    tar xzf ./Percona-Server-${percona80_ver}-Linux.${SYS_BIT_b}.glibc2.17.tar.gz
+    mv Percona-Server-${percona80_ver}-Linux.${SYS_BIT_b}.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@/usr/local/Percona-Server-${percona80_ver}-Linux.${SYS_BIT_b}.glibc2.12@${percona_install_dir}@g" ${percona_install_dir}/bin/mysqld_safe
+    sed -i "s@/usr/local/Percona-Server-${percona80_ver}-Linux.${SYS_BIT_b}.glibc2.17@${percona_install_dir}@g" ${percona_install_dir}/bin/mysqld_safe
     sed -i 's@executing mysqld_safe@executing mysqld_safe\nexport LD_PRELOAD=/usr/local/lib/libjemalloc.so@' ${percona_install_dir}/bin/mysqld_safe
   elif [ "${dbinstallmethod}" == "2" ]; then
     if [ "${PM}" == 'yum' ]; then

+ 6 - 6
include/php-8.0.sh

@@ -108,22 +108,22 @@ Install_PHP80() {
     --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-dir=${libiconv_install_dir} --with-freetype --with-jpeg --with-zlib \
+    --with-iconv=${libiconv_install_dir} --with-freetype --with-jpeg --with-zlib \
     --enable-xml --disable-rpath --enable-bcmath --enable-shmop --enable-exif \
-    --enable-sysvsem --enable-inline-optimization --with-curl=${curl_install_dir} --enable-mbregex \
+    --enable-sysvsem --with-curl=${curl_install_dir} --enable-mbregex \
     --enable-mbstring --with-password-argon2 --with-sodium=/usr/local --enable-gd --with-openssl=${openssl_install_dir} \
-    --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-ftp --enable-intl --with-xsl \
+    --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-dir=${libiconv_install_dir} --with-freetype --with-jpeg --with-zlib \
+    --with-iconv=${libiconv_install_dir} --with-freetype --with-jpeg --with-zlib \
     --enable-xml --disable-rpath --enable-bcmath --enable-shmop --enable-exif \
-    --enable-sysvsem --enable-inline-optimization --with-curl=${curl_install_dir} --enable-mbregex \
+    --enable-sysvsem --with-curl=${curl_install_dir} --enable-mbregex \
     --enable-mbstring --with-password-argon2 --with-sodium=/usr/local --enable-gd --with-openssl=${openssl_install_dir} \
-    --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-ftp --enable-intl --with-xsl \
+    --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}

+ 5 - 5
versions.txt

@@ -6,9 +6,9 @@ openresty_ver=1.19.3.1
 openssl11_ver=1.1.1h
 openssl_ver=1.0.2u
 
-tomcat9_ver=9.0.39
-tomcat8_ver=8.5.59
-tomcat7_ver=7.0.106
+tomcat9_ver=9.0.41
+tomcat8_ver=8.5.61
+tomcat7_ver=7.0.107
 tomcat6_ver=6.0.53
 
 apache24_ver=2.4.46
@@ -29,7 +29,7 @@ mariadb104_ver=10.4.17
 mariadb103_ver=10.3.27
 mariadb55_ver=5.5.68
 
-percona80_ver=8.0.21-12
+percona80_ver=8.0.22-13
 percona57_ver=5.7.32-35
 percona56_ver=5.6.50-90.0
 percona55_ver=5.5.62-38.14
@@ -68,7 +68,7 @@ icu4c_ver=63_1
 libsodium_ver=1.0.18
 libzip_ver=1.2.0
 argon2_ver=20171227
-imagemagick_ver=7.0.10-48
+imagemagick_ver=7.0.10-52
 imagick_ver=3.4.4
 graphicsmagick_ver=1.3.35
 gmagick_ver=2.0.5RC1