Browse Source

Add php7.3 pecl_memcache

lj2007331@gmail.com 6 years ago
parent
commit
be84f5c3cb
7 changed files with 20 additions and 28 deletions
  1. 1 1
      include/mariadb-5.5.sh
  2. 18 22
      include/memcached.sh
  3. 0 1
      include/php-7.0.sh
  4. 0 1
      include/php-7.1.sh
  5. 0 1
      include/php-7.2.sh
  6. 0 1
      include/php-7.3.sh
  7. 1 1
      install.sh

+ 1 - 1
include/mariadb-5.5.sh

@@ -118,7 +118,7 @@ ft_min_word_len = 4
 
 log_bin = mysql-bin
 binlog_format = mixed
-expire_logs_days = 30
+expire_logs_days = 7 
 
 log_error = ${mariadb_data_dir}/mysql-error.log
 slow_query_log = 1

+ 18 - 22
include/memcached.sh

@@ -48,29 +48,25 @@ Install_pecl_memcache() {
     phpExtensionDir=$(${php_install_dir}/bin/php-config --extension-dir)
     PHP_detail_ver=$(${php_install_dir}/bin/php -r 'echo PHP_VERSION;')
     PHP_main_ver=${PHP_detail_ver%.*}
-    if [[ "${PHP_main_ver}" =~ ^5.[3-6]$|^7.[0-2]$ ]]; then
-      if [[ "${PHP_main_ver}" =~ ^7.[0-2]$ ]]; then
-        #git clone https://github.com/websupport-sk/pecl-memcache.git
-        #cd pecl-memcache
-        tar xzf pecl-memcache-php7.tgz
-        pushd pecl-memcache-php7 > /dev/null
-      else
-        tar xzf memcache-${pecl_memcache_ver}.tgz
-        pushd memcache-${pecl_memcache_ver} > /dev/null
-      fi
-      ${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}/memcache.so" ]; then
-        echo "extension=memcache.so" > ${php_install_dir}/etc/php.d/05-memcache.ini
-        echo "${CSUCCESS}PHP memcache module installed successfully! ${CEND}"
-        rm -rf pecl-memcache-php7 memcache-${pecl_memcache_ver}
-      else
-        echo "${CFAILURE}PHP memcache module install failed, Please contact the author! ${CEND}"
-      fi
+    if [[ "${PHP_main_ver}" =~ ^7.[0-3]$ ]]; then
+      #git clone https://github.com/websupport-sk/pecl-memcache.git
+      #cd pecl-memcache
+      tar xzf pecl-memcache-php7.tgz
+      pushd pecl-memcache-php7 > /dev/null
     else
-      echo; echo "${CWARNING}Your php ${PHP_detail_ver} does not support pecl_memcache! ${CEND}";
+      tar xzf memcache-${pecl_memcache_ver}.tgz
+      pushd memcache-${pecl_memcache_ver} > /dev/null
+    fi
+    ${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}/memcache.so" ]; then
+      echo "extension=memcache.so" > ${php_install_dir}/etc/php.d/05-memcache.ini
+      echo "${CSUCCESS}PHP memcache module installed successfully! ${CEND}"
+      rm -rf pecl-memcache-php7 memcache-${pecl_memcache_ver}
+    else
+      echo "${CFAILURE}PHP memcache module install failed, Please contact the author! ${CEND}"
     fi
     popd > /dev/null
   fi

+ 0 - 1
include/php-7.0.sh

@@ -85,7 +85,6 @@ Install_PHP70() {
   tar xzf php-${php70_ver}.tar.gz
   pushd php-${php70_ver}
   make clean
-  ./buildconf
   [ ! -d "${php_install_dir}" ] && mkdir -p ${php_install_dir}
   [ "${phpcache_option}" == '1' ] && phpcache_arg='--enable-opcache' || phpcache_arg='--disable-opcache'
   if [ "${apache_option}" == '2' ] || [ "${Apache_main_ver}" == '22' ] || [ "${apache_mode_option}" == '2' ]; then

+ 0 - 1
include/php-7.1.sh

@@ -85,7 +85,6 @@ Install_PHP71() {
   tar xzf php-${php71_ver}.tar.gz
   pushd php-${php71_ver} > /dev/null
   make clean
-  ./buildconf
   [ ! -d "${php_install_dir}" ] && mkdir -p ${php_install_dir}
   [ "${phpcache_option}" == '1' ] && phpcache_arg='--enable-opcache' || phpcache_arg='--disable-opcache'
   if [ "${apache_option}" == '2' ] || [ "${Apache_main_ver}" == '22' ] || [ "${apache_mode_option}" == '2' ]; then

+ 0 - 1
include/php-7.2.sh

@@ -79,7 +79,6 @@ Install_PHP72() {
   tar xzf php-${php72_ver}.tar.gz
   pushd php-${php72_ver} > /dev/null
   make clean
-  ./buildconf
   [ ! -d "${php_install_dir}" ] && mkdir -p ${php_install_dir}
   [ "${phpcache_option}" == '1' ] && phpcache_arg='--enable-opcache' || phpcache_arg='--disable-opcache'
   if [ "${apache_option}" == '2' ] || [ "${Apache_main_ver}" == '22' ] || [ "${apache_mode_option}" == '2' ]; then

+ 0 - 1
include/php-7.3.sh

@@ -79,7 +79,6 @@ Install_PHP73() {
   tar xzf php-${php73_ver}.tar.gz
   pushd php-${php73_ver} > /dev/null
   make clean
-  ./buildconf
   [ ! -d "${php_install_dir}" ] && mkdir -p ${php_install_dir}
   [ "${phpcache_option}" == '1' ] && phpcache_arg='--enable-opcache' || phpcache_arg='--disable-opcache'
   if [ "${apache_option}" == '2' ] || [ "${Apache_main_ver}" == '22' ] || [ "${apache_mode_option}" == '2' ]; then

+ 1 - 1
install.sh

@@ -624,7 +624,7 @@ if [ ${ARG_NUM} == 0 ]; then
       echo -e "\t${CMSG} 9${CEND}. Install phalcon(PHP>=5.5)"
       echo -e "\t${CMSG}10${CEND}. Install redis"
       echo -e "\t${CMSG}11${CEND}. Install memcached"
-      echo -e "\t${CMSG}12${CEND}. Install memcache(PHP<=7.2)"
+      echo -e "\t${CMSG}12${CEND}. Install memcache"
       echo -e "\t${CMSG}13${CEND}. Install mongodb"
       echo -e "\t${CMSG}14${CEND}. Install swoole"
       echo -e "\t${CMSG}15${CEND}. Install xdebug(PHP>=5.5)"