Browse Source

Add yar and Update version

lj2007331@gmail.com 6 years ago
parent
commit
aeb87393f0
7 changed files with 70 additions and 11 deletions
  1. 0 1
      include/check_download.sh
  2. 2 2
      include/pecl_xdebug.sh
  3. 46 0
      include/pecl_yar.sh
  4. 0 1
      include/percona-8.0.sh
  5. 8 1
      install.sh
  6. 8 1
      uninstall.sh
  7. 6 5
      versions.txt

+ 0 - 1
include/check_download.sh

@@ -115,7 +115,6 @@ checkDownload() {
 
   if [[ "${db_option}" =~ ^[1-9]$|^1[0-5]$ ]]; then
     if [[ "${db_option}" =~ ^[1,2,5,6,9]$|^10$ ]] && [ "${dbinstallmethod}" == "2" ]; then
-      [ "${db_option}" == '9' ] && boost_ver=1.67.0
       [[ "${db_option}" =~ ^[2,5,6]$|^10$ ]] && boost_ver=${boost_oldver}
       echo "Download boost..."
       [ "${IPADDR_COUNTRY}"x == "CN"x ] && DOWN_ADDR_BOOST=${mirrorLink} || DOWN_ADDR_BOOST=http://downloads.sourceforge.net/project/boost/boost/${boost_ver}

+ 2 - 2
include/pecl_xdebug.sh

@@ -14,8 +14,8 @@ Install_pecl_xdebug() {
     phpExtensionDir=$(${php_install_dir}/bin/php-config --extension-dir)
     PHP_detail_ver=$(${php_install_dir}/bin/php-config --version)
     PHP_main_ver=${PHP_detail_ver%.*}
-    if [[ "${PHP_main_ver}" =~ ^5.[5-6]$|^7.[0-2]$ ]]; then
-      if [[ "${PHP_main_ver}" =~ ^7.[0-2]$ ]]; then
+    if [[ "${PHP_main_ver}" =~ ^5.[5-6]$|^7.[0-3]$ ]]; then
+      if [[ "${PHP_main_ver}" =~ ^7.[0-3]$ ]]; then
         src_url=https://pecl.php.net/get/xdebug-${xdebug_ver}.tgz && Download_src
         tar xzf xdebug-${xdebug_ver}.tgz
         pushd xdebug-${xdebug_ver} > /dev/null

+ 46 - 0
include/pecl_yar.sh

@@ -0,0 +1,46 @@
+#!/bin/bash
+# Author:  yeho <lj2007331 AT gmail.com>
+# BLOG:  https://linuxeye.com
+#
+# Notes: OneinStack for CentOS/RedHat 6+ Debian 7+ and Ubuntu 12+
+#
+# Project home page:
+#       https://oneinstack.com
+#       https://github.com/oneinstack/oneinstack
+
+Install_pecl_yar() {
+  if [ -e "${php_install_dir}/bin/phpize" ]; then
+    pushd ${oneinstack_dir}/src > /dev/null
+    PHP_detail_ver=$(${php_install_dir}/bin/php-config --version)
+    PHP_main_ver=${PHP_detail_ver%.*}
+    if [[ "${PHP_main_ver}" =~ ^7.[0-3]$ ]]; then
+      phpExtensionDir=$(${php_install_dir}/bin/php-config --extension-dir)
+      src_url=https://pecl.php.net/get/yar-${yar_ver}.tar.gz && Download_src
+      tar xzf yar-${yar_ver}.tar.gz
+      pushd yar-${yar_ver} > /dev/null
+      ${php_install_dir}/bin/phpize
+      ./configure --with-php-config=${php_install_dir}/bin/php-config
+      make -j ${THREAD} && make install
+      popd > /dev/null
+      if [ -f "${phpExtensionDir}/yar.so" ]; then
+        echo 'extension=yar.so' > ${php_install_dir}/etc/php.d/04-yar.ini
+        echo "${CSUCCESS}PHP yar module installed successfully! ${CEND}"
+        rm -rf yar-${yar_ver}
+      else
+        echo "${CFAILURE}PHP yar module install failed, Please contact the author! ${CEND}"
+      fi
+    else
+      echo "${CWARNING}Your php ${PHP_detail_ver} does not support yar! ${CEND}";
+    fi
+    popd > /dev/null
+  fi
+}
+
+Uninstall_pecl_yar() {
+  if [ -e "${php_install_dir}/etc/php.d/04-yar.ini" ]; then
+    rm -f ${php_install_dir}/etc/php.d/04-yar.ini
+    echo; echo "${CMSG}PHP yar module uninstall completed${CEND}"
+  else
+    echo; echo "${CWARNING}PHP yar module does not exist! ${CEND}"
+  fi
+}

+ 0 - 1
include/percona-8.0.sh

@@ -23,7 +23,6 @@ Install_Percona80() {
     sed -i "s@/usr/local/Percona-Server-${percona80_ver}-Linux.${SYS_BIT_b}.${sslLibVer}@${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
-    boost_ver=1.67.0
     boostVersion2=$(echo ${boost_ver} | awk -F. '{print $1"_"$2"_"$3}')
     tar xzf boost_${boostVersion2}.tar.gz
     tar xzf percona-server-${percona80_ver}.tar.gz

+ 8 - 1
install.sh

@@ -55,7 +55,7 @@ Show_Help() {
   --phpcache_option [1-4]     Install PHP opcode cache, default: 1 opcache
   --php_extensions [ext name] Install PHP extensions, include zendguardloader,ioncube,
                               sourceguardian,imagick,gmagick,fileinfo,imap,ldap,phalcon,
-                              yaf,redis,memcached,memcache,mongodb,swoole,xdebug
+                              yaf,yar,redis,memcached,memcache,mongodb,swoole,xdebug
   --tomcat_option [1-4]       Install Tomcat version
   --jdk_option [1-4]          Install JDK version
   --db_option [1-15]          Install DB version
@@ -132,6 +132,7 @@ while :; do
       [ -n "`echo ${php_extensions} | grep -w ldap`" ] && pecl_ldap=1
       [ -n "`echo ${php_extensions} | grep -w phalcon`" ] && pecl_phalcon=1
       [ -n "`echo ${php_extensions} | grep -w yaf`" ] && pecl_yaf=1
+      [ -n "`echo ${php_extensions} | grep -w yar`" ] && pecl_yar=1
       [ -n "`echo ${php_extensions} | grep -w redis`" ] && pecl_redis=1
       [ -n "`echo ${php_extensions} | grep -w memcached`" ] && pecl_memcached=1
       [ -n "`echo ${php_extensions} | grep -w memcache`" ] && pecl_memcache=1
@@ -1007,6 +1008,12 @@ PHP_addons() {
     Install_pecl_yaf 2>&1 | tee -a ${oneinstack_dir}/install.log
   fi
 
+  # yar
+  if [ "${pecl_yar}" == '1' ]; then
+    . include/pecl_yar.sh
+    Install_pecl_yar 2>&1 | tee -a ${oneinstack_dir}/install.log
+  fi
+
   # pecl_memcached
   if [ "${pecl_memcached}" == '1' ]; then
     . include/memcached.sh

+ 8 - 1
uninstall.sh

@@ -43,7 +43,7 @@ Show_Help() {
   --phpcache                    Uninstall PHP opcode cache
   --php_extensions [ext name]   Uninstall PHP extensions, include zendguardloader,ioncube,
                                 sourceguardian,imagick,gmagick,fileinfo,imap,ldap,phalcon,
-                                yaf,redis,memcached,memcache,mongodb,swoole,xdebug
+                                yaf,yar,redis,memcached,memcache,mongodb,swoole,xdebug
   --hhvm                        Uninstall HHVM
   --pureftpd                    Uninstall PureFtpd
   --redis                       Uninstall Redis-server
@@ -120,6 +120,7 @@ while :; do
       [ -n "`echo ${php_extensions} | grep -w ldap`" ] && pecl_ldap=1
       [ -n "`echo ${php_extensions} | grep -w phalcon`" ] && pecl_phalcon=1
       [ -n "`echo ${php_extensions} | grep -w yaf`" ] && pecl_yaf=1
+      [ -n "`echo ${php_extensions} | grep -w yar`" ] && pecl_yar=1
       [ -n "`echo ${php_extensions} | grep -w redis`" ] && pecl_redis=1
       [ -n "`echo ${php_extensions} | grep -w memcached`" ] && pecl_memcached=1
       [ -n "`echo ${php_extensions} | grep -w memcache`" ] && pecl_memcache=1
@@ -403,6 +404,12 @@ Uninstall_PHPext() {
     Uninstall_pecl_yaf 2>&1 | tee -a ${oneinstack_dir}/install.log
   fi
 
+  # yar
+  if [ "${pecl_yar}" == '1' ]; then
+    . include/pecl_yar.sh
+    Uninstall_pecl_yar 2>&1 | tee -a ${oneinstack_dir}/install.log
+  fi
+
   # pecl_memcached
   if [ "${pecl_memcached}" == '1' ]; then
     . include/memcached.sh

+ 6 - 5
versions.txt

@@ -29,7 +29,7 @@ mariadb102_ver=10.2.22
 mariadb101_ver=10.1.38
 mariadb55_ver=5.5.63
 
-percona80_ver=8.0.13-4
+percona80_ver=8.0.15-5
 percona57_ver=5.7.25-28
 percona56_ver=5.6.43-84.3
 percona55_ver=5.5.62-38.14
@@ -63,7 +63,7 @@ mcrypt_ver=2.6.8
 mhash_ver=0.9.9.9
 libsodium_ver=1.0.17
 argon2_ver=20171227
-imagemagick_ver=6.9.10-33
+imagemagick_ver=6.9.10-34
 imagick_ver=3.4.3
 graphicsmagick_ver=1.3.31
 gmagick_ver=2.0.5RC1
@@ -75,9 +75,10 @@ apcu_oldver=4.0.11
 eaccelerator_ver=0.9.6.1
 phalcon_ver=3.4.3
 yaf_ver=3.0.8
-swoole_ver=4.3.0
+yar_ver=2.0.5
+swoole_ver=4.3.1
 swoole_oldver=1.10.5
-xdebug_ver=2.6.1
+xdebug_ver=2.7.0
 xdebug_oldver=2.5.5
 
 # Ftp
@@ -85,7 +86,7 @@ pureftpd_ver=1.0.47
 
 # Redis
 redis_ver=5.0.3
-pecl_redis_ver=4.2.0
+pecl_redis_ver=4.3.0
 
 # Memcached
 memcached_ver=1.5.12