Browse Source

Add swoole

lj2007331@gmail.com 7 years ago
parent
commit
02341fffd6
13 changed files with 85 additions and 49 deletions
  1. 27 5
      addons.sh
  2. 1 1
      backup.sh
  3. 4 4
      backup_setup.sh
  4. 2 2
      install.sh
  5. 2 2
      pureftpd_vhost.sh
  6. 18 5
      reset_db_root_password.sh
  7. 1 1
      ss.sh
  8. 1 1
      tools/db_bk.sh
  9. 1 1
      tools/website_bk.sh
  10. 2 2
      uninstall.sh
  11. 2 2
      upgrade.sh
  12. 17 16
      versions.txt
  13. 7 7
      vhost.sh

+ 27 - 5
addons.sh

@@ -2,7 +2,7 @@
 # Author:  yeho <lj2007331 AT gmail.com>
 # BLOG:  https://blog.linuxeye.com
 #
-# Notes: OneinStack for CentOS/RadHat 5+ Debian 6+ and Ubuntu 12+
+# Notes: OneinStack for CentOS/RadHat 6+ Debian 7+ and Ubuntu 12+
 #
 # Project home page:
 #       https://oneinstack.com
@@ -12,7 +12,7 @@ export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
 clear
 printf "
 #######################################################################
-#       OneinStack for CentOS/RadHat 5+ Debian 6+ and Ubuntu 12+      #
+#       OneinStack for CentOS/RadHat 6+ Debian 7+ and Ubuntu 12+      #
 #                    Install/Uninstall Extensions                     #
 #       For more information please visit https://oneinstack.com      #
 #######################################################################
@@ -209,12 +209,13 @@ What Are You Doing?
 \t${CMSG}5${CEND}. Install/Uninstall memcached/memcache
 \t${CMSG}6${CEND}. Install/Uninstall Redis
 \t${CMSG}7${CEND}. Install/Uninstall Let's Encrypt client
-\t${CMSG}8${CEND}. Install/Uninstall fail2ban 
+\t${CMSG}8${CEND}. Install/Uninstall swoole PHP Extension 
+\t${CMSG}9${CEND}. Install/Uninstall fail2ban
 \t${CMSG}q${CEND}. Exit
 "
   read -p "Please input the correct option: " Number
-  if [[ ! "${Number}" =~ ^[1-8,q]$ ]]; then
-    echo "${CFAILURE}input error! Please only input 1 ~ 8 and q${CEND}"
+  if [[ ! "${Number}" =~ ^[1-9,q]$ ]]; then
+    echo "${CFAILURE}input error! Please only input 1 ~ 9 and q${CEND}"
   else
     case "${Number}" in
       1)
@@ -468,6 +469,27 @@ What Are You Doing?
         fi
         ;;
       8)
+        ACTION_FUN
+        PHP_extension=swoole
+        if [ "${ACTION}" = '1' ]; then
+          Check_PHP_Extension
+          pushd ${oneinstack_dir}/src
+          src_url=http://mirrors.linuxeye.com/oneinstack/src/swoole-${swoole_version}.tgz && Download_src
+          tar xzf swoole-${swoole_version}.tgz
+          pushd swoole-${swoole_version}
+          ${php_install_dir}/bin/phpize
+          ./configure --with-php-config=${php_install_dir}/bin/php-config
+          make -j ${THREAD} && make install
+          popd
+          rm -rf swoole-${swoole_version} 
+          popd
+          echo 'extension=swoole.so' > ${php_install_dir}/etc/php.d/ext-swoole.ini
+          Check_succ
+        else
+          Uninstall_succ
+        fi
+        ;;
+      9)
         ACTION_FUN
         if [ "${ACTION}" = '1' ]; then
           Install_fail2ban

+ 1 - 1
backup.sh

@@ -2,7 +2,7 @@
 # Author:  yeho <lj2007331 AT gmail.com>
 # BLOG:  https://blog.linuxeye.com
 #
-# Notes: OneinStack for CentOS/RadHat 5+ Debian 6+ and Ubuntu 12+
+# Notes: OneinStack for CentOS/RadHat 6+ Debian 7+ and Ubuntu 12+
 #
 # Project home page:
 #       https://oneinstack.com

+ 4 - 4
backup_setup.sh

@@ -2,7 +2,7 @@
 # Author:  yeho <lj2007331 AT gmail.com>
 # BLOG:  https://blog.linuxeye.com
 #
-# Notes: OneinStack for CentOS/RadHat 5+ Debian 6+ and Ubuntu 12+
+# Notes: OneinStack for CentOS/RadHat 6+ Debian 7+ and Ubuntu 12+
 #
 # Project home page:
 #       https://oneinstack.com
@@ -12,7 +12,7 @@ export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
 clear
 printf "
 #######################################################################
-#       OneinStack for CentOS/RadHat 5+ Debian 6+ and Ubuntu 12+      #
+#       OneinStack for CentOS/RadHat 6+ Debian 7+ and Ubuntu 12+      #
 #                     Setup the backup parameters                     #
 #       For more information please visit https://oneinstack.com      #
 #######################################################################
@@ -168,8 +168,8 @@ fi
 
 if [[ "$DESC_BK" =~ ^[3,5,6]$ ]]; then
   [ ! -e "${python_install_dir}/bin/python" ] && Install_Python
-  [ ! -e "${python_install_dir}/lib/coscmd" ] && ${python_install_dir}/bin/pip install coscmd==1.5.4.1 
-  sed -i "/if query_yes_no/{ n; s/^.*/#&/; }" ${python_install_dir}/lib/python2.7/site-packages/coscmd/cos_client.py 
+  [ ! -e "${python_install_dir}/lib/coscmd" ] && ${python_install_dir}/bin/pip install coscmd==1.7.4 >/dev/null 2>&1 
+  sed -i "/if query_yes_no/{ n; s/^.*/#&/; }" ${python_install_dir}/lib/python2.7/site-packages/coscmd/cos_client.py
   sed -i "s/if query_yes_no/#if query_yes_no/" ${python_install_dir}/lib/python2.7/site-packages/coscmd/cos_client.py
   while :; do echo
     echo 'Please select your backup datacenter:'

+ 2 - 2
install.sh

@@ -2,7 +2,7 @@
 # Author:  yeho <lj2007331 AT gmail.com>
 # BLOG:  https://blog.linuxeye.com
 #
-# Notes: OneinStack for CentOS/RadHat 5+ Debian 6+ and Ubuntu 12+
+# Notes: OneinStack for CentOS/RadHat 6+ Debian 7+ and Ubuntu 12+
 #
 # Project home page:
 #       https://oneinstack.com
@@ -12,7 +12,7 @@ export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
 clear
 printf "
 #######################################################################
-#       OneinStack for CentOS/RadHat 5+ Debian 6+ and Ubuntu 12+      #
+#       OneinStack for CentOS/RadHat 6+ Debian 7+ and Ubuntu 12+      #
 #       For more information please visit https://oneinstack.com      #
 #######################################################################
 "

+ 2 - 2
pureftpd_vhost.sh

@@ -2,7 +2,7 @@
 # Author:  yeho <lj2007331 AT gmail.com>
 # BLOG:  https://blog.linuxeye.com
 #
-# Notes: OneinStack for CentOS/RadHat 5+ Debian 6+ and Ubuntu 12+
+# Notes: OneinStack for CentOS/RadHat 6+ Debian 7+ and Ubuntu 12+
 #
 # Project home page:
 #       https://oneinstack.com
@@ -12,7 +12,7 @@ export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
 clear
 printf "
 #######################################################################
-#       OneinStack for CentOS/RadHat 5+ Debian 6+ and Ubuntu 12+      #
+#       OneinStack for CentOS/RadHat 6+ Debian 7+ and Ubuntu 12+      #
 #                 FTP virtual user account management                 #
 #       For more information please visit https://oneinstack.com      #
 #######################################################################

+ 18 - 5
reset_db_root_password.sh

@@ -2,7 +2,7 @@
 # Author:  yeho <lj2007331 AT gmail.com>
 # BLOG:  https://blog.linuxeye.com
 #
-# Notes: OneinStack for CentOS/RadHat 5+ Debian 6+ and Ubuntu 12+
+# Notes: OneinStack for CentOS/RadHat 6+ Debian 7+ and Ubuntu 12+
 #
 # Project home page:
 #       https://oneinstack.com
@@ -12,25 +12,28 @@ export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
 clear
 printf "
 #######################################################################
-#       OneinStack for CentOS/RadHat 5+ Debian 6+ and Ubuntu 12+      #
+#       OneinStack for CentOS/RadHat 6+ Debian 7+ and Ubuntu 12+      #
 #              Reset Database root password for OneinStack            #
 #       For more information please visit https://oneinstack.com      #
 #######################################################################
 "
 
+OIS_FOLDER=$(dirname "`readlink -f $0`")
+pushd $OIS_FOLDER > /dev/null
 . ./options.conf
 . ./include/color.sh
 . ./include/check_dir.sh
 
-Reset_db_root_password()
-{
+Input_db_root_password() {
   [ ! -d "$db_install_dir" ] && { echo "${CFAILURE}Database is not installed on your system! ${CEND}"; exit 1; }
   while :; do echo
     read -p "Please input the root password of database: " New_dbrootpwd
     [ -n "`echo $New_dbrootpwd | grep '[+|&]'`" ] && { echo "${CWARNING}input error,not contain a plus sign (+) and &${CEND}"; continue; }
     (( ${#New_dbrootpwd} >= 5 )) && break || echo "${CWARNING}database root password least 5 characters! ${CEND}"
   done
+}
   
+Reset_db_root_password() {
   $db_install_dir/bin/mysqladmin -uroot -p"$dbrootpwd" password "$New_dbrootpwd" -h localhost > /dev/null 2>&1
   status_Localhost=`echo $?`
   $db_install_dir/bin/mysqladmin -uroot -p"$dbrootpwd" password "$New_dbrootpwd" -h 127.0.0.1 > /dev/null 2>&1
@@ -45,4 +48,14 @@ Reset_db_root_password()
     echo "${CFAILURE}Reset Database root password failed! ${CEND}"
   fi
 }
-Reset_db_root_password
+
+if [ "$1" == 'quiet' ]; then
+  New_dbrootpwd="`< /dev/urandom tr -dc A-Za-z0-9 | head -c8`"
+  sleep 2 && [ ! -e /tmp/mysql.sock ] && /etc/init.d/mysqld start
+  Reset_db_root_password
+  [ $? -eq 0 ] && sed -i '/reset_db_root_password/d' /etc/rc.d/rc.local
+else
+  Input_db_root_password
+  Reset_db_root_password
+fi
+popd > /dev/null

+ 1 - 1
ss.sh

@@ -2,7 +2,7 @@
 # Author:  yeho <lj2007331 AT gmail.com>
 # BLOG:  https://blog.linuxeye.com
 #
-# Notes: OneinStack for CentOS/RadHat 5+ Debian 6+ and Ubuntu 12+
+# Notes: OneinStack for CentOS/RadHat 6+ Debian 7+ and Ubuntu 12+
 #        Install SS Server
 #
 # Project home page:

+ 1 - 1
tools/db_bk.sh

@@ -2,7 +2,7 @@
 # Author:  yeho <lj2007331 AT gmail.com>
 # BLOG:  https://blog.linuxeye.com
 #
-# Notes: OneinStack for CentOS/RadHat 5+ Debian 6+ and Ubuntu 12+
+# Notes: OneinStack for CentOS/RadHat 6+ Debian 7+ and Ubuntu 12+
 #
 # Project home page:
 #       https://oneinstack.com

+ 1 - 1
tools/website_bk.sh

@@ -2,7 +2,7 @@
 # Author:  yeho <lj2007331 AT gmail.com>
 # BLOG:  https://blog.linuxeye.com
 #
-# Notes: OneinStack for CentOS/RadHat 5+ Debian 6+ and Ubuntu 12+
+# Notes: OneinStack for CentOS/RadHat 6+ Debian 7+ and Ubuntu 12+
 #
 # Project home page:
 #       https://oneinstack.com

+ 2 - 2
uninstall.sh

@@ -2,7 +2,7 @@
 # Author:  yeho <lj2007331 AT gmail.com>
 # BLOG:  https://blog.linuxeye.com
 #
-# Notes: OneinStack for CentOS/RadHat 5+ Debian 6+ and Ubuntu 12+
+# Notes: OneinStack for CentOS/RadHat 6+ Debian 7+ and Ubuntu 12+
 #
 # Project home page:
 #       https://oneinstack.com
@@ -12,7 +12,7 @@ export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
 clear
 printf "
 #######################################################################
-#       OneinStack for CentOS/RadHat 5+ Debian 6+ and Ubuntu 12+      #
+#       OneinStack for CentOS/RadHat 6+ Debian 7+ and Ubuntu 12+      #
 #                         Uninstall OneinStack                        #
 #       For more information please visit https://oneinstack.com      #
 #######################################################################

+ 2 - 2
upgrade.sh

@@ -2,7 +2,7 @@
 # Author:  yeho <lj2007331 AT gmail.com>
 # BLOG:  https://blog.linuxeye.com
 #
-# Notes: OneinStack for CentOS/RadHat 5+ Debian 6+ and Ubuntu 12+
+# Notes: OneinStack for CentOS/RadHat 6+ Debian 7+ and Ubuntu 12+
 #
 # Project home page:
 #       https://oneinstack.com
@@ -12,7 +12,7 @@ export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
 clear
 printf "
 #######################################################################
-#       OneinStack for CentOS/RadHat 5+ Debian 6+ and Ubuntu 12+      #
+#       OneinStack for CentOS/RadHat 6+ Debian 7+ and Ubuntu 12+      #
 #              Upgrade Software versions for OneinStack               # 
 #       For more information please visit https://oneinstack.com      #
 #######################################################################

+ 17 - 16
versions.txt

@@ -2,7 +2,7 @@
 # Web
 nginx_version=1.12.1
 tengine_version=2.1.2
-openresty_version=1.11.2.4
+openresty_version=1.11.2.5
 openssl_version=1.0.2l
 
 tomcat8_version=8.5.20
@@ -21,7 +21,7 @@ mysql57_version=5.7.19
 mysql56_version=5.6.37
 mysql55_version=5.5.57
 
-mariadb102_version=10.2.7
+mariadb102_version=10.2.8
 mariadb101_version=10.1.26
 mariadb100_version=10.0.32
 mariadb55_version=5.5.57
@@ -33,33 +33,34 @@ percona55_version=5.5.55-38.8
 alisql56_version=5.6.32-6
 
 # JDK
-jdk18_version=1.8.0_141
+jdk18_version=1.8.0_144
 jdk17_version=1.7.0_80
 jdk16_version=1.6.0_45
 
 # PHP
-php71_version=7.1.8
-php70_version=7.0.22
+php71_version=7.1.9
+php70_version=7.0.23
 php56_version=5.6.31
 php55_version=5.5.38
 php54_version=5.4.45
 php53_version=5.3.29
 
-zendopcache_version=7.0.5
-xcache_version=3.2.0
-apcu_version=4.0.11
-apcu_for_php7_version=5.1.8
-ImageMagick_version=6.9.9-7
-imagick_version=3.4.3
-GraphicsMagick_version=1.3.26
-gmagick_for_php7_version=2.0.4RC1
-gmagick_version=1.1.7RC3
 libiconv_version=1.15
-curl_version=7.54.1
+curl_version=7.55.1
 libmcrypt_version=2.5.8
 mcrypt_version=2.6.8
 mhash_version=0.9.9.9
+ImageMagick_version=6.9.9-11
+imagick_version=3.4.3
+GraphicsMagick_version=1.3.26
+gmagick_for_php7_version=2.0.4RC1
+gmagick_version=1.1.7RC3
+zendopcache_version=7.0.5
+xcache_version=3.2.0
+apcu_version=4.0.11
+apcu_for_php7_version=5.1.8
 eaccelerator_version=0.9.6.1
+swoole_version=1.9.20
 
 # Ftp
 pureftpd_version=1.0.46
@@ -69,7 +70,7 @@ redis_version=4.0.1
 redis_pecl_version=3.1.3
 
 # Memcached
-memcached_version=1.5.0
+memcached_version=1.5.1
 libmemcached_version=1.0.18
 memcached_pecl_version=2.2.0
 memcached_pecl_php7_version=3.0.3

+ 7 - 7
vhost.sh

@@ -2,7 +2,7 @@
 # Author:  yeho <lj2007331 AT gmail.com>
 # BLOG:  https://blog.linuxeye.com
 #
-# Notes: OneinStack for CentOS/RadHat 5+ Debian 6+ and Ubuntu 12+
+# Notes: OneinStack for CentOS/RadHat 6+ Debian 7+ and Ubuntu 12+
 #
 # Project home page:
 #       https://oneinstack.com
@@ -12,7 +12,7 @@ export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
 clear
 printf "
 #######################################################################
-#       OneinStack for CentOS/RadHat 5+ Debian 6+ and Ubuntu 12+      #
+#       OneinStack for CentOS/RadHat 6+ Debian 7+ and Ubuntu 12+      #
 #       For more information please visit https://oneinstack.com      #
 #######################################################################
 "
@@ -527,7 +527,7 @@ EOF
 
   printf "
 #######################################################################
-#       OneinStack for CentOS/RadHat 5+ Debian 6+ and Ubuntu 12+      #
+#       OneinStack for CentOS/RadHat 6+ Debian 7+ and Ubuntu 12+      #
 #       For more information please visit https://oneinstack.com      #
 #######################################################################
 "
@@ -554,7 +554,7 @@ EOF
 
   printf "
 #######################################################################
-#       OneinStack for CentOS/RadHat 5+ Debian 6+ and Ubuntu 12+      #
+#       OneinStack for CentOS/RadHat 6+ Debian 7+ and Ubuntu 12+      #
 #       For more information please visit https://oneinstack.com      #
 #######################################################################
 "
@@ -644,7 +644,7 @@ EOF
 
   printf "
 #######################################################################
-#       OneinStack for CentOS/RadHat 5+ Debian 6+ and Ubuntu 12+      #
+#       OneinStack for CentOS/RadHat 6+ Debian 7+ and Ubuntu 12+      #
 #       For more information please visit https://oneinstack.com      #
 #######################################################################
 "
@@ -729,7 +729,7 @@ EOF
 
   printf "
 #######################################################################
-#       OneinStack for CentOS/RadHat 5+ Debian 6+ and Ubuntu 12+      #
+#       OneinStack for CentOS/RadHat 6+ Debian 7+ and Ubuntu 12+      #
 #       For more information please visit https://oneinstack.com      #
 #######################################################################
 "
@@ -824,7 +824,7 @@ EOF
 
   printf "
 #######################################################################
-#       OneinStack for CentOS/RadHat 5+ Debian 6+ and Ubuntu 12+      #
+#       OneinStack for CentOS/RadHat 6+ Debian 7+ and Ubuntu 12+      #
 #       For more information please visit https://oneinstack.com      #
 #######################################################################
 "