Browse Source

Fixed bug and Del HHVM,Apache-2.2,AliSQL

lj2007331@gmail.com 4 years ago
parent
commit
cf0811ac34

+ 3 - 11
README.md

@@ -1,17 +1,17 @@
 [![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 ~ 20, 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 7 ~ 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 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, PostgreSQL, MongoDB)
 - 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)
-- Providing a plurality of Apache version (Apache-2.4, Apache-2.2)
+- Providing a plurality of Apache
 - According to their needs to install PHP Cache Accelerator provides ZendOPcache, xcache, apcu, eAccelerator. And php extensions,include ZendGuardLoader,ionCube,SourceGuardian,imagick,gmagick,fileinfo,imap,ldap,calendar,phalcon,yaf,yar,redis,memcached,memcache,mongodb,swoole,xdebug
 - Installation Pureftpd, phpMyAdmin according to their needs
 - Install memcached, redis according to their needs
@@ -19,7 +19,6 @@ Script properties:
 - Providing add a virtual host script, include Let's Encrypt SSL certificate
 - Provide Nginx/Tengine/OpenResty/Apache/Tomcat, MySQL/MariaDB/Percona, PHP, Redis, Memcached, phpMyAdmin upgrade script
 - Provide local,remote(rsync between servers),Aliyun OSS,Qcloud COS,UPYUN,QINIU,Amazon S3,Google Drive and Dropbox backup script
-- Provided under HHVM install CentOS 6,7
 
 ## Installation
 
@@ -118,13 +117,6 @@ PHP:
 ```bash
 service php-fpm {start|stop|restart|reload|status}
 ```
-HHVM:
-```bash
-#centos7
-systemctl {start|stop|status|restart} hhvm
-#centos6
-service supervisord {start|stop|status|restart|reload}
-```
 Apache:
 ```bash
 service httpd {start|restart|stop}

+ 0 - 2
config/index.html

@@ -262,8 +262,6 @@
 				<div class="alert alert-primary" role="alert"><code>service mongod {start|stop|status|restart|reload}</code></div>
 				<p class="mt-4">PHP:</p>
 				<div class="alert alert-primary" role="alert"><code>service php-fpm {start<span class="pl-k">|</span>stop<span class="pl-k">|</span>restart<span class="pl-k">|</span>reload<span class="pl-k">|</span>status}</code></div>
-				<p class="mt-4">HHVM:</p>
-				<div class="alert alert-primary" role="alert"><code>service supervisord {start|stop|status|restart|reload}</code></div>
 				<p class="mt-4">Apache:</p>
 				<div class="alert alert-primary" role="alert"><code>service httpd {start|restart|stop}</code></div>
 				<p class="mt-4">Tomcat:</p>

+ 0 - 3
config/index_cn.html

@@ -263,9 +263,6 @@
 				<div class="alert alert-primary" role="alert"><code>service mongod {start|stop|status|restart|reload}</code></div>
 				<p class="mt-4">PHP:</p>
 				<div class="alert alert-primary" role="alert"><code>service php-fpm {start<span class="pl-k">|</span>stop<span class="pl-k">|</span>restart<span class="pl-k">|</span>reload<span class="pl-k">|</span>status}</code></div>
-				<p class="mt-4">HHVM:</p>
-				<div class="alert alert-primary" role="alert"><code>service supervisord {start|stop|status|restart|reload}</code></div>
-				<p class="mt-4"><strong><span style="color: #ff0000;">注</span></strong>:hhvm进程交给supervisord管理,了解更多请访问《<a href="https://linuxeye.com/408.html" target="_blank" rel="noopener noreferrer">Supervisor管理hhvm进程</a>》<br>
 				<p class="mt-4">Apache:</p>
 				<div class="alert alert-primary" role="alert"><code>service httpd {start|restart|stop}</code></div>
 				<p class="mt-4">Tomcat:</p>

+ 0 - 210
include/alisql-5.6.sh

@@ -1,210 +0,0 @@
-#!/bin/bash
-# Author:  yeho <lj2007331 AT gmail.com>
-# BLOG:  https://linuxeye.com
-#
-# Notes: OneinStack for CentOS/RedHat 6+ Debian 8+ and Ubuntu 14+
-#
-# Project home page:
-#       https://oneinstack.com
-#       https://github.com/oneinstack/oneinstack
-
-Install_AliSQL56() {
-  pushd ${oneinstack_dir}/src > /dev/null
-  id -u mysql >/dev/null 2>&1
-  [ $? -ne 0 ] && useradd -M -s /sbin/nologin mysql
-
-  [ ! -d "${alisql_install_dir}" ] && mkdir -p ${alisql_install_dir}
-  mkdir -p ${alisql_data_dir};chown mysql.mysql -R ${alisql_data_dir}
-
-  tar xzf alisql-${alisql_ver}.tar.gz
-  pushd alisql-${alisql_ver}
-  cmake . -DCMAKE_INSTALL_PREFIX=${alisql_install_dir} \
-  -DCMAKE_BUILD_TYPE="Release" \
-  -DWITH_EMBEDDED_SERVER=0 \
-  -DWITH_EXTRA_CHARSETS=all \
-  -DWITH_MYISAM_STORAGE_ENGINE=1 \
-  -DWITH_INNOBASE_STORAGE_ENGINE=1 \
-  -DWITH_PARTITION_STORAGE_ENGINE=1 \
-  -DWITH_CSV_STORAGE_ENGINE=1 \
-  -DWITH_ARCHIVE_STORAGE_ENGINE=1 \
-  -DWITH_BLACKHOLE_STORAGE_ENGINE=1 \
-  -DWITH_FEDERATED_STORAGE_ENGINE=1 \
-  -DWITH_PERFSCHEMA_STORAGE_ENGINE=1 \
-  -DWITH_TOKUDB_STORAGE_ENGINE=0
-  make -j ${THREAD}
-  make install
-  popd
-
-  if [ -d "${alisql_install_dir}/support-files" ]; then
-    echo never > /sys/kernel/mm/transparent_hugepage/enabled
-    sed -i "s+^dbrootpwd.*+dbrootpwd='${dbrootpwd}'+" ../options.conf
-    echo "${CSUCCESS}AliSQL installed successfully! ${CEND}"
-    rm -rf alisql-${alisql_ver}
-  else
-    rm -rf ${alisql_install_dir}
-    rm -rf alisql-${alisql_ver}
-    echo "${CFAILURE}AliSQL install failed, Please contact the author! ${CEND}" && lsb_release -a
-    kill -9 $$
-  fi
-  /bin/cp ${alisql_install_dir}/support-files/mysql.server /etc/init.d/mysqld
-  [ -z "`grep transparent_hugepage /etc/init.d/mysqld`" ] && sed -i "s@^basedir=.*@echo never > /sys/kernel/mm/transparent_hugepage/enabled\n&@" /etc/init.d/mysqld
-  sed -i "s@^basedir=.*@basedir=${alisql_install_dir}@" /etc/init.d/mysqld
-  sed -i "s@^datadir=.*@datadir=${alisql_data_dir}@" /etc/init.d/mysqld
-  chmod +x /etc/init.d/mysqld
-  [ "${PM}" == 'yum' ] && { chkconfig --add mysqld; chkconfig mysqld on; }
-  [ "${PM}" == 'apt-get' ] && update-rc.d mysqld defaults
-  popd
-
-  # my.cnf
-  [ -d "/etc/mysql" ] && /bin/mv /etc/mysql{,_bk}
-  cat > /etc/my.cnf << EOF
-[client]
-port = 3306
-socket = /tmp/mysql.sock
-default-character-set = utf8mb4
-
-[mysql]
-prompt="AliSQL [\\d]> "
-no-auto-rehash
-
-[mysqld]
-port = 3306
-socket = /tmp/mysql.sock
-
-basedir = ${alisql_install_dir}
-datadir = ${alisql_data_dir}
-pid-file = ${alisql_data_dir}/mysql.pid
-user = mysql
-bind-address = 0.0.0.0
-server-id = 1
-
-init-connect = 'SET NAMES utf8mb4'
-character-set-server = utf8mb4
-
-skip-name-resolve
-#skip-networking
-back_log = 300
-
-max_connections = 1000
-max_connect_errors = 6000
-open_files_limit = 65535
-table_open_cache = 128
-max_allowed_packet = 500M
-binlog_cache_size = 1M
-max_heap_table_size = 8M
-tmp_table_size = 16M
-
-read_buffer_size = 2M
-read_rnd_buffer_size = 8M
-sort_buffer_size = 8M
-join_buffer_size = 8M
-key_buffer_size = 4M
-
-thread_cache_size = 8
-
-query_cache_type = 1
-query_cache_size = 8M
-query_cache_limit = 2M
-
-ft_min_word_len = 4
-
-log_bin = mysql-bin
-binlog_format = mixed
-expire_logs_days = 7
-
-log_error = ${alisql_data_dir}/mysql-error.log
-slow_query_log = 1
-long_query_time = 1
-slow_query_log_file = ${alisql_data_dir}/mysql-slow.log
-
-performance_schema = 0
-explicit_defaults_for_timestamp
-
-#lower_case_table_names = 1
-
-skip-external-locking
-
-default_storage_engine = InnoDB
-innodb_file_per_table = 1
-innodb_open_files = 500
-innodb_buffer_pool_size = 64M
-innodb_write_io_threads = 4
-innodb_read_io_threads = 4
-innodb_thread_concurrency = 0
-innodb_purge_threads = 1
-innodb_flush_log_at_trx_commit = 2
-innodb_log_buffer_size = 2M
-innodb_log_file_size = 32M
-innodb_log_files_in_group = 3
-innodb_max_dirty_pages_pct = 90
-innodb_lock_wait_timeout = 120
-
-bulk_insert_buffer_size = 8M
-myisam_sort_buffer_size = 8M
-myisam_max_sort_file_size = 10G
-myisam_repair_threads = 1
-
-interactive_timeout = 28800
-wait_timeout = 28800
-
-[mysqldump]
-quick
-max_allowed_packet = 500M
-
-[myisamchk]
-key_buffer_size = 8M
-sort_buffer_size = 8M
-read_buffer = 4M
-write_buffer = 4M
-EOF
-
-  sed -i "s@max_connections.*@max_connections = $((${Mem}/3))@" /etc/my.cnf
-  if [ ${Mem} -gt 1500 -a ${Mem} -le 2500 ]; then
-    sed -i 's@^thread_cache_size.*@thread_cache_size = 16@' /etc/my.cnf
-    sed -i 's@^query_cache_size.*@query_cache_size = 16M@' /etc/my.cnf
-    sed -i 's@^myisam_sort_buffer_size.*@myisam_sort_buffer_size = 16M@' /etc/my.cnf
-    sed -i 's@^key_buffer_size.*@key_buffer_size = 16M@' /etc/my.cnf
-    sed -i 's@^innodb_buffer_pool_size.*@innodb_buffer_pool_size = 128M@' /etc/my.cnf
-    sed -i 's@^tmp_table_size.*@tmp_table_size = 32M@' /etc/my.cnf
-    sed -i 's@^table_open_cache.*@table_open_cache = 256@' /etc/my.cnf
-  elif [ ${Mem} -gt 2500 -a ${Mem} -le 3500 ]; then
-    sed -i 's@^thread_cache_size.*@thread_cache_size = 32@' /etc/my.cnf
-    sed -i 's@^query_cache_size.*@query_cache_size = 32M@' /etc/my.cnf
-    sed -i 's@^myisam_sort_buffer_size.*@myisam_sort_buffer_size = 32M@' /etc/my.cnf
-    sed -i 's@^key_buffer_size.*@key_buffer_size = 64M@' /etc/my.cnf
-    sed -i 's@^innodb_buffer_pool_size.*@innodb_buffer_pool_size = 512M@' /etc/my.cnf
-    sed -i 's@^tmp_table_size.*@tmp_table_size = 64M@' /etc/my.cnf
-    sed -i 's@^table_open_cache.*@table_open_cache = 512@' /etc/my.cnf
-  elif [ ${Mem} -gt 3500 ]; then
-    sed -i 's@^thread_cache_size.*@thread_cache_size = 64@' /etc/my.cnf
-    sed -i 's@^query_cache_size.*@query_cache_size = 64M@' /etc/my.cnf
-    sed -i 's@^myisam_sort_buffer_size.*@myisam_sort_buffer_size = 64M@' /etc/my.cnf
-    sed -i 's@^key_buffer_size.*@key_buffer_size = 256M@' /etc/my.cnf
-    sed -i 's@^innodb_buffer_pool_size.*@innodb_buffer_pool_size = 1024M@' /etc/my.cnf
-    sed -i 's@^tmp_table_size.*@tmp_table_size = 128M@' /etc/my.cnf
-    sed -i 's@^table_open_cache.*@table_open_cache = 1024@' /etc/my.cnf
-  fi
-
-  ${alisql_install_dir}/scripts/mysql_install_db --user=mysql --basedir=${alisql_install_dir} --datadir=${alisql_data_dir}
-
-  [ "${Wsl}" == true ] && chmod 600 /etc/my.cnf
-  chown mysql.mysql -R ${alisql_data_dir}
-  [ -d "/etc/mysql" ] && mv /etc/mysql{,_bk}
-  service mysqld start
-  [ -z "$(grep ^'export PATH=' /etc/profile)" ] && echo "export PATH=${alisql_install_dir}/bin:\$PATH" >> /etc/profile
-  [ -n "$(grep ^'export PATH=' /etc/profile)" -a -z "$(grep ${alisql_install_dir} /etc/profile)" ] && sed -i "s@^export PATH=\(.*\)@export PATH=${alisql_install_dir}/bin:\1@" /etc/profile
-  . /etc/profile
-
-  ${alisql_install_dir}/bin/mysql -e "grant all privileges on *.* to root@'127.0.0.1' identified by \"${dbrootpwd}\" with grant option;"
-  ${alisql_install_dir}/bin/mysql -e "grant all privileges on *.* to root@'localhost' identified by \"${dbrootpwd}\" with grant option;"
-  ${alisql_install_dir}/bin/mysql -uroot -p${dbrootpwd} -e "delete from mysql.user where Password='';"
-  ${alisql_install_dir}/bin/mysql -uroot -p${dbrootpwd} -e "delete from mysql.db where User='';"
-  ${alisql_install_dir}/bin/mysql -uroot -p${dbrootpwd} -e "delete from mysql.proxies_priv where Host!='localhost';"
-  ${alisql_install_dir}/bin/mysql -uroot -p${dbrootpwd} -e "drop database test;"
-  ${alisql_install_dir}/bin/mysql -uroot -p${dbrootpwd} -e "reset master;"
-  rm -rf /etc/ld.so.conf.d/{mysql,mariadb,percona,alisql}*.conf
-  [ -e "${alisql_install_dir}/my.cnf" ] && rm -rf ${alisql_install_dir}/my.cnf
-  echo "${alisql_install_dir}/lib" > /etc/ld.so.conf.d/z-alisql.conf
-  ldconfig
-  service mysqld stop
-}

+ 0 - 138
include/apache-2.2.sh

@@ -1,138 +0,0 @@
-#!/bin/bash
-# Author:  yeho <lj2007331 AT gmail.com>
-# BLOG:  https://linuxeye.com
-#
-# Notes: OneinStack for CentOS/RedHat 6+ Debian 8+ and Ubuntu 14+
-#
-# Project home page:
-#       https://oneinstack.com
-#       https://github.com/oneinstack/oneinstack
-
-Install_Apache22() {
-  pushd ${oneinstack_dir}/src > /dev/null
-  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 httpd-${apache22_ver}.tar.gz
-  pushd httpd-${apache22_ver} > /dev/null
-  [ ! -d "${apache_install_dir}" ] && mkdir -p ${apache_install_dir}
-  LDFLAGS=-ldl ./configure --prefix=${apache_install_dir} --with-mpm=prefork --enable-mpms-shared=all --with-included-apr --enable-headers --enable-mime-magic --enable-deflate --enable-proxy --enable-so --enable-dav --enable-rewrite --enable-expires --enable-static-support --enable-suexec --with-expat=builtin --enable-mods-shared=most --enable-ssl --with-ssl=${openssl_install_dir}
-  make -j ${THREAD} && make install
-  unset LDFLAGS
-  if [ -e "${apache_install_dir}/bin/httpd" ]; then
-    echo "${CSUCCESS}Apache installed successfully! ${CEND}"
-    popd > /dev/null
-    rm -rf httpd-${apache22_ver}
-  else
-    rm -rf ${apache_install_dir}
-    echo "${CFAILURE}Apache install failed, Please contact the author! ${CEND}" && lsb_release -a
-    kill -9 $$
-  fi
-
-  [ -z "`grep ^'export PATH=' /etc/profile`" ] && echo "export PATH=${apache_install_dir}/bin:\$PATH" >> /etc/profile
-  [ -n "`grep ^'export PATH=' /etc/profile`" -a -z "`grep ${apache_install_dir} /etc/profile`" ] && sed -i "s@^export PATH=\(.*\)@export PATH=${apache_install_dir}/bin:\1@" /etc/profile
-  . /etc/profile
-
-  if [ -e /bin/systemctl ]; then
-    /bin/cp ../init.d/httpd.service /lib/systemd/system/
-    sed -i "s@/usr/local/apache@${apache_install_dir}@g" /lib/systemd/system/httpd.service
-    systemctl enable httpd
-  else
-    /bin/cp ${apache_install_dir}/bin/apachectl /etc/init.d/httpd
-    sed -i '2a # chkconfig: - 85 15' /etc/init.d/httpd
-    sed -i '3a # description: Apache is a World Wide Web server. It is used to serve' /etc/init.d/httpd
-    chmod +x /etc/init.d/httpd
-    [ "${PM}" == 'yum' ] && { chkconfig --add httpd; chkconfig httpd on; }
-    [ "${PM}" == 'apt-get' ] && update-rc.d httpd defaults
-  fi
-
-  sed -i "s@^User daemon@User ${run_user}@" ${apache_install_dir}/conf/httpd.conf
-  sed -i "s@^Group daemon@Group ${run_group}@" ${apache_install_dir}/conf/httpd.conf
-  if [[ ! ${nginx_option} =~ ^[1-3]$ ]] && [ ! -e "${web_install_dir}/sbin/nginx" ]; then
-    sed -i 's/^#ServerName www.example.com:80/ServerName 0.0.0.0:80/' ${apache_install_dir}/conf/httpd.conf
-    TMP_PORT=80
-  elif [[ ${nginx_option} =~ ^[1-3]$ ]] || [ -e "${web_install_dir}/sbin/nginx" ]; then
-    sed -i 's/^#ServerName www.example.com:80/ServerName 127.0.0.1:88/' ${apache_install_dir}/conf/httpd.conf
-    sed -i 's@^Listen.*@Listen 127.0.0.1:88@' ${apache_install_dir}/conf/httpd.conf
-    TMP_PORT=88
-  fi
-  sed -i "s@AddType\(.*\)Z@AddType\1Z\n    AddType application/x-httpd-php .php .phtml\n    AddType application/x-httpd-php-source .phps@" ${apache_install_dir}/conf/httpd.conf
-  sed -i "s@#AddHandler cgi-script .cgi@AddHandler cgi-script .cgi .pl@" ${apache_install_dir}/conf/httpd.conf
-  sed -i 's@DirectoryIndex index.html@DirectoryIndex index.html index.php@' ${apache_install_dir}/conf/httpd.conf
-  sed -i "s@^DocumentRoot.*@DocumentRoot \"${wwwroot_dir}/default\"@" ${apache_install_dir}/conf/httpd.conf
-  sed -i "s@^<Directory \"${apache_install_dir}/htdocs\">@<Directory \"${wwwroot_dir}/default\">@" ${apache_install_dir}/conf/httpd.conf
-  sed -i "s@^#Include conf/extra/httpd-mpm.conf@Include conf/extra/httpd-mpm.conf@" ${apache_install_dir}/conf/httpd.conf
-
-  #logrotate apache log
-  cat > /etc/logrotate.d/apache << EOF
-${wwwlogs_dir}/*apache.log {
-  daily
-  rotate 5
-  missingok
-  dateext
-  compress
-  notifempty
-  sharedscripts
-  postrotate
-    [ -e /var/run/httpd.pid ] && kill -USR1 \`cat /var/run/httpd.pid\`
-  endscript
-}
-EOF
-
-  mkdir ${apache_install_dir}/conf/vhost
-  cat > ${apache_install_dir}/conf/vhost/0.conf << EOF
-NameVirtualHost *:$TMP_PORT
-<VirtualHost *:$TMP_PORT>
-  ServerAdmin admin@example.com
-  DocumentRoot "${wwwroot_dir}/default"
-  ServerName 127.0.0.1
-  ErrorLog "${wwwlogs_dir}/error_apache.log"
-  CustomLog "${wwwlogs_dir}/access_apache.log" common
-<Directory "${wwwroot_dir}/default">
-  SetOutputFilter DEFLATE
-  Options FollowSymLinks ExecCGI
-  AllowOverride All
-  Order allow,deny
-  Allow from all
-  DirectoryIndex index.html index.php
-</Directory>
-<Location /server-status>
-  SetHandler server-status
-  Order Deny,Allow
-  Deny from all
-  Allow from 127.0.0.1
-</Location>
-</VirtualHost>
-EOF
-
-  cat >> ${apache_install_dir}/conf/httpd.conf <<EOF
-<IfModule mod_headers.c>
-  AddOutputFilterByType DEFLATE text/html text/plain text/css text/xml text/javascript
-  <FilesMatch "\.(js|css|html|htm|png|jpg|swf|pdf|shtml|xml|flv|gif|ico|jpeg)\$">
-    RequestHeader edit "If-None-Match" "^(.*)-gzip(.*)\$" "\$1\$2"
-    Header edit "ETag" "^(.*)-gzip(.*)\$" "\$1\$2"
-  </FilesMatch>
-  DeflateCompressionLevel 6
-  SetOutputFilter DEFLATE
-</IfModule>
-
-PidFile /var/run/httpd.pid
-ServerTokens ProductOnly
-ServerSignature Off
-Include conf/vhost/*.conf
-EOF
-
-  if [ "${nginx_option}" != '4' -o -e "${web_install_dir}/sbin/nginx" ]; then
-    ${apache_install_dir}/bin/apxs -i -c -n mod_remoteip.so mod_remoteip.c
-    cat > ${apache_install_dir}/conf/extra/httpd-remoteip.conf << EOF
-LoadModule remoteip_module modules/mod_remoteip.so
-RemoteIPHeader X-Forwarded-For
-RemoteIPInternalProxy 127.0.0.1
-EOF
-    sed -i "s@Include conf/extra/httpd-mpm.conf@Include conf/extra/httpd-mpm.conf\nInclude conf/extra/httpd-remoteip.conf@" ${apache_install_dir}/conf/httpd.conf
-  fi
-  ldconfig
-  service httpd start
-  popd > /dev/null
-}

+ 4 - 4
include/apache-2.4.sh → include/apache.sh

@@ -8,7 +8,7 @@
 #       https://oneinstack.com
 #       https://github.com/oneinstack/oneinstack
 
-Install_Apache24() {
+Install_Apache() {
   pushd ${oneinstack_dir}/src > /dev/null
   tar xzf pcre-${pcre_ver}.tar.gz
   pushd pcre-${pcre_ver} > /dev/null
@@ -19,7 +19,7 @@ Install_Apache24() {
   [ $? -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 httpd-${apache24_ver}.tar.gz
+  tar xzf httpd-${apache_ver}.tar.gz
 
   # install apr
   if [ ! -e "${apr_install_dir}/bin/apr-1-config" ]; then
@@ -53,7 +53,7 @@ Install_Apache24() {
     rm -rf nghttp2-${nghttp2_ver}
   fi
 
-  pushd httpd-${apache24_ver} > /dev/null
+  pushd httpd-${apache_ver} > /dev/null
   [ ! -d "${apache_install_dir}" ] && mkdir -p ${apache_install_dir}
   LDFLAGS=-ldl ./configure --prefix=${apache_install_dir} --enable-mpms-shared=all --with-pcre --with-apr=${apr_install_dir} --with-apr-util=${apr_install_dir} --enable-headers --enable-mime-magic --enable-deflate --enable-proxy --enable-so --enable-dav --enable-rewrite --enable-remoteip --enable-expires --enable-static-support --enable-suexec --enable-mods-shared=most --enable-nonportable-atomics=yes --enable-ssl --with-ssl=${openssl_install_dir} --enable-http2 --with-nghttp2=/usr/local
   make -j ${THREAD} && make install
@@ -61,7 +61,7 @@ Install_Apache24() {
   unset LDFLAGS
   if [ -e "${apache_install_dir}/bin/httpd" ]; then
     echo "${CSUCCESS}Apache installed successfully! ${CEND}"
-    rm -rf httpd-${apache24_ver} pcre-${pcre_ver}
+    rm -rf httpd-${apache_ver} pcre-${pcre_ver}
   else
     rm -rf ${apache_install_dir}
     echo "${CFAILURE}Apache install failed, Please contact the author! ${CEND}" && lsb_release -a

+ 0 - 1
include/check_dir.sh

@@ -12,7 +12,6 @@
 [ -d "${mysql_install_dir}/support-files" ] && { db_install_dir=${mysql_install_dir}; db_data_dir=${mysql_data_dir}; }
 [ -d "${mariadb_install_dir}/support-files" ] && { db_install_dir=${mariadb_install_dir}; db_data_dir=${mariadb_data_dir}; }
 [ -d "${percona_install_dir}/support-files" ] && { db_install_dir=${percona_install_dir}; db_data_dir=${percona_data_dir}; }
-[ -d "${alisql_install_dir}/support-files" ] && { db_install_dir=${alisql_install_dir}; db_data_dir=$alisql_data_dir; }
 
 # check Nginx dir
 [ -e "${nginx_install_dir}/sbin/nginx" ] && web_install_dir=${nginx_install_dir}

+ 30 - 53
include/check_download.sh

@@ -17,15 +17,15 @@ checkDownload() {
   fi
 
   # General system utils
-  if [[ ${tomcat_option} =~ ^[1-4]$ ]] || [[ ${apache_option} =~ ^[1-2]$ ]] || [[ ${php_option} =~ ^[1-9]$|^10$ ]]; then
+  if [[ ${tomcat_option} =~ ^[1-4]$ ]] || [ "${apache_flag}" == 'y' ] || [[ ${php_option} =~ ^[1-9]$|^10$ ]]; then
     echo "Download openSSL..."
     src_url=https://www.openssl.org/source/old/1.0.2/openssl-${openssl_ver}.tar.gz && Download_src
     echo "Download cacert.pem..."
-    src_url=https://curl.haxx.se/ca/cacert.pem && Download_src
+    src_url=https://curl.se/ca/cacert.pem && Download_src
   fi
 
   # jemalloc
-  if [[ ${nginx_option} =~ ^[1-3]$ ]] || [[ "${db_option}" =~ ^[1-9]$|^1[0-3]$ ]]; then
+  if [[ ${nginx_option} =~ ^[1-3]$ ]] || [[ "${db_option}" =~ ^[1-9]$|^1[0-2]$ ]]; then
     echo "Download jemalloc..."
     src_url=${mirrorLink}/jemalloc-${jemalloc_ver}.tar.bz2 && Download_src
   fi
@@ -53,27 +53,19 @@ checkDownload() {
   esac
 
   # pcre
-  if [[ "${nginx_option}" =~ ^[1-3]$ || ${apache_option} == '1' ]]; then
+  if [[ "${nginx_option}" =~ ^[1-3]$ ]] || [ "${apache_flag}" == 'y' ]; then
     echo "Download pcre..."
     src_url=https://ftp.pcre.org/pub/pcre/pcre-${pcre_ver}.tar.gz && Download_src
   fi
 
   # apache
-  case "${apache_option}" in
-    1)
-      echo "Download apache 2.4..."
-      src_url=http://archive.apache.org/dist/httpd/httpd-${apache24_ver}.tar.gz && Download_src
-      src_url=http://archive.apache.org/dist/apr/apr-${apr_ver}.tar.gz && Download_src
-      src_url=http://archive.apache.org/dist/apr/apr-util-${apr_util_ver}.tar.gz && Download_src
-      src_url=http://mirrors.linuxeye.com/apache/httpd/nghttp2-${nghttp2_ver}.tar.gz && Download_src
-      ;;
-    2)
-      echo "Download apache 2.2..."
-      src_url=http://archive.apache.org/dist/httpd/httpd-${apache22_ver}.tar.gz && Download_src
-      echo "Download mod_remoteip.c for apache 2.2..."
-      src_url=${mirrorLink}/mod_remoteip.c && Download_src
-      ;;
-  esac
+  if [ "${apache_flag}" == 'y' ]; then
+    echo "Download apache 2.4..."
+    src_url=http://archive.apache.org/dist/httpd/httpd-${apache_ver}.tar.gz && Download_src
+    src_url=http://archive.apache.org/dist/apr/apr-${apr_ver}.tar.gz && Download_src
+    src_url=http://archive.apache.org/dist/apr/apr-util-${apr_util_ver}.tar.gz && Download_src
+    src_url=http://mirrors.linuxeye.com/apache/httpd/nghttp2-${nghttp2_ver}.tar.gz && Download_src
+  fi
 
   # tomcat
   case "${tomcat_option}" in
@@ -123,7 +115,7 @@ checkDownload() {
     src_url=http://archive.apache.org/dist/apr/apr-${apr_ver}.tar.gz && Download_src
   fi
 
-  if [[ "${db_option}" =~ ^[1-9]$|^1[0-5]$ ]]; then
+  if [[ "${db_option}" =~ ^[1-9]$|^1[0-4]$ ]]; then
     if [[ "${db_option}" =~ ^[1,2,5,6,7,9]$|^10$ ]] && [ "${dbinstallmethod}" == "2" ]; then
       [[ "${db_option}" =~ ^[2,5,6,7]$|^10$ ]] && boost_ver=${boost_oldver}
       [[ "${db_option}" =~ ^9$ ]] && boost_ver=${boost_percona_ver}
@@ -137,8 +129,8 @@ checkDownload() {
       1)
         # MySQL 8.0
         if [ "${IPADDR_COUNTRY}"x == "CN"x ]; then
-          DOWN_ADDR_MYSQL=http://mirrors.tuna.tsinghua.edu.cn/mysql/downloads/MySQL-8.0
-          DOWN_ADDR_MYSQL_BK=http://mirrors.ustc.edu.cn/mysql-ftp/Downloads/MySQL-8.0
+          DOWN_ADDR_MYSQL=http://mirrors.aliyun.com/mysql/MySQL-8.0
+          DOWN_ADDR_MYSQL_BK=http://mirrors.tuna.tsinghua.edu.cn/mysql/Downloads/MySQL-8.0
           DOWN_ADDR_MYSQL_BK2=http://mirrors.huaweicloud.com/repository/toolkit/mysql/Downloads/MySQL-8.0
         else
           DOWN_ADDR_MYSQL=http://cdn.mysql.com/Downloads/MySQL-8.0
@@ -172,8 +164,8 @@ checkDownload() {
       2)
         # MySQL 5.7
         if [ "${IPADDR_COUNTRY}"x == "CN"x ]; then
-          DOWN_ADDR_MYSQL=http://mirrors.tuna.tsinghua.edu.cn/mysql/downloads/MySQL-5.7
-          DOWN_ADDR_MYSQL_BK=http://mirrors.ustc.edu.cn/mysql-ftp/Downloads/MySQL-5.7
+          DOWN_ADDR_MYSQL=http://mirrors.aliyun.com/mysql/MySQL-5.7
+          DOWN_ADDR_MYSQL_BK=http://mirrors.tuna.tsinghua.edu.cn/mysql/Downloads/MySQL-5.7
           DOWN_ADDR_MYSQL_BK2=http://mirrors.huaweicloud.com/repository/toolkit/mysql/Downloads/MySQL-5.7
         else
           DOWN_ADDR_MYSQL=http://cdn.mysql.com/Downloads/MySQL-5.7
@@ -207,8 +199,8 @@ checkDownload() {
       3)
         # MySQL 5.6
         if [ "${IPADDR_COUNTRY}"x == "CN"x ]; then
-          DOWN_ADDR_MYSQL=http://mirrors.tuna.tsinghua.edu.cn/mysql/downloads/MySQL-5.6
-          DOWN_ADDR_MYSQL_BK=http://mirrors.ustc.edu.cn/mysql-ftp/Downloads/MySQL-5.6
+          DOWN_ADDR_MYSQL=http://mirrors.aliyun.com/mysql/MySQL-5.6
+          DOWN_ADDR_MYSQL_BK=http://mirrors.tuna.tsinghua.edu.cn/mysql/Downloads/MySQL-5.6
           DOWN_ADDR_MYSQL_BK2=http://mirrors.huaweicloud.com/repository/toolkit/mysql/Downloads/MySQL-5.6
         else
           DOWN_ADDR_MYSQL=http://cdn.mysql.com/Downloads/MySQL-5.6
@@ -242,8 +234,8 @@ checkDownload() {
       4)
         # MySQL 5.5
         if [ "${IPADDR_COUNTRY}"x == "CN"x ]; then
-          DOWN_ADDR_MYSQL=http://mirrors.tuna.tsinghua.edu.cn/mysql/downloads/MySQL-5.5
-          DOWN_ADDR_MYSQL_BK=http://mirrors.ustc.edu.cn/mysql-ftp/Downloads/MySQL-5.5
+          DOWN_ADDR_MYSQL=http://mirrors.aliyun.com/mysql/MySQL-5.5
+          DOWN_ADDR_MYSQL_BK=http://mirrors.tuna.tsinghua.edu.cn/mysql/Downloads/MySQL-5.5
           DOWN_ADDR_MYSQL_BK2=http://mirrors.huaweicloud.com/repository/toolkit/mysql/Downloads/MySQL-5.5
         else
           DOWN_ADDR_MYSQL=http://cdn.mysql.com/Downloads/MySQL-5.5
@@ -313,7 +305,7 @@ checkDownload() {
           fi
         fi
         src_url=${DOWN_ADDR_MARIADB}/${FILE_NAME} && Download_src
-        wget -4 --tries=6 -c --no-check-certificate ${DOWN_ADDR_MARIADB}/md5sums.txt -O ${FILE_NAME}.md5
+        wget --tries=6 -c --no-check-certificate ${DOWN_ADDR_MARIADB}/md5sums.txt -O ${FILE_NAME}.md5
         MARAIDB_TAR_MD5=$(awk '{print $1}' ${FILE_NAME}.md5)
         [ -z "${MARAIDB_TAR_MD5}" ] && MARAIDB_TAR_MD5=$(curl -s ${DOWN_ADDR_MARIADB_BK}/md5sums.txt | grep ${FILE_NAME} | awk '{print $1}')
         tryDlCount=0
@@ -332,14 +324,14 @@ checkDownload() {
         if [ "${dbinstallmethod}" == '1' ]; then
           echo "Download Percona 8.0 binary package..."
           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
+          DOWN_ADDR_PERCONA=https://downloads.percona.com/downloads/Percona-Server-8.0/Percona-Server-${percona80_ver}/binary/tarball
         elif [ "${dbinstallmethod}" == '2' ]; then
           echo "Download Percona 8.0 source package..."
           FILE_NAME=percona-server-${percona80_ver}.tar.gz
           if [ "${IPADDR_COUNTRY}"x == "CN"x ]; then
             DOWN_ADDR_PERCONA=${mirrorLink}
           else
-            DOWN_ADDR_PERCONA=https://www.percona.com/downloads/Percona-Server-8.0/Percona-Server-${percona80_ver}/source/tarball
+            DOWN_ADDR_PERCONA=https://downloads.percona.com/downloads/Percona-Server-8.0/Percona-Server-${percona80_ver}/source/tarball
           fi
         fi
         # start download
@@ -364,14 +356,14 @@ checkDownload() {
         if [ "${dbinstallmethod}" == '1' ]; then
           echo "Download Percona 5.7 binary package..."
           FILE_NAME=Percona-Server-${percona57_ver}-Linux.${SYS_BIT_b}.glibc2.12.tar.gz
-          DOWN_ADDR_PERCONA=https://www.percona.com/downloads/Percona-Server-5.7/Percona-Server-${percona57_ver}/binary/tarball
+          DOWN_ADDR_PERCONA=https://downloads.percona.com/downloads/Percona-Server-5.7/Percona-Server-${percona57_ver}/binary/tarball
         elif [ "${dbinstallmethod}" == '2' ]; then
           echo "Download Percona 5.7 source package..."
           FILE_NAME=percona-server-${percona57_ver}.tar.gz
           if [ "${IPADDR_COUNTRY}"x == "CN"x ]; then
             DOWN_ADDR_PERCONA=${mirrorLink}
           else
-            DOWN_ADDR_PERCONA=https://www.percona.com/downloads/Percona-Server-5.7/Percona-Server-${percona57_ver}/source/tarball
+            DOWN_ADDR_PERCONA=https://downloads.percona.com/downloads/Percona-Server-5.7/Percona-Server-${percona57_ver}/source/tarball
           fi
         fi
         # start download
@@ -397,14 +389,14 @@ checkDownload() {
           echo "Download Percona 5.6 binary package..."
           perconaVerStr1=$(echo ${percona56_ver} | sed "s@-@-rel@")
           FILE_NAME=Percona-Server-${perconaVerStr1}-Linux.${SYS_BIT_b}.${sslLibVer}.tar.gz
-          DOWN_ADDR_PERCONA=https://www.percona.com/downloads/Percona-Server-5.6/Percona-Server-${percona56_ver}/binary/tarball
+          DOWN_ADDR_PERCONA=https://downloads.percona.com/downloads/Percona-Server-5.6/Percona-Server-${percona56_ver}/binary/tarball
         elif [ "${dbinstallmethod}" == '2' ]; then
           echo "Download Percona 5.6 source package..."
           FILE_NAME=percona-server-${percona56_ver}.tar.gz
           if [ "${IPADDR_COUNTRY}"x == "CN"x ]; then
             DOWN_ADDR_PERCONA=${mirrorLink}
           else
-            DOWN_ADDR_PERCONA=https://www.percona.com/downloads/Percona-Server-5.6/Percona-Server-${percona56_ver}/source/tarball
+            DOWN_ADDR_PERCONA=https://downloads.percona.com/downloads/Percona-Server-5.6/Percona-Server-${percona56_ver}/source/tarball
           fi
         fi
         # start download
@@ -430,14 +422,14 @@ checkDownload() {
           echo "Download Percona 5.5 binary package..."
           perconaVerStr1=$(echo ${percona55_ver} | sed "s@-@-rel@")
           FILE_NAME=Percona-Server-${perconaVerStr1}-Linux.${SYS_BIT_b}.${sslLibVer}.tar.gz
-          DOWN_ADDR_PERCONA=https://www.percona.com/downloads/Percona-Server-5.5/Percona-Server-${percona55_ver}/binary/tarball
+          DOWN_ADDR_PERCONA=https://downloads.percona.com/downloads/Percona-Server-5.5/Percona-Server-${percona55_ver}/binary/tarball
         elif [ "${dbinstallmethod}" == '2' ]; then
           echo "Download Percona 5.5 source package..."
           FILE_NAME=percona-server-${percona55_ver}.tar.gz
           if [ "${IPADDR_COUNTRY}"x == "CN"x ]; then
             DOWN_ADDR_PERCONA=${mirrorLink}
           else
-            DOWN_ADDR_PERCONA=https://www.percona.com/downloads/Percona-Server-5.5/Percona-Server-${percona55_ver}/source/tarball
+            DOWN_ADDR_PERCONA=https://downloads.percona.com/downloads/Percona-Server-5.5/Percona-Server-${percona55_ver}/source/tarball
           fi
         fi
         # start download
@@ -458,21 +450,6 @@ checkDownload() {
         fi
         ;;
       13)
-        # AliSQL 5.6
-        DOWN_ADDR_ALISQL=$mirrorLink
-        echo "Download AliSQL 5.6 source package..."
-        FILE_NAME=alisql-${alisql_ver}.tar.gz
-        src_url=${DOWN_ADDR_ALISQL}/${FILE_NAME} && Download_src
-        src_url=${DOWN_ADDR_ALISQL}/${FILE_NAME}.md5 && Download_src
-        ALISQL_TAR_MD5=$(awk '{print $1}' ${FILE_NAME}.md5)
-        while [ "$(md5sum ${FILE_NAME} | awk '{print $1}')" != "${ALISQL_TAR_MD5}" ];do
-          wget -4c --no-check-certificate ${DOWN_ADDR_ALISQL}/${FILE_NAME};sleep 1
-          [ "$(md5sum ${FILE_NAME} | awk '{print $1}')" == "${ALISQL_TAR_MD5}" ] && break || continue
-        done
-        ;;
-      14)
-        # PostgreSQL
-        echo "Download PostgreSQL source package..."
         FILE_NAME=postgresql-${pgsql_ver}.tar.gz
         if [ "${IPADDR_COUNTRY}"x == "CN"x ]; then
           DOWN_ADDR_PGSQL=https://mirrors.tuna.tsinghua.edu.cn/postgresql/source/v${pgsql_ver}
@@ -496,7 +473,7 @@ checkDownload() {
           kill -9 $$
         fi
         ;;
-      15)
+      14)
         # MongoDB
         echo "Download MongoDB binary package..."
         FILE_NAME=mongodb-linux-${SYS_BIT_b}-${mongodb_ver}.tgz

+ 5 - 0
include/check_os.sh

@@ -10,6 +10,11 @@
 
 if [ -e "/usr/bin/yum" ]; then
   PM=yum
+  if [ -e /etc/yum.repos.d/CentOS-Base.repo ] && grep -Eqi "release 6." /etc/redhat-release; then
+    sed -i "s@centos/\$releasever@centos-vault/6.10@g" /etc/yum.repos.d/CentOS-Base.repo
+    sed -i 's@centos/RPM-GPG@centos-vault/RPM-GPG@g' /etc/yum.repos.d/CentOS-Base.repo
+    [ -e /etc/yum.repos.d/epel.repo ] && rm -f /etc/yum.repos.d/epel.repo
+  fi
   command -v lsb_release >/dev/null 2>&1 || { [ -e "/etc/euleros-release" ] && yum -y install euleros-lsb || yum -y install redhat-lsb-core; clear; }
 fi
 if [ -e "/usr/bin/apt-get" ]; then

+ 5 - 5
include/check_sw.sh

@@ -9,7 +9,7 @@
 
 installDepsDebian() {
   echo "${CMSG}Removing the conflicting packages...${CEND}"
-  if [[ "${apache_option}" =~ ^[1-2]$ ]]; then
+  if [ "${apache_flag}" == 'y' ]; then
     killall apache2
     pkgList="apache2 apache2-doc apache2-utils apache2.2-common apache2.2-bin apache2-mpm-prefork apache2-doc apache2-mpm-worker php5 php5-common php5-cgi php5-cli php5-mysql php5-curl php5-gd"
     for Package in ${pkgList};do
@@ -18,7 +18,7 @@ installDepsDebian() {
     dpkg -l | grep ^rc | awk '{print $2}' | xargs dpkg -P
   fi
 
-  if [[ "${db_option}" =~ ^[1-9]$|^1[0-3]$ ]]; then
+  if [[ "${db_option}" =~ ^[1-9]$|^1[0-2]$ ]]; then
     pkgList="mysql-client mysql-server mysql-common mysql-server-core-5.5 mysql-client-5.5 mariadb-client mariadb-server mariadb-common"
     for Package in ${pkgList};do
       apt-get -y purge ${Package}
@@ -42,7 +42,7 @@ installDepsDebian() {
       pkgList="debian-keyring debian-archive-keyring build-essential gcc g++ make cmake autoconf libjpeg8 libjpeg62-turbo-dev libjpeg-dev libpng12-0 libpng12-dev libpng3 libgd-dev libxml2 libxml2-dev zlib1g zlib1g-dev libc6 libc6-dev libc-client2007e-dev libglib2.0-0 libglib2.0-dev bzip2 libzip-dev libbz2-1.0 libncurses5 libncurses5-dev libaio1 libaio-dev numactl libreadline-dev curl libcurl3-gnutls libcurl4-gnutls-dev libcurl4-openssl-dev e2fsprogs libkrb5-3 libkrb5-dev libltdl-dev libidn11 libidn11-dev openssl net-tools libssl-dev libtool libevent-dev bison re2c libsasl2-dev libxslt1-dev libxslt-dev libicu-dev locales libcloog-ppl0 patch vim zip unzip tmux htop bc dc expect libexpat1-dev libonig-dev libtirpc-dev nss rsync git lsof lrzsz iptables rsyslog cron logrotate ntpdate libsqlite3-dev psmisc wget sysv-rc ca-certificates"
       ;;
     9|10)
-      pkgList="debian-keyring debian-archive-keyring build-essential gcc g++ make cmake autoconf libjpeg62-turbo-dev libjpeg-dev libpng-dev libxml2 libxml2-dev zlib1g zlib1g-dev libc6 libc6-dev libc-client2007e-dev libglib2.0-0 libglib2.0-dev bzip2 libzip-dev libbz2-1.0 libncurses5 libncurses5-dev libaio1 libaio-dev numactl libreadline-dev curl libcurl3-gnutls libcurl4-gnutls-dev libcurl4-openssl-dev e2fsprogs libkrb5-3 libkrb5-dev libltdl-dev libidn11 libidn11-dev openssl net-tools libssl-dev libtool libevent-dev bison re2c libsasl2-dev libxslt1-dev libicu-dev locales libcloog-ppl1 patch vim zip unzip tmux htop bc dc expect libexpat1-dev libonig-dev libtirpc-dev nss rsync git lsof lrzsz iptables rsyslog cron logrotate ntpdate libsqlite3-dev psmisc wget sysv-rc ca-certificates"
+      pkgList="debian-keyring debian-archive-keyring build-essential gcc g++ make cmake autoconf libjpeg62-turbo-dev libjpeg-dev libpng-dev libgd-dev libxml2 libxml2-dev zlib1g zlib1g-dev libc6 libc6-dev libc-client2007e-dev libglib2.0-0 libglib2.0-dev bzip2 libzip-dev libbz2-1.0 libncurses5 libncurses5-dev libaio1 libaio-dev numactl libreadline-dev curl libcurl3-gnutls libcurl4-gnutls-dev libcurl4-openssl-dev e2fsprogs libkrb5-3 libkrb5-dev libltdl-dev libidn11 libidn11-dev openssl net-tools libssl-dev libtool libevent-dev bison re2c libsasl2-dev libxslt1-dev libicu-dev locales libcloog-ppl1 patch vim zip unzip tmux htop bc dc expect libexpat1-dev libonig-dev libtirpc-dev nss rsync git lsof lrzsz iptables rsyslog cron logrotate ntpdate libsqlite3-dev psmisc wget sysv-rc ca-certificates"
       ;;
     *)
       echo "${CFAILURE}Your system Debian ${Debian_ver} are not supported!${CEND}"
@@ -90,7 +90,7 @@ installDepsCentOS() {
 installDepsUbuntu() {
   # Uninstall the conflicting software
   echo "${CMSG}Removing the conflicting packages...${CEND}"
-  if [[ "${apache_option}" =~ ^[1-2]$ ]]; then
+  if [ "${apache_flag}" == 'y' ]; then
     killall apache2
     pkgList="apache2 apache2-doc apache2-utils apache2.2-common apache2.2-bin apache2-mpm-prefork apache2-doc apache2-mpm-worker php5 php5-common php5-cgi php5-cli php5-mysql php5-curl php5-gd"
     for Package in ${pkgList};do
@@ -99,7 +99,7 @@ installDepsUbuntu() {
     dpkg -l | grep ^rc | awk '{print $2}' | xargs dpkg -P
   fi
 
-  if [[ "${db_option}" =~ ^[1-9]$|^1[0-3]$ ]]; then
+  if [[ "${db_option}" =~ ^[1-9]$|^1[0-2]$ ]]; then
     pkgList="mysql-client mysql-server mysql-common mysql-server-core-5.5 mysql-client-5.5 mariadb-client mariadb-server mariadb-common"
     for Package in ${pkgList};do
       apt-get -y purge ${Package}

+ 1 - 1
include/download.sh

@@ -9,7 +9,7 @@
 #       https://github.com/oneinstack/oneinstack
 
 Download_src() {
-  [ -s "${src_url##*/}" ] && echo "[${CMSG}${src_url##*/}${CEND}] found" || { wget --limit-rate=10M -4 --tries=6 -c --no-check-certificate ${src_url}; sleep 1; }
+  [ -s "${src_url##*/}" ] && echo "[${CMSG}${src_url##*/}${CEND}] found" || { wget --limit-rate=100M --tries=6 -c --no-check-certificate ${src_url}; sleep 1; }
   if [ ! -e "${src_url##*/}" ]; then
     echo "${CFAILURE}Auto download failed! You can manually download ${src_url} into the oneinstack/src directory.${CEND}"
     kill -9 $$

+ 0 - 158
include/hhvm_CentOS.sh

@@ -1,158 +0,0 @@
-#!/bin/bash
-# Author:  yeho <lj2007331 AT gmail.com>
-# BLOG:  https://linuxeye.com
-#
-# Notes: OneinStack for CentOS/RedHat 6+ Debian 8+ and Ubuntu 14+
-#
-# Project home page:
-#       https://oneinstack.com
-#       https://github.com/oneinstack/oneinstack
-
-Install_hhvm_CentOS() {
-  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}
-
-  [ "${PM}" == 'yum' ] && [ ! -e /etc/yum.repos.d/epel.repo ] && yum -y install epel-release
-  if [ "${CentOS_ver}" == '7' ]; then
-    cat > /etc/yum.repos.d/hhvm.repo << EOF
-[hhvm]
-name=gleez hhvm-repo
-baseurl=http://mirrors.linuxeye.com/hhvm-repo/7/\$basearch/
-enabled=1
-gpgcheck=0
-EOF
-    yum -y install hhvm
-    [ ! -e "/usr/bin/hhvm" -a "/usr/local/bin/hhvm" ] && ln -s /usr/local/bin/hhvm /usr/bin/hhvm
-  fi
-
-  if [ "${CentOS_ver}" == '6' ]; then
-    # Install needed packages
-    pkgList="libmcrypt-devel glog-devel jemalloc-devel tbb-devel libdwarf-devel libxml2-devel libicu-devel pcre-devel gd-devel boost-devel sqlite-devel pam-devel bzip2-devel oniguruma-devel openldap-devel readline-devel libc-client-devel libcap-devel libevent-devel libcurl-devel libmemcached-devel lcms2 inotify-tools"
-    for Package in ${pkgList}; do
-      yum -y install ${Package}
-    done
-    # Uninstall the conflicting packages
-    yum -y remove libwebp boost-system boost-filesystem
-
-    cat > /etc/yum.repos.d/hhvm.repo << EOF
-[hhvm]
-name=gleez hhvm-repo
-baseurl=http://mirrors.linuxeye.com/hhvm-repo/6/\$basearch/
-enabled=1
-gpgcheck=0
-EOF
-    yum --disablerepo=epel -y install mysql mysql-devel mysql-libs
-    yum --disablerepo=epel -y install hhvm
-  fi
-
-  userdel -r nginx;userdel -r saslauth
-  rm -rf /var/log/hhvm
-  mkdir /var/log/hhvm
-  chown -R ${run_user}:${run_group} /var/log/hhvm
-  cat > /etc/hhvm/config.hdf << EOF
-ResourceLimit {
-  CoreFileSize = 0          # in bytes
-  MaxSocket = 10000         # must be not 0, otherwise HHVM will not start
-  SocketDefaultTimeout = 5  # in seconds
-  MaxRSS = 0
-  MaxRSSPollingCycle = 0    # in seconds, how often to check max memory
-  DropCacheCycle = 0        # in seconds, how often to drop disk cache
-}
-
-Log {
-  Level = Info
-  AlwaysLogUnhandledExceptions = true
-  RuntimeErrorReportingLevel = 8191
-  UseLogFile = true
-  UseSyslog = false
-  File = /var/log/hhvm/error.log
-  Access {
-    * {
-      File = /var/log/hhvm/access.log
-      Format = %h %l %u % t \"%r\" %>s %b
-    }
-  }
-}
-
-MySQL {
-  ReadOnly = false
-  ConnectTimeout = 1000      # in ms
-  ReadTimeout = 1000         # in ms
-  SlowQueryThreshold = 1000  # in ms, log slow queries as errors
-  KillOnTimeout = false
-}
-
-Mail {
-  SendmailPath = /usr/sbin/sendmail -t -i
-  ForceExtraParameters =
-}
-EOF
-
-  cat > /etc/hhvm/server.ini << EOF
-; php options
-pid = /var/log/hhvm/pid
-
-; hhvm specific
-;hhvm.server.port = 9001
-hhvm.server.file_socket = /var/log/hhvm/sock
-hhvm.server.type = fastcgi
-hhvm.server.default_document = index.php
-hhvm.log.use_log_file = true
-hhvm.log.file = /var/log/hhvm/error.log
-hhvm.repo.central.path = /var/log/hhvm/hhvm.hhbc
-EOF
-
-  cat > /etc/hhvm/php.ini << EOF
-hhvm.mysql.socket = /tmp/mysql.sock
-expose_php = 0
-memory_limit = 400000000
-post_max_size = 50000000
-EOF
-
-  if [ -e "${web_install_dir}/sbin/nginx" -a -e "/usr/bin/hhvm" -a ! -e "${php_install_dir}" ]; then
-    sed -i 's@/dev/shm/php-cgi.sock@/var/log/hhvm/sock@' ${web_install_dir}/conf/nginx.conf
-    [ -z "$(grep 'fastcgi_param SCRIPT_FILENAME' ${web_install_dir}/conf/nginx.conf)" ] && sed -i "s@fastcgi_index index.php;@&\n\t\tfastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;@" ${web_install_dir}/conf/nginx.conf
-    sed -i 's@include fastcgi.conf;@include fastcgi_params;@' ${web_install_dir}/conf/nginx.conf
-    service nginx reload
-  fi
-
-  rm -rf /etc/ld.so.conf.d/*_64.conf
-  ldconfig
-  if [ -e /bin/systemctl ]; then
-    cat > /lib/systemd/system/hhvm.service << EOF
-[Unit]
-Description=HHVM HipHop Virtual Machine (FCGI)
-After=network.target nginx.service
-
-[Service]
-ExecStart=/usr/local/bin/hhvm --mode server --user ${run_user} --config /etc/hhvm/server.ini --config /etc/hhvm/php.ini --config /etc/hhvm/config.hdf
-
-[Install]
-WantedBy=multi-user.target
-EOF
-    systemctl enable hhvm
-    systemctl start hhvm
-  else
-    # Supervisor
-    yum -y install python-setuptools
-    ping pypi.python.org -c 4 >/dev/null 2>&1
-    easy_install supervisor
-    echo_supervisord_conf > /etc/supervisord.conf
-    sed -i 's@pidfile=/tmp/supervisord.pid@pidfile=/var/run/supervisord.pid@' /etc/supervisord.conf
-    [ -z "$(grep 'program:hhvm' /etc/supervisord.conf)" ] && cat >> /etc/supervisord.conf << EOF
-[program:hhvm]
-command=/usr/bin/hhvm --mode server --user ${run_user} --config /etc/hhvm/server.ini --config /etc/hhvm/php.ini --config /etc/hhvm/config.hdf
-numprocs=1 ; number of processes copies to start (def 1)
-directory=/tmp ; directory to cwd to before exec (def no cwd)
-autostart=true ; start at supervisord start (default: true)
-autorestart=unexpected ; whether/when to restart (default: unexpected)
-stopwaitsecs=10 ; max num secs to wait b4 SIGKILL (default 10)
-EOF
-    /bin/cp ${oneinstack_dir}/init.d/Supervisor-init-CentOS /etc/init.d/supervisord
-    chmod +x /etc/init.d/supervisord
-    chkconfig supervisord on
-    service supervisord start
-  fi
-}

+ 2 - 2
include/mariadb-10.3.sh

@@ -205,12 +205,12 @@ EOF
 
   ${mariadb_install_dir}/bin/mysql -e "grant all privileges on *.* to root@'127.0.0.1' identified by \"${dbrootpwd}\" with grant option;"
   ${mariadb_install_dir}/bin/mysql -e "grant all privileges on *.* to root@'localhost' identified by \"${dbrootpwd}\" with grant option;"
-  ${mariadb_install_dir}/bin/mysql -uroot -p${dbrootpwd} -e "delete from mysql.user where Password='';"
+  ${mariadb_install_dir}/bin/mysql -uroot -p${dbrootpwd} -e "delete from mysql.user where Password='' where User not like 'mariadb.%';"
   ${mariadb_install_dir}/bin/mysql -uroot -p${dbrootpwd} -e "delete from mysql.db where User='';"
   ${mariadb_install_dir}/bin/mysql -uroot -p${dbrootpwd} -e "delete from mysql.proxies_priv where Host!='localhost';"
   ${mariadb_install_dir}/bin/mysql -uroot -p${dbrootpwd} -e "drop database test;"
   ${mariadb_install_dir}/bin/mysql -uroot -p${dbrootpwd} -e "reset master;"
-  rm -rf /etc/ld.so.conf.d/{mysql,mariadb,percona,alisql}*.conf
+  rm -rf /etc/ld.so.conf.d/{mysql,mariadb,percona}*.conf
   echo "${mariadb_install_dir}/lib" > /etc/ld.so.conf.d/z-mariadb.conf
   ldconfig
   service mysqld stop

+ 2 - 2
include/mariadb-10.4.sh

@@ -206,12 +206,12 @@ EOF
 
   ${mariadb_install_dir}/bin/mysql -e "grant all privileges on *.* to root@'127.0.0.1' identified by \"${dbrootpwd}\" with grant option;"
   ${mariadb_install_dir}/bin/mysql -e "grant all privileges on *.* to root@'localhost' identified by \"${dbrootpwd}\" with grant option;"
-  ${mariadb_install_dir}/bin/mysql -uroot -p${dbrootpwd} -e "delete from mysql.user where Password='';"
+  ${mariadb_install_dir}/bin/mysql -uroot -p${dbrootpwd} -e "delete from mysql.user where Password='' where User not like 'mariadb.%';"
   ${mariadb_install_dir}/bin/mysql -uroot -p${dbrootpwd} -e "delete from mysql.db where User='';"
   ${mariadb_install_dir}/bin/mysql -uroot -p${dbrootpwd} -e "delete from mysql.proxies_priv where Host!='localhost';"
   ${mariadb_install_dir}/bin/mysql -uroot -p${dbrootpwd} -e "drop database test;"
   ${mariadb_install_dir}/bin/mysql -uroot -p${dbrootpwd} -e "reset master;"
-  rm -rf /etc/ld.so.conf.d/{mysql,mariadb,percona,alisql}*.conf
+  rm -rf /etc/ld.so.conf.d/{mysql,mariadb,percona}*.conf
   echo "${mariadb_install_dir}/lib" > /etc/ld.so.conf.d/z-mariadb.conf
   ldconfig
   service mysqld stop

+ 2 - 2
include/mariadb-10.5.sh

@@ -206,12 +206,12 @@ EOF
 
   ${mariadb_install_dir}/bin/mysql -e "grant all privileges on *.* to root@'127.0.0.1' identified by \"${dbrootpwd}\" with grant option;"
   ${mariadb_install_dir}/bin/mysql -e "grant all privileges on *.* to root@'localhost' identified by \"${dbrootpwd}\" with grant option;"
-  ${mariadb_install_dir}/bin/mysql -uroot -p${dbrootpwd} -e "delete from mysql.user where Password='';"
+  ${mariadb_install_dir}/bin/mysql -uroot -p${dbrootpwd} -e "delete from mysql.user where Password='' where User not like 'mariadb.%';"
   ${mariadb_install_dir}/bin/mysql -uroot -p${dbrootpwd} -e "delete from mysql.db where User='';"
   ${mariadb_install_dir}/bin/mysql -uroot -p${dbrootpwd} -e "delete from mysql.proxies_priv where Host!='localhost';"
   ${mariadb_install_dir}/bin/mysql -uroot -p${dbrootpwd} -e "drop database test;"
   ${mariadb_install_dir}/bin/mysql -uroot -p${dbrootpwd} -e "reset master;"
-  rm -rf /etc/ld.so.conf.d/{mysql,mariadb,percona,alisql}*.conf
+  rm -rf /etc/ld.so.conf.d/{mysql,mariadb,percona}*.conf
   echo "${mariadb_install_dir}/lib" > /etc/ld.so.conf.d/z-mariadb.conf
   ldconfig
   service mysqld stop

+ 2 - 2
include/mariadb-5.5.sh

@@ -204,12 +204,12 @@ EOF
 
   ${mariadb_install_dir}/bin/mysql -e "grant all privileges on *.* to root@'127.0.0.1' identified by \"${dbrootpwd}\" with grant option;"
   ${mariadb_install_dir}/bin/mysql -e "grant all privileges on *.* to root@'localhost' identified by \"${dbrootpwd}\" with grant option;"
-  ${mariadb_install_dir}/bin/mysql -uroot -p${dbrootpwd} -e "delete from mysql.user where Password='';"
+  ${mariadb_install_dir}/bin/mysql -uroot -p${dbrootpwd} -e "delete from mysql.user where Password='' where User not like 'mariadb.%';"
   ${mariadb_install_dir}/bin/mysql -uroot -p${dbrootpwd} -e "delete from mysql.db where User='';"
   ${mariadb_install_dir}/bin/mysql -uroot -p${dbrootpwd} -e "delete from mysql.proxies_priv where Host!='localhost';"
   ${mariadb_install_dir}/bin/mysql -uroot -p${dbrootpwd} -e "drop database test;"
   ${mariadb_install_dir}/bin/mysql -uroot -p${dbrootpwd} -e "reset master;"
-  rm -rf /etc/ld.so.conf.d/{mysql,mariadb,percona,alisql}*.conf
+  rm -rf /etc/ld.so.conf.d/{mysql,mariadb,percona}*.conf
   echo "${mariadb_install_dir}/lib" > /etc/ld.so.conf.d/z-mariadb.conf
   ldconfig
   service mysqld stop

+ 2 - 2
include/mysql-5.5.sh

@@ -207,12 +207,12 @@ EOF
 
   ${mysql_install_dir}/bin/mysql -e "grant all privileges on *.* to root@'127.0.0.1' identified by \"${dbrootpwd}\" with grant option;"
   ${mysql_install_dir}/bin/mysql -e "grant all privileges on *.* to root@'localhost' identified by \"${dbrootpwd}\" with grant option;"
-  ${mysql_install_dir}/bin/mysql -uroot -p${dbrootpwd} -e "delete from mysql.user where Password='';"
+  ${mysql_install_dir}/bin/mysql -uroot -p${dbrootpwd} -e "delete from mysql.user where Password='' where User not like 'mysql.%';"
   ${mysql_install_dir}/bin/mysql -uroot -p${dbrootpwd} -e "delete from mysql.db where User='';"
   ${mysql_install_dir}/bin/mysql -uroot -p${dbrootpwd} -e "delete from mysql.proxies_priv where Host!='localhost';"
   ${mysql_install_dir}/bin/mysql -uroot -p${dbrootpwd} -e "drop database test;"
   ${mysql_install_dir}/bin/mysql -uroot -p${dbrootpwd} -e "reset master;"
-  rm -rf /etc/ld.so.conf.d/{mysql,mariadb,percona,alisql}*.conf
+  rm -rf /etc/ld.so.conf.d/{mysql,mariadb,percona}*.conf
   [ -e "${mysql_install_dir}/my.cnf" ] && rm -f ${mysql_install_dir}/my.cnf
   echo "${mysql_install_dir}/lib" > /etc/ld.so.conf.d/z-mysql.conf
   ldconfig

+ 2 - 2
include/mysql-5.6.sh

@@ -206,12 +206,12 @@ EOF
 
   ${mysql_install_dir}/bin/mysql -e "grant all privileges on *.* to root@'127.0.0.1' identified by \"${dbrootpwd}\" with grant option;"
   ${mysql_install_dir}/bin/mysql -e "grant all privileges on *.* to root@'localhost' identified by \"${dbrootpwd}\" with grant option;"
-  ${mysql_install_dir}/bin/mysql -uroot -p${dbrootpwd} -e "delete from mysql.user where Password='';"
+  ${mysql_install_dir}/bin/mysql -uroot -p${dbrootpwd} -e "delete from mysql.user where Password='' where User not like 'mysql.%';"
   ${mysql_install_dir}/bin/mysql -uroot -p${dbrootpwd} -e "delete from mysql.db where User='';"
   ${mysql_install_dir}/bin/mysql -uroot -p${dbrootpwd} -e "delete from mysql.proxies_priv where Host!='localhost';"
   ${mysql_install_dir}/bin/mysql -uroot -p${dbrootpwd} -e "drop database test;"
   ${mysql_install_dir}/bin/mysql -uroot -p${dbrootpwd} -e "reset master;"
-  rm -rf /etc/ld.so.conf.d/{mysql,mariadb,percona,alisql}*.conf
+  rm -rf /etc/ld.so.conf.d/{mysql,mariadb,percona}*.conf
   [ -e "${mysql_install_dir}/my.cnf" ] && rm -f ${mysql_install_dir}/my.cnf
   echo "${mysql_install_dir}/lib" > /etc/ld.so.conf.d/z-mysql.conf
   ldconfig

+ 1 - 1
include/mysql-5.7.sh

@@ -212,7 +212,7 @@ EOF
   ${mysql_install_dir}/bin/mysql -e "grant all privileges on *.* to root@'127.0.0.1' identified by \"${dbrootpwd}\" with grant option;"
   ${mysql_install_dir}/bin/mysql -e "grant all privileges on *.* to root@'localhost' identified by \"${dbrootpwd}\" with grant option;"
   ${mysql_install_dir}/bin/mysql -uroot -p${dbrootpwd} -e "reset master;"
-  rm -rf /etc/ld.so.conf.d/{mysql,mariadb,percona,alisql}*.conf
+  rm -rf /etc/ld.so.conf.d/{mysql,mariadb,percona}*.conf
   [ -e "${mysql_install_dir}/my.cnf" ] && rm -f ${mysql_install_dir}/my.cnf
   echo "${mysql_install_dir}/lib" > /etc/ld.so.conf.d/z-mysql.conf
   ldconfig

+ 1 - 1
include/mysql-8.0.sh

@@ -211,7 +211,7 @@ EOF
   ${mysql_install_dir}/bin/mysql -uroot -hlocalhost -e "grant all privileges on *.* to root@'localhost' with grant option;"
   ${mysql_install_dir}/bin/mysql -uroot -hlocalhost -e "alter user root@'localhost' identified by \"${dbrootpwd}\";"
   ${mysql_install_dir}/bin/mysql -uroot -p${dbrootpwd} -e "reset master;"
-  rm -rf /etc/ld.so.conf.d/{mysql,mariadb,percona,alisql}*.conf
+  rm -rf /etc/ld.so.conf.d/{mysql,mariadb,percona}*.conf
   [ -e "${mysql_install_dir}/my.cnf" ] && rm -f ${mysql_install_dir}/my.cnf
   echo "${mysql_install_dir}/lib" > /etc/ld.so.conf.d/z-mysql.conf
   ldconfig

+ 1 - 1
include/nginx.sh

@@ -54,7 +54,7 @@ Install_Nginx() {
   fi
 
   mv ${nginx_install_dir}/conf/nginx.conf{,_bk}
-  if [[ ${apache_option} =~ ^[1-2]$ ]] || [ -e "${apache_install_dir}/bin/httpd" ]; then
+  if [ "${apache_flag}" == 'y' ] || [ -e "${apache_install_dir}/bin/httpd" ]; then
     /bin/cp ../config/nginx_apache.conf ${nginx_install_dir}/conf/nginx.conf
   elif { [[ ${tomcat_option} =~ ^[1-4]$ ]] || [ -e "${tomcat_install_dir}/conf/server.xml" ]; } && { [[ ! ${php_option} =~ ^[1-9]$|^10$ ]] && [ ! -e "${php_install_dir}/bin/php" ]; }; then
     /bin/cp ../config/nginx_tomcat.conf ${nginx_install_dir}/conf/nginx.conf

+ 1 - 1
include/openresty.sh

@@ -50,7 +50,7 @@ Install_OpenResty() {
   fi
 
   mv ${openresty_install_dir}/nginx/conf/nginx.conf{,_bk}
-  if [[ ${apache_option} =~ ^[1-2]$ ]] || [ -e "${apache_install_dir}/bin/httpd" ]; then
+  if [ "${apache_flag}" == 'y' ] || [ -e "${apache_install_dir}/bin/httpd" ]; then
     /bin/cp ../config/nginx_apache.conf ${openresty_install_dir}/nginx/conf/nginx.conf 
   elif { [[ ${tomcat_option} =~ ^[1-4]$ ]] || [ -e "${tomcat_install_dir}/conf/server.xml" ]; } && { [[ ! ${php_option} =~ ^[1-9]$|^10$ ]] && [ ! -e "${php_install_dir}/bin/php" ]; }; then
     /bin/cp ../config/nginx_tomcat.conf ${openresty_install_dir}/nginx/conf/nginx.conf 

+ 4 - 0
include/pecl_swoole.sh

@@ -15,6 +15,10 @@ Install_pecl_swoole() {
     PHP_detail_ver=$(${php_install_dir}/bin/php-config --version)
     PHP_main_ver=${PHP_detail_ver%.*}
     if [[ "${PHP_main_ver}" =~ ^5.[3-6]$ ]]; then
+      src_url=https://pecl.php.net/get/swoole-1.10.5.tgz && Download_src
+      tar xzf swoole-1.10.5.tgz
+      pushd swoole-1.10.5 > /dev/null
+    elif [[ "${PHP_main_ver}" =~ ^7.[0-1]$ ]]; then
       src_url=https://pecl.php.net/get/swoole-${swoole_oldver}.tgz && Download_src
       tar xzf swoole-${swoole_oldver}.tgz
       pushd swoole-${swoole_oldver} > /dev/null

+ 2 - 2
include/percona-5.5.sh

@@ -208,12 +208,12 @@ EOF
 
   ${percona_install_dir}/bin/mysql -e "grant all privileges on *.* to root@'127.0.0.1' identified by \"${dbrootpwd}\" with grant option;"
   ${percona_install_dir}/bin/mysql -e "grant all privileges on *.* to root@'localhost' identified by \"${dbrootpwd}\" with grant option;"
-  ${percona_install_dir}/bin/mysql -uroot -p${dbrootpwd} -e "delete from mysql.user where Password='';"
+  ${percona_install_dir}/bin/mysql -uroot -p${dbrootpwd} -e "delete from mysql.user where Password='' where User not like 'mysql.%';"
   ${percona_install_dir}/bin/mysql -uroot -p${dbrootpwd} -e "delete from mysql.db where User='';"
   ${percona_install_dir}/bin/mysql -uroot -p${dbrootpwd} -e "delete from mysql.proxies_priv where Host!='localhost';"
   ${percona_install_dir}/bin/mysql -uroot -p${dbrootpwd} -e "drop database test;"
   ${percona_install_dir}/bin/mysql -uroot -p${dbrootpwd} -e "reset master;"
-  rm -rf /etc/ld.so.conf.d/{mysql,mariadb,percona,alisql}*.conf
+  rm -rf /etc/ld.so.conf.d/{mysql,mariadb,percona}*.conf
   echo "${percona_install_dir}/lib" > /etc/ld.so.conf.d/z-percona.conf
   ldconfig
   service mysqld stop

+ 2 - 2
include/percona-5.6.sh

@@ -208,12 +208,12 @@ EOF
 
   ${percona_install_dir}/bin/mysql -e "grant all privileges on *.* to root@'127.0.0.1' identified by \"${dbrootpwd}\" with grant option;"
   ${percona_install_dir}/bin/mysql -e "grant all privileges on *.* to root@'localhost' identified by \"${dbrootpwd}\" with grant option;"
-  ${percona_install_dir}/bin/mysql -uroot -p${dbrootpwd} -e "delete from mysql.user where Password='';"
+  ${percona_install_dir}/bin/mysql -uroot -p${dbrootpwd} -e "delete from mysql.user where Password='' where User not like 'mysql.%';"
   ${percona_install_dir}/bin/mysql -uroot -p${dbrootpwd} -e "delete from mysql.db where User='';"
   ${percona_install_dir}/bin/mysql -uroot -p${dbrootpwd} -e "delete from mysql.proxies_priv where Host!='localhost';"
   ${percona_install_dir}/bin/mysql -uroot -p${dbrootpwd} -e "drop database test;"
   ${percona_install_dir}/bin/mysql -uroot -p${dbrootpwd} -e "reset master;"
-  rm -rf /etc/ld.so.conf.d/{mysql,mariadb,percona,alisql}*.conf
+  rm -rf /etc/ld.so.conf.d/{mysql,mariadb,percona}*.conf
   echo "${percona_install_dir}/lib" > /etc/ld.so.conf.d/z-percona.conf
   ldconfig
   service mysqld stop

+ 1 - 1
include/percona-5.7.sh

@@ -213,7 +213,7 @@ EOF
   ${percona_install_dir}/bin/mysql -e "grant all privileges on *.* to root@'127.0.0.1' identified by \"${dbrootpwd}\" with grant option;"
   ${percona_install_dir}/bin/mysql -e "grant all privileges on *.* to root@'localhost' identified by \"${dbrootpwd}\" with grant option;"
   ${percona_install_dir}/bin/mysql -uroot -p${dbrootpwd} -e "reset master;"
-  rm -rf /etc/ld.so.conf.d/{mysql,mariadb,percona,alisql}*.conf
+  rm -rf /etc/ld.so.conf.d/{mysql,mariadb,percona}*.conf
   [ -e "${percona_install_dir}/my.cnf" ] && rm -rf ${percona_install_dir}/my.cnf
   echo "${percona_install_dir}/lib" > /etc/ld.so.conf.d/z-percona.conf
   ldconfig

+ 2 - 3
include/percona-8.0.sh

@@ -19,9 +19,8 @@ Install_Percona80() {
   if [ "${dbinstallmethod}" == "1" ]; then
     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@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.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
       yum -y install openldap-devel
@@ -223,7 +222,7 @@ EOF
   ${percona_install_dir}/bin/mysql -uroot -hlocalhost -e "grant all privileges on *.* to root@'localhost' with grant option;"
   ${percona_install_dir}/bin/mysql -uroot -hlocalhost -e "alter user root@'localhost' identified by \"${dbrootpwd}\";"
   ${percona_install_dir}/bin/mysql -uroot -p${dbrootpwd} -e "reset master;"
-  rm -rf /etc/ld.so.conf.d/{mysql,mariadb,percona,alisql}*.conf
+  rm -rf /etc/ld.so.conf.d/{mysql,mariadb,percona}*.conf
   [ -e "${percona_install_dir}/my.cnf" ] && rm -f ${percona_install_dir}/my.cnf
   echo "${percona_install_dir}/lib" > /etc/ld.so.conf.d/z-percona.conf
   ldconfig

+ 2 - 2
include/php-5.3.sh

@@ -104,7 +104,7 @@ Install_PHP53() {
   make clean
   [ ! -d "${php_install_dir}" ] && mkdir -p ${php_install_dir}
   { [ ${Debian_ver} -ge 10 >/dev/null 2>&1 ] || [ ${Ubuntu_ver} -ge 19 >/dev/null 2>&1 ]; } || intl_modules_options='--enable-intl'
-  if [ "${apache_option}" == '2' ] || [ "${Apache_main_ver}" == '22' ] || [ "${apache_mode_option}" == '2' ]; then
+  if [ "${Apache_main_ver}" == '22' ] || [ "${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 --disable-fileinfo \
@@ -260,7 +260,7 @@ EOF
 
     service php-fpm start
 
-  elif [ "${apache_option}" == '2' ] || [ "${Apache_main_ver}" == '22' ] || [ "${apache_mode_option}" != '2' ]; then
+  elif [ "${Apache_main_ver}" == '22' ] || [ "${apache_mode_option}" == '2' ]; then
     service httpd restart
   fi
   popd > /dev/null

+ 2 - 2
include/php-5.4.sh

@@ -102,7 +102,7 @@ Install_PHP54() {
   make clean
   [ ! -d "${php_install_dir}" ] && mkdir -p ${php_install_dir}
   { [ ${Debian_ver} -ge 10 >/dev/null 2>&1 ] || [ ${Ubuntu_ver} -ge 19 >/dev/null 2>&1 ]; } || intl_modules_options='--enable-intl'
-  if [ "${apache_option}" == '2' ] || [ "${Apache_main_ver}" == '22' ] || [ "${apache_mode_option}" == '2' ]; then
+  if [ "${Apache_main_ver}" == '22' ] || [ "${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 --disable-fileinfo \
@@ -257,7 +257,7 @@ EOF
 
     service php-fpm start
 
-  elif [ "${apache_option}" == '2' ] || [ "${Apache_main_ver}" == '22' ] || [ "${apache_mode_option}" == '2' ]; then
+  elif [ "${Apache_main_ver}" == '22' ] || [ "${apache_mode_option}" == '2' ]; then
     service httpd restart
   fi
   popd > /dev/null

+ 2 - 2
include/php-5.5.sh

@@ -101,7 +101,7 @@ Install_PHP55() {
   [ ! -d "${php_install_dir}" ] && mkdir -p ${php_install_dir}
   { [ ${Debian_ver} -ge 10 >/dev/null 2>&1 ] || [ ${Ubuntu_ver} -ge 19 >/dev/null 2>&1 ]; } || intl_modules_options='--enable-intl'
   [ "${phpcache_option}" == '1' ] && phpcache_arg='--enable-opcache' || phpcache_arg='--disable-opcache'
-  if [ "${apache_option}" == '2' ] || [ "${Apache_main_ver}" == '22' ] || [ "${apache_mode_option}" == '2' ]; then
+  if [ "${Apache_main_ver}" == '22' ] || [ "${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 \
@@ -270,7 +270,7 @@ EOF
 
     service php-fpm start
 
-  elif [ "${apache_option}" == '2' ] || [ "${Apache_main_ver}" == '22' ] || [ "${apache_mode_option}" == '2' ]; then
+  elif [ "${Apache_main_ver}" == '22' ] || [ "${apache_mode_option}" == '2' ]; then
     service httpd restart
   fi
   popd > /dev/null

+ 2 - 2
include/php-5.6.sh

@@ -102,7 +102,7 @@ Install_PHP56() {
   [ ! -d "${php_install_dir}" ] && mkdir -p ${php_install_dir}
   { [ ${Debian_ver} -ge 10 >/dev/null 2>&1 ] || [ ${Ubuntu_ver} -ge 19 >/dev/null 2>&1 ]; } || intl_modules_options='--enable-intl'
   [ "${phpcache_option}" == '1' ] && phpcache_arg='--enable-opcache' || phpcache_arg='--disable-opcache'
-  if [ "${apache_option}" == '2' ] || [ "${Apache_main_ver}" == '22' ] || [ "${apache_mode_option}" == '2' ]; then
+  if [ "${Apache_main_ver}" == '22' ] || [ "${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 \
@@ -274,7 +274,7 @@ EOF
 
     service php-fpm start
 
-  elif [ "${apache_option}" == '2' ] || [ "${Apache_main_ver}" == '22' ] || [ "${apache_mode_option}" == '2' ]; then
+  elif [ "${Apache_main_ver}" == '22' ] || [ "${apache_mode_option}" == '2' ]; then
     service httpd restart
   fi
   popd > /dev/null

+ 2 - 2
include/php-7.0.sh

@@ -102,7 +102,7 @@ Install_PHP70() {
   [ ! -d "${php_install_dir}" ] && mkdir -p ${php_install_dir}
   { [ ${Debian_ver} -ge 10 >/dev/null 2>&1 ] || [ ${Ubuntu_ver} -ge 19 >/dev/null 2>&1 ]; } || intl_modules_options='--enable-intl'
   [ "${phpcache_option}" == '1' ] && phpcache_arg='--enable-opcache' || phpcache_arg='--disable-opcache'
-  if [ "${apache_option}" == '2' ] || [ "${Apache_main_ver}" == '22' ] || [ "${apache_mode_option}" == '2' ]; then
+  if [ "${Apache_main_ver}" == '22' ] || [ "${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 \
@@ -279,7 +279,7 @@ EOF
 
     service php-fpm start
 
-  elif [ "${apache_option}" == '2' ] || [ "${Apache_main_ver}" == '22' ] || [ "${apache_mode_option}" == '2' ]; then
+  elif [ "${Apache_main_ver}" == '22' ] || [ "${apache_mode_option}" == '2' ]; then
     service httpd restart
   fi
   popd > /dev/null

+ 2 - 2
include/php-7.1.sh

@@ -101,7 +101,7 @@ Install_PHP71() {
   make clean
   [ ! -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
+  if [ "${Apache_main_ver}" == '22' ] || [ "${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 \
@@ -278,7 +278,7 @@ EOF
 
     service php-fpm start
 
-  elif [ "${apache_option}" == '2' ] || [ "${Apache_main_ver}" == '22' ] || [ "${apache_mode_option}" == '2' ]; then
+  elif [ "${Apache_main_ver}" == '22' ] || [ "${apache_mode_option}" == '2' ]; then
     service httpd restart
   fi
   popd > /dev/null

+ 2 - 2
include/php-7.2.sh

@@ -93,7 +93,7 @@ Install_PHP72() {
   make clean
   [ ! -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
+  if [ "${Apache_main_ver}" == '22' ] || [ "${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 \
@@ -269,7 +269,7 @@ EOF
 
     service php-fpm start
 
-  elif [ "${apache_option}" == '2' ] || [ "${Apache_main_ver}" == '22' ] || [ "${apache_mode_option}" == '2' ]; then
+  elif [ "${Apache_main_ver}" == '22' ] || [ "${apache_mode_option}" == '2' ]; then
     service httpd restart
   fi
   popd > /dev/null

+ 2 - 2
include/php-7.3.sh

@@ -93,7 +93,7 @@ Install_PHP73() {
   make clean
   [ ! -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
+  if [ "${Apache_main_ver}" == '22' ] || [ "${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 \
@@ -269,7 +269,7 @@ EOF
 
     service php-fpm start
 
-  elif [ "${apache_option}" == '2' ] || [ "${Apache_main_ver}" == '22' ] || [ "${apache_mode_option}" == '2' ]; then
+  elif [ "${Apache_main_ver}" == '22' ] || [ "${apache_mode_option}" == '2' ]; then
     service httpd restart
   fi
   popd > /dev/null

+ 2 - 2
include/php-7.4.sh

@@ -103,7 +103,7 @@ Install_PHP74() {
   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_option}" == '2' ] || [ "${Apache_main_ver}" == '22' ] || [ "${apache_mode_option}" == '2' ]; then
+  if [ "${Apache_main_ver}" == '22' ] || [ "${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 \
@@ -279,7 +279,7 @@ EOF
 
     service php-fpm start
 
-  elif [ "${apache_option}" == '2' ] || [ "${Apache_main_ver}" == '22' ] || [ "${apache_mode_option}" == '2' ]; then
+  elif [ "${Apache_main_ver}" == '22' ] || [ "${apache_mode_option}" == '2' ]; then
     service httpd restart
   fi
   popd > /dev/null

+ 2 - 2
include/php-8.0.sh

@@ -104,7 +104,7 @@ Install_PHP80() {
   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_option}" == '2' ] || [ "${Apache_main_ver}" == '22' ] || [ "${apache_mode_option}" == '2' ]; then
+  if [ "${Apache_main_ver}" == '22' ] || [ "${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 \
@@ -280,7 +280,7 @@ EOF
 
     service php-fpm start
 
-  elif [ "${apache_option}" == '2' ] || [ "${Apache_main_ver}" == '22' ] || [ "${apache_mode_option}" == '2' ]; then
+  elif [ "${Apache_main_ver}" == '22' ] || [ "${apache_mode_option}" == '2' ]; then
     service httpd restart
   fi
   popd > /dev/null

+ 1 - 1
include/tengine.sh

@@ -49,7 +49,7 @@ Install_Tengine() {
   fi
 
   mv ${tengine_install_dir}/conf/nginx.conf{,_bk}
-  if [[ ${apache_option} =~ ^[1-2]$ ]] || [ -e "${apache_install_dir}/bin/httpd" ]; then
+  if [ "${apache_flag}" == 'y' ] || [ -e "${apache_install_dir}/bin/httpd" ]; then
     /bin/cp ../config/nginx_apache.conf ${tengine_install_dir}/conf/nginx.conf
   elif { [[ ${tomcat_option} =~ ^[1-4]$ ]] || [ -e "${tomcat_install_dir}/conf/server.xml" ]; } && { [[ ! ${php_option} =~ ^[1-9]$|^10$ ]] && [ ! -e "${php_install_dir}/bin/php" ]; }; then
     /bin/cp ../config/nginx_tomcat.conf ${tengine_install_dir}/conf/nginx.conf

+ 0 - 150
init.d/Supervisor-init-CentOS

@@ -1,150 +0,0 @@
-#!/bin/bash
-#
-# supervisord   This scripts turns supervisord on
-#
-# Author:       Mike McGrath <mmcgrath@redhat.com> (based off yumupdatesd)
-#               Jason Koppe <jkoppe@indeed.com> adjusted to read sysconfig,
-#                   use supervisord tools to start/stop, conditionally wait
-#                   for child processes to shutdown, and startup later
-#               Mikhail Mingalev <mingalevme@gmail.com> Merged
-#                   redhat-init-jkoppe and redhat-sysconfig-jkoppe, and
-#                   made the script "simple customizable".
-#               Brendan Maguire <maguire.brendan@gmail.com> Added OPTIONS to
-#                   SUPERVISORCTL status call
-#
-# chkconfig:    345 83 04
-#
-# description:  supervisor is a process control utility.  It has a web based
-#               xmlrpc interface as well as a few other nifty features.
-#               Script was originally written by Jason Koppe <jkoppe@indeed.com>.
-#
-
-# source function library
-. /etc/rc.d/init.d/functions
-
-set -a
-
-PREFIX=/usr
-
-SUPERVISORD=$PREFIX/bin/supervisord
-SUPERVISORCTL=$PREFIX/bin/supervisorctl
-
-PIDFILE=/var/run/supervisord.pid
-LOCKFILE=/var/lock/subsys/supervisord
-
-OPTIONS="-c /etc/supervisord.conf"
-
-# unset this variable if you don't care to wait for child processes to shutdown before removing the $LOCKFILE-lock
-WAIT_FOR_SUBPROCESSES=yes
-
-# remove this if you manage number of open files in some other fashion
-ulimit -n 96000
-
-RETVAL=0
-
-
-running_pid() {
-  # Check if a given process pid's cmdline matches a given name
-  pid=$1
-  name=$2
-  [ -z "$pid" ] && return 1
-  [ ! -d /proc/$pid ] && return 1
-  (cat /proc/$pid/cmdline | tr "\000" "\n"|grep -q $name) || return 1
-  return 0
-}
-
-running() {
-# Check if the process is running looking at /proc
-# (works for all users)
-
-  # No pidfile, probably no daemon present
-  [ ! -f "$PIDFILE" ] && return 1
-  # Obtain the pid and check it against the binary name
-  pid=`cat $PIDFILE`
-  running_pid $pid $SUPERVISORD || return 1
-  return 0
-}
-
-start() {
-  echo "Starting supervisord: "
-
-  if [ -e $PIDFILE ]; then
-    echo "ALREADY STARTED"
-    return 1
-  fi
-
-  # start supervisord with options from sysconfig (stuff like -c)
-  $SUPERVISORD $OPTIONS
-
-  # show initial startup status
-  $SUPERVISORCTL $OPTIONS status
-
-  # only create the subsyslock if we created the PIDFILE
-  [ -e $PIDFILE ] && touch $LOCKFILE
-}
-
-stop() {
-  echo -n "Stopping supervisord: "
-  $SUPERVISORCTL $OPTIONS shutdown
-  if [ -n "$WAIT_FOR_SUBPROCESSES" ]; then
-    echo "Waiting roughly 60 seconds for $PIDFILE to be removed after child processes exit"
-    for sleep in  2 2 2 2 4 4 4 4 8 8 8 8 last; do
-      if [ ! -e $PIDFILE ] ; then
-        echo "Supervisord exited as expected in under $total_sleep seconds"
-        break
-      else
-        if [[ $sleep -eq "last" ]] ; then
-          echo "Supervisord still working on shutting down. We've waited roughly 60 seconds, we'll let it do its thing from here"
-          return 1
-        else
-          sleep $sleep
-          total_sleep=$(( $total_sleep + $sleep ))
-        fi
-      fi
-    done
-  fi
-
-  # always remove the subsys. We might have waited a while, but just remove it at this point.
-  rm -f $LOCKFILE
-}
-
-restart() {
-  stop
-  start
-}
-
-case "$1" in
-  start)
-    start
-    RETVAL=$?
-    ;;
-  stop)
-    stop
-    RETVAL=$?
-    ;;
-  restart|force-reload)
-    restart
-    RETVAL=$?
-    ;;
-  reload)
-    $SUPERVISORCTL $OPTIONS reload
-    RETVAL=$?
-    ;;
-  condrestart)
-    [ -f $LOCKFILE ] && restart
-    RETVAL=$?
-    ;;
-  status)
-    $SUPERVISORCTL $OPTIONS status
-    if running ; then
-      RETVAL=0
-    else
-      RETVAL=1
-    fi
-    ;;
-  *)
-    echo $"Usage: $0 {start|stop|status|restart|reload|force-reload|condrestart}"
-    exit 1
-esac
-
-exit $RETVAL

+ 54 - 97
install.sh

@@ -36,8 +36,8 @@ xcachepwd=`< /dev/urandom tr -dc A-Za-z0-9 | head -c8`
 dbinstallmethod=1
 
 version() {
-  echo "version: 2.3"
-  echo "updated date: 2020-07-05"
+  echo "version: 2.4"
+  echo "updated date: 2021-04-01"
 }
 
 Show_Help() {
@@ -46,7 +46,7 @@ Show_Help() {
   --help, -h                  Show this help message, More: https://oneinstack.com/auto
   --version, -v               Show version info
   --nginx_option [1-3]        Install Nginx server version
-  --apache_option [1-2]       Install Apache server version
+  --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-10]         Install PHP version
@@ -58,14 +58,13 @@ Show_Help() {
                               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
+  --db_option [1-14]          Install DB version
   --dbinstallmethod [1-2]     DB install method, default: 1 binary install
   --dbrootpwd [password]      DB super password
   --pureftpd                  Install Pure-Ftpd
   --redis                     Install Redis
   --memcached                 Install Memcached
   --phpmyadmin                Install phpMyAdmin
-  --hhvm                      Install HHVM
   --python                    Install Python (PATH: ${python_install_dir})
   --ssh_port [No.]            SSH port
   --iptables                  Enable iptables
@@ -73,7 +72,7 @@ Show_Help() {
   "
 }
 ARG_NUM=$#
-TEMP=`getopt -o hvV --long help,version,nginx_option:,apache_option:,apache_mode_option:,apache_mpm_option:,php_option:,mphp_ver:,mphp_addons,phpcache_option:,php_extensions:,tomcat_option:,jdk_option:,db_option:,dbrootpwd:,dbinstallmethod:,pureftpd,redis,memcached,phpmyadmin,hhvm,python,ssh_port:,iptables,reboot -- "$@" 2>/dev/null`
+TEMP=`getopt -o hvV --long help,version,nginx_option:,apache,apache_mode_option:,apache_mpm_option:,php_option:,mphp_ver:,mphp_addons,phpcache_option:,php_extensions:,tomcat_option:,jdk_option:,db_option:,dbrootpwd:,dbinstallmethod:,pureftpd,redis,memcached,phpmyadmin,python,ssh_port:,iptables,reboot -- "$@" 2>/dev/null`
 [ $? != 0 ] && echo "${CWARNING}ERROR: unknown argument! ${CEND}" && Show_Help && exit 1
 eval set -- "${TEMP}"
 while :; do
@@ -92,10 +91,9 @@ while :; do
       [ -e "${tengine_install_dir}/sbin/nginx" ] && { echo "${CWARNING}Tengine already installed! ${CEND}"; unset nginx_option; }
       [ -e "${openresty_install_dir}/nginx/sbin/nginx" ] && { echo "${CWARNING}OpenResty already installed! ${CEND}"; unset nginx_option; }
       ;;
-    --apache_option)
-      apache_option=$2; shift 2
-      [[ ! ${apache_option} =~ ^[1-2]$ ]] && { echo "${CWARNING}apache_option input error! Please only input number 1~2${CEND}"; exit 1; }
-      [ -e "${apache_install_dir}/bin/httpd" ] && { echo "${CWARNING}Aapche already installed! ${CEND}"; unset apache_option; }
+    --apache)
+      apache_flag=y; shift 1
+      [ -e "${apache_install_dir}/bin/httpd" ] && { echo "${CWARNING}Aapche already installed! ${CEND}"; unset apache_flag; }
       ;;
     --apache_mode_option)
       apache_mode_option=$2; shift 2
@@ -152,14 +150,14 @@ while :; do
       ;;
     --db_option)
       db_option=$2; shift 2
-      if [[ "${db_option}" =~ ^[1-9]$|^1[0-3]$ ]]; then
+      if [[ "${db_option}" =~ ^[1-9]$|^1[0-2]$ ]]; then
         [ -d "${db_install_dir}/support-files" ] && { echo "${CWARNING}MySQL already installed! ${CEND}"; unset db_option; }
-      elif [ "${db_option}" == '14' ]; then
+      elif [ "${db_option}" == '13' ]; then
         [ -e "${pgsql_install_dir}/bin/psql" ] && { echo "${CWARNING}PostgreSQL already installed! ${CEND}"; unset db_option; }
-      elif [ "${db_option}" == '15' ]; then
+      elif [ "${db_option}" == '14' ]; then
         [ -e "${mongo_install_dir}/bin/mongo" ] && { echo "${CWARNING}MongoDB already installed! ${CEND}"; unset db_option; }
       else
-        echo "${CWARNING}db_option input error! Please only input number 1~15${CEND}"
+        echo "${CWARNING}db_option input error! Please only input number 1~14${CEND}"
         exit 1
       fi
       ;;
@@ -188,10 +186,6 @@ while :; do
       phpmyadmin_flag=y; shift 1
       [ -d "${wwwroot_dir}/default/phpMyAdmin" ] && { echo "${CWARNING}phpMyAdmin already installed! ${CEND}"; unset phpmyadmin_flag; }
       ;;
-    --hhvm)
-      hhvm_flag=y; shift 1
-      [ -e "/usr/bin/hhvm" ] && { echo "${CWARNING}HHVM already installed! ${CEND}"; unset hhvm_flag; }
-      ;;
     --python)
       python_flag=y; shift 1
       ;;
@@ -272,25 +266,21 @@ if [ ${ARG_NUM} == 0 ]; then
             break
           fi
         done
+
         # Apache
         while :; do echo
-          echo 'Please select Apache server:'
-          echo -e "\t${CMSG}1${CEND}. Install Apache-2.4"
-          echo -e "\t${CMSG}2${CEND}. Install Apache-2.2"
-          echo -e "\t${CMSG}3${CEND}. Do not install"
-          read -e -p "Please input a number:(Default 3 press Enter) " apache_option
-          apache_option=${apache_option:-3}
-          if [[ ! ${apache_option} =~ ^[1-3]$ ]]; then
-            echo "${CWARNING}input error! Please only input number 1~3${CEND}"
+          read -e -p "Do you want to install Apache? [y/n]: " apache_flag
+          if [[ ! ${apache_flag} =~ ^[y,n]$ ]]; then
+            echo "${CWARNING}input error! Please only input 'y' or 'n'${CEND}"
           else
-            [ "${apache_option}" != '3' -a -e "${apache_install_dir}/bin/httpd" ] && { echo "${CWARNING}Aapche already installed! ${CEND}"; unset apache_option; }
+            [ "${apache_flag}" == 'y' -a -e "${apache_install_dir}/bin/httpd" ] && { echo "${CWARNING}Aapche already installed! ${CEND}"; unset apache_flag; }
             break
           fi
         done
         # Apache2.4 mode and Apache2.4 MPM
-        if [ "${apache_option}" == '1' ]; then
+        if [ "${apache_flag}" == 'y' -o -e "${apache_install_dir}/bin/httpd" ]; then
           while :; do echo
-            echo 'Please select Apache2.4 mode:'
+            echo 'Please select Apache mode:'
             echo -e "\t${CMSG}1${CEND}. php-fpm"
             echo -e "\t${CMSG}2${CEND}. mod_php"
             read -e -p "Please input a number:(Default 1 press Enter) " apache_mode_option
@@ -302,7 +292,7 @@ if [ ${ARG_NUM} == 0 ]; then
             fi
           done
           while :; do echo
-            echo 'Please select Apache2.4 MPM:'
+            echo 'Please select Apache MPM:'
             echo -e "\t${CMSG}1${CEND}. event"
             echo -e "\t${CMSG}2${CEND}. prefork"
             echo -e "\t${CMSG}3${CEND}. worker"
@@ -413,25 +403,24 @@ if [ ${ARG_NUM} == 0 ]; then
           echo -e "\t${CMSG}10${CEND}. Install Percona-5.7"
           echo -e "\t${CMSG}11${CEND}. Install Percona-5.6"
           echo -e "\t${CMSG}12${CEND}. Install Percona-5.5"
-          echo -e "\t${CMSG}13${CEND}. Install AliSQL-5.6"
-          echo -e "\t${CMSG}14${CEND}. Install PostgreSQL"
-          echo -e "\t${CMSG}15${CEND}. Install MongoDB"
+          echo -e "\t${CMSG}13${CEND}. Install PostgreSQL"
+          echo -e "\t${CMSG}14${CEND}. Install MongoDB"
           read -e -p "Please input a number:(Default 2 press Enter) " db_option
           db_option=${db_option:-2}
-          [[ "${db_option}" =~ ^9$|^15$ ]] && [ "${OS_BIT}" == '32' ] && { echo "${CWARNING}By not supporting 32-bit! ${CEND}"; continue; }
-          if [[ "${db_option}" =~ ^[1-9]$|^1[0-5]$ ]]; then
-            if [ "${db_option}" == '14' ]; then
+          [[ "${db_option}" =~ ^9$|^14$ ]] && [ "${OS_BIT}" == '32' ] && { echo "${CWARNING}By not supporting 32-bit! ${CEND}"; continue; }
+          if [[ "${db_option}" =~ ^[1-9]$|^1[0-4]$ ]]; then
+            if [ "${db_option}" == '13' ]; then
               [ -e "${pgsql_install_dir}/bin/psql" ] && { echo "${CWARNING}PostgreSQL already installed! ${CEND}"; unset db_option; break; }
-            elif [ "${db_option}" == '15' ]; then
+            elif [ "${db_option}" == '14' ]; then
               [ -e "${mongo_install_dir}/bin/mongo" ] && { echo "${CWARNING}MongoDB already installed! ${CEND}"; unset db_option; break; }
             else
               [ -d "${db_install_dir}/support-files" ] && { echo "${CWARNING}MySQL already installed! ${CEND}"; unset db_option; break; }
             fi
             while :; do
-              if [ "${db_option}" == '14' ]; then
+              if [ "${db_option}" == '13' ]; then
                 read -e -p "Please input the postgres password of PostgreSQL(default: ${dbpostgrespwd}): " dbpwd
                 dbpwd=${dbpwd:-${dbpostgrespwd}}
-              elif [ "${db_option}" == '15' ]; then
+              elif [ "${db_option}" == '14' ]; then
                 read -e -p "Please input the root password of MongoDB(default: ${dbmongopwd}): " dbpwd
                 dbpwd=${dbpwd:-${dbmongopwd}}
               else
@@ -440,9 +429,9 @@ if [ ${ARG_NUM} == 0 ]; then
               fi
               [ -n "`echo ${dbpwd} | grep '[+|&]'`" ] && { echo "${CWARNING}input error,not contain a plus sign (+) and & ${CEND}"; continue; }
               if (( ${#dbpwd} >= 5 )); then
-                if [ "${db_option}" == '14' ]; then
+                if [ "${db_option}" == '13' ]; then
                   dbpostgrespwd=${dbpwd}
-                elif [ "${db_option}" == '15' ]; then
+                elif [ "${db_option}" == '14' ]; then
                   dbmongopwd=${dbpwd}
                 else
                   dbrootpwd=${dbpwd}
@@ -469,7 +458,7 @@ if [ ${ARG_NUM} == 0 ]; then
             fi
             break
           else
-            echo "${CWARNING}input error! Please only input number 1~15${CEND}"
+            echo "${CWARNING}input error! Please only input number 1~14${CEND}"
           fi
         done
       fi
@@ -712,30 +701,9 @@ if [ ${ARG_NUM} == 0 ]; then
       break
     fi
   done
-
-  while :; do echo
-    read -e -p "Do you want to install HHVM? [y/n]: " hhvm_flag
-    if [[ ! ${hhvm_flag} =~ ^[y,n]$ ]]; then
-      echo "${CWARNING}input error! Please only input 'y' or 'n'${CEND}"
-    else
-      if [ "${hhvm_flag}" == 'y' ]; then
-        [ -e "/usr/bin/hhvm" ] && { echo "${CWARNING}HHVM already installed! ${CEND}"; unset hhvm_flag; break; }
-        if [ "${PM}" == 'yum' -a "${OS_BIT}" == '64' ] && [ -n "`grep -E ' 7\.| 6\.[5-9]' /etc/redhat-release`" ]; then
-          break
-        else
-          echo
-          echo "${CWARNING}HHVM only support CentOS6.5+ 64bit, CentOS7 64bit! ${CEND}"
-          echo "Press Ctrl+c to cancel or Press any key to continue..."
-          char=`get_char`
-          unset hhvm_flag
-        fi
-      fi
-      break
-    fi
-  done
 fi
 
-if [[ ${nginx_option} =~ ^[1-3]$ ]] || [[ ${apache_option} =~ ^[1-2]$ ]] || [[ ${tomcat_option} =~ ^[1-4]$ ]]; then
+if [[ ${nginx_option} =~ ^[1-3]$ ]] || [ "${apache_flag}" == 'y' ] || [[ ${tomcat_option} =~ ^[1-4]$ ]]; then
   [ ! -d ${wwwroot_dir}/default ] && mkdir -p ${wwwroot_dir}/default
   [ ! -d ${wwwlogs_dir} ] && mkdir -p ${wwwlogs_dir}
 fi
@@ -791,13 +759,13 @@ fi
 startTime=`date +%s`
 
 # Jemalloc
-if [[ ${nginx_option} =~ ^[1-3]$ ]] || [[ "${db_option}" =~ ^[1-9]$|^1[0-3]$ ]]; then
+if [[ ${nginx_option} =~ ^[1-3]$ ]] || [[ "${db_option}" =~ ^[1-9]$|^1[0-2]$ ]]; then
   . include/jemalloc.sh
   Install_Jemalloc | tee -a ${oneinstack_dir}/install.log
 fi
 
 # openSSL
-if [[ ${tomcat_option} =~ ^[1-4]$ ]] || [[ ${apache_option} =~ ^[1-2]$ ]] || [[ ${php_option} =~ ^[1-9]$|^10$ ]] || [[ "${mphp_ver}" =~ ^5[3-6]$|^7[0-4]$|^80$ ]]; then
+if [[ ${tomcat_option} =~ ^[1-4]$ ]] || [ "${apache_flag}" == 'y' ] || [[ ${php_option} =~ ^[1-9]$|^10$ ]] || [[ "${mphp_ver}" =~ ^5[3-6]$|^7[0-4]$|^80$ ]]; then
   . include/openssl.sh
   Install_openSSL | tee -a ${oneinstack_dir}/install.log
 fi
@@ -856,14 +824,10 @@ case "${db_option}" in
     Install_Percona55 2>&1 | tee -a ${oneinstack_dir}/install.log
     ;;
   13)
-    . include/alisql-5.6.sh
-    Install_AliSQL56 2>&1 | tee -a ${oneinstack_dir}/install.log
-    ;;
-  14)
     . include/postgresql.sh
     Install_PostgreSQL 2>&1 | tee -a ${oneinstack_dir}/install.log
     ;;
-  15)
+  14)
     . include/mongodb.sh
     Install_MongoDB 2>&1 | tee -a ${oneinstack_dir}/install.log
     ;;
@@ -886,12 +850,11 @@ case "${nginx_option}" in
 esac
 
 # Apache
-if [ "${apache_option}" == '1' ]; then
-  . include/apache-2.4.sh
-  Install_Apache24 2>&1 | tee -a ${oneinstack_dir}/install.log
-elif [ "${apache_option}" == '2' ]; then
-  . include/apache-2.2.sh
-  Install_Apache22 2>&1 | tee -a ${oneinstack_dir}/install.log
+if [ "${apache_flag}" == 'y' ]; then
+  apache_mode_option=${apache_mode_option:-1}
+  apache_mpm_option=${apache_mpm_option:-1}
+  . include/apache.sh
+  Install_Apache 2>&1 | tee -a ${oneinstack_dir}/install.log
 fi
 
 # PHP
@@ -1157,12 +1120,6 @@ fi
 # get web_install_dir and db_install_dir
 . include/check_dir.sh
 
-# HHVM
-if [ "${hhvm_flag}" == 'y' ] && [ "${PM}" == 'yum' -a "${OS_BIT}" == '64' ] && [ -n "`grep -E ' 7\.| 6\.[5-9]' /etc/redhat-release`" ]; then
-  . include/hhvm_CentOS.sh
-  Install_hhvm_CentOS 2>&1 | tee -a ${oneinstack_dir}/install.log
-fi
-
 # Python
 if [ "${python_flag}" == 'y' ]; then
   . include/python.sh
@@ -1183,20 +1140,20 @@ endTime=`date +%s`
 echo "####################Congratulations########################"
 echo "Total OneinStack Install Time: ${CQUESTION}${installTime}${CEND} minutes"
 [[ "${nginx_option}" =~ ^[1-3]$ ]] && echo -e "\n$(printf "%-32s" "Nginx install dir":)${CMSG}${web_install_dir}${CEND}"
-[[ "${apache_option}" =~ ^[1-2]$ ]] && echo -e "\n$(printf "%-32s" "Apache install dir":)${CMSG}${apache_install_dir}${CEND}"
+[ "${apache_flag}" == 'y' ] && echo -e "\n$(printf "%-32s" "Apache install dir":)${CMSG}${apache_install_dir}${CEND}"
 [[ "${tomcat_option}" =~ ^[1-4]$ ]] && echo -e "\n$(printf "%-32s" "Tomcat install dir":)${CMSG}${tomcat_install_dir}${CEND}"
-[[ "${db_option}" =~ ^[1-9]$|^1[0-3]$ ]] && echo -e "\n$(printf "%-32s" "Database install dir:")${CMSG}${db_install_dir}${CEND}"
-[[ "${db_option}" =~ ^[1-9]$|^1[0-3]$ ]] && echo "$(printf "%-32s" "Database data dir:")${CMSG}${db_data_dir}${CEND}"
-[[ "${db_option}" =~ ^[1-9]$|^1[0-3]$ ]] && echo "$(printf "%-32s" "Database user:")${CMSG}root${CEND}"
-[[ "${db_option}" =~ ^[1-9]$|^1[0-3]$ ]] && echo "$(printf "%-32s" "Database password:")${CMSG}${dbrootpwd}${CEND}"
-[ "${db_option}" == '14' ] && echo -e "\n$(printf "%-32s" "PostgreSQL install dir:")${CMSG}${pgsql_install_dir}${CEND}"
-[ "${db_option}" == '14' ] && echo "$(printf "%-32s" "PostgreSQL data dir:")${CMSG}${pgsql_data_dir}${CEND}"
-[ "${db_option}" == '14' ] && echo "$(printf "%-32s" "PostgreSQL user:")${CMSG}postgres${CEND}"
-[ "${db_option}" == '14' ] && echo "$(printf "%-32s" "postgres password:")${CMSG}${dbpostgrespwd}${CEND}"
-[ "${db_option}" == '15' ] && echo -e "\n$(printf "%-32s" "MongoDB install dir:")${CMSG}${mongo_install_dir}${CEND}"
-[ "${db_option}" == '15' ] && echo "$(printf "%-32s" "MongoDB data dir:")${CMSG}${mongo_data_dir}${CEND}"
-[ "${db_option}" == '15' ] && echo "$(printf "%-32s" "MongoDB user:")${CMSG}root${CEND}"
-[ "${db_option}" == '15' ] && echo "$(printf "%-32s" "MongoDB password:")${CMSG}${dbmongopwd}${CEND}"
+[[ "${db_option}" =~ ^[1-9]$|^1[0-2]$ ]] && echo -e "\n$(printf "%-32s" "Database install dir:")${CMSG}${db_install_dir}${CEND}"
+[[ "${db_option}" =~ ^[1-9]$|^1[0-2]$ ]] && echo "$(printf "%-32s" "Database data dir:")${CMSG}${db_data_dir}${CEND}"
+[[ "${db_option}" =~ ^[1-9]$|^1[0-2]$ ]] && echo "$(printf "%-32s" "Database user:")${CMSG}root${CEND}"
+[[ "${db_option}" =~ ^[1-9]$|^1[0-2]$ ]] && echo "$(printf "%-32s" "Database password:")${CMSG}${dbrootpwd}${CEND}"
+[ "${db_option}" == '13' ] && echo -e "\n$(printf "%-32s" "PostgreSQL install dir:")${CMSG}${pgsql_install_dir}${CEND}"
+[ "${db_option}" == '13' ] && echo "$(printf "%-32s" "PostgreSQL data dir:")${CMSG}${pgsql_data_dir}${CEND}"
+[ "${db_option}" == '13' ] && echo "$(printf "%-32s" "PostgreSQL user:")${CMSG}postgres${CEND}"
+[ "${db_option}" == '13' ] && echo "$(printf "%-32s" "postgres password:")${CMSG}${dbpostgrespwd}${CEND}"
+[ "${db_option}" == '14' ] && echo -e "\n$(printf "%-32s" "MongoDB install dir:")${CMSG}${mongo_install_dir}${CEND}"
+[ "${db_option}" == '14' ] && echo "$(printf "%-32s" "MongoDB data dir:")${CMSG}${mongo_data_dir}${CEND}"
+[ "${db_option}" == '14' ] && echo "$(printf "%-32s" "MongoDB user:")${CMSG}root${CEND}"
+[ "${db_option}" == '14' ] && echo "$(printf "%-32s" "MongoDB password:")${CMSG}${dbmongopwd}${CEND}"
 [[ "${php_option}" =~ ^[1-9]$|^10$ ]] && echo -e "\n$(printf "%-32s" "PHP install dir:")${CMSG}${php_install_dir}${CEND}"
 [ "${phpcache_option}" == '1' ] && echo "$(printf "%-32s" "Opcache Control Panel URL:")${CMSG}http://${IPADDR}/ocp.php${CEND}"
 [ "${phpcache_option}" == '2' -a -e "${php_install_dir}/etc/php.d/04-xcache.ini" ] && echo "$(printf "%-32s" "xcache Control Panel URL:")${CMSG}http://${IPADDR}/xcache${CEND}"
@@ -1212,7 +1169,7 @@ echo "Total OneinStack Install Time: ${CQUESTION}${installTime}${CEND} minutes"
 [ "${phpmyadmin_flag}" == 'y' ] && echo "$(printf "%-32s" "phpMyAdmin Control Panel URL:")${CMSG}http://${IPADDR}/phpMyAdmin${CEND}"
 [ "${redis_flag}" == 'y' ] && echo -e "\n$(printf "%-32s" "redis install dir:")${CMSG}${redis_install_dir}${CEND}"
 [ "${memcached_flag}" == 'y' ] && echo -e "\n$(printf "%-32s" "memcached install dir:")${CMSG}${memcached_install_dir}${CEND}"
-if [[ ${nginx_option} =~ ^[1-3]$ ]] || [[ ${apache_option} =~ ^[1-2]$ ]] || [[ ${tomcat_option} =~ ^[1-4]$ ]]; then
+if [[ ${nginx_option} =~ ^[1-3]$ ]] || [ "${apache_flag}" == 'y' ] || [[ ${tomcat_option} =~ ^[1-4]$ ]]; then
   echo -e "\n$(printf "%-32s" "Index URL:")${CMSG}http://${IPADDR}/${CEND}"
 fi
 if [ ${ARG_NUM} == 0 ]; then

+ 1 - 3
options.conf

@@ -16,7 +16,6 @@ tomcat_install_dir=/usr/local/tomcat
 mysql_install_dir=/usr/local/mysql
 mariadb_install_dir=/usr/local/mariadb
 percona_install_dir=/usr/local/percona
-alisql_install_dir=/usr/local/alisql
 pgsql_install_dir=/usr/local/pgsql
 mongo_install_dir=/usr/local/mongodb
 
@@ -48,7 +47,6 @@ php_modules_options=''
 mysql_data_dir=/data/mysql
 mariadb_data_dir=/data/mariadb
 percona_data_dir=/data/percona
-alisql_data_dir=/data/alisql
 pgsql_data_dir=/data/pgsql
 mongo_data_dir=/data/mongodb
 
@@ -59,7 +57,7 @@ wwwroot_dir=/data/wwwroot
 wwwlogs_dir=/data/wwwlogs
 
 #########################################################################
-# [MySQL/MariaDB/Percona/AliSQL] automatically generated, You can't change
+# [MySQL/MariaDB/Percona] automatically generated, You can't change
 dbrootpwd=
 
 # [PostgreSQL] automatically generated, You can't change

+ 16 - 46
uninstall.sh

@@ -34,7 +34,7 @@ Show_Help() {
   --quiet, -q                   quiet operation
   --all                         Uninstall All
   --web                         Uninstall Nginx/Tengine/OpenResty/Apache/Tomcat
-  --mysql                       Uninstall MySQL/MariaDB/Percona/AliSQL
+  --mysql                       Uninstall MySQL/MariaDB/Percona
   --postgresql                  Uninstall PostgreSQL
   --mongodb                     Uninstall MongoDB
   --php                         Uninstall PHP (PATH: ${php_install_dir})
@@ -44,7 +44,6 @@ Show_Help() {
   --php_extensions [ext name]   Uninstall PHP extensions, include zendguardloader,ioncube,
                                 sourceguardian,imagick,gmagick,fileinfo,imap,ldap,calendar,phalcon,
                                 yaf,yar,redis,memcached,memcache,mongodb,swoole,xdebug
-  --hhvm                        Uninstall HHVM
   --pureftpd                    Uninstall PureFtpd
   --redis                       Uninstall Redis-server
   --memcached                   Uninstall Memcached-server
@@ -54,7 +53,7 @@ Show_Help() {
 }
 
 ARG_NUM=$#
-TEMP=`getopt -o hvVq --long help,version,quiet,all,web,mysql,postgresql,mongodb,php,mphp_ver:,allphp,phpcache,php_extensions:,hhvm,pureftpd,redis,memcached,phpmyadmin,python -- "$@" 2>/dev/null`
+TEMP=`getopt -o hvVq --long help,version,quiet,all,web,mysql,postgresql,mongodb,php,mphp_ver:,allphp,phpcache,php_extensions:,pureftpd,redis,memcached,phpmyadmin,python -- "$@" 2>/dev/null`
 [ $? != 0 ] && echo "${CWARNING}ERROR: unknown argument! ${CEND}" && Show_Help && exit 1
 eval set -- "${TEMP}"
 while :; do
@@ -75,7 +74,6 @@ while :; do
       postgresql_flag=y
       mongodb_flag=y
       allphp_flag=y
-      hhvm_flag=y
       pureftpd_flag=y
       redis_flag=y
       memcached_flag=y
@@ -129,9 +127,6 @@ while :; do
       [ -n "`echo ${php_extensions} | grep -w swoole`" ] && pecl_swoole=1
       [ -n "`echo ${php_extensions} | grep -w xdebug`" ] && pecl_xdebug=1
       ;;
-    --hhvm)
-      hhvm_flag=y; shift 1
-      ;;
     --pureftpd)
       pureftpd_flag=y; shift 1
       ;;
@@ -229,10 +224,10 @@ Print_MongoDB() {
 }
 
 Uninstall_MySQL() {
-  # uninstall mysql,mariadb,percona,alisql
+  # uninstall mysql,mariadb,percona
   if [ -d "${db_install_dir}/support-files" ]; then
     service mysqld stop > /dev/null 2>&1
-    rm -rf ${db_install_dir} /etc/init.d/mysqld /etc/my.cnf* /etc/ld.so.conf.d/*{mysql,mariadb,percona,alisql}*.conf
+    rm -rf ${db_install_dir} /etc/init.d/mysqld /etc/my.cnf* /etc/ld.so.conf.d/*{mysql,mariadb,percona}*.conf
     id -u mysql >/dev/null 2>&1 ; [ $? -eq 0 ] && userdel mysql
     [ -e "${db_data_dir}" ] && /bin/mv ${db_data_dir}{,$(date +%Y%m%d%H)}
     sed -i 's@^dbrootpwd=.*@dbrootpwd=@' ./options.conf
@@ -517,21 +512,6 @@ Menu_PHPext() {
   done
 }
 
-Print_HHVM() {
-  [ -e "/usr/bin/hhvm" ] && echo /usr/bin/hhvm
-  [ -e "/etc/hhvm" ] && echo /etc/hhvm
-  [ -e "/var/log/hhvm" ] && echo /var/log/hhvm
-  [ -e "/lib/systemd/system/hhvm.service" ] && echo /lib/systemd/system/hhvm.service
-  [ -e "/etc/supervisord.conf" ] && echo /etc/supervisord.conf
-  [ -e "/etc/init.d/supervisord" ] && echo /etc/init.d/supervisord
-}
-
-Uninstall_HHVM() {
-  [ -e "/lib/systemd/system/hhvm.service" ] && { systemctl disable hhvm > /dev/null 2>&1; rm -f /lib/systemd/system/hhvm.service; }
-  [ -e "/etc/init.d/supervisord" ] && { service supervisord stop > /dev/null 2>&1; rm -f /etc/supervisord.conf /etc/init.d/supervisord; }
-  [ -e "/usr/bin/hhvm" ] && { rpm -e hhvm; rm -rf /etc/hhvm /var/log/hhvm /usr/bin/hhvm; echo "${CMSG}HHVM uninstall completed! ${CEND}"; }
-}
-
 Print_PureFtpd() {
   [ -e "${pureftpd_install_dir}" ] && echo ${pureftpd_install_dir}
   [ -e "/etc/init.d/pureftpd" ] && echo /etc/init.d/pureftpd
@@ -590,24 +570,23 @@ while :; do
 What Are You Doing?
 \t${CMSG} 0${CEND}. Uninstall All
 \t${CMSG} 1${CEND}. Uninstall Nginx/Tengine/OpenResty/Apache/Tomcat
-\t${CMSG} 2${CEND}. Uninstall MySQL/MariaDB/Percona/AliSQL
+\t${CMSG} 2${CEND}. Uninstall MySQL/MariaDB/Percona
 \t${CMSG} 3${CEND}. Uninstall PostgreSQL
 \t${CMSG} 4${CEND}. Uninstall MongoDB
 \t${CMSG} 5${CEND}. Uninstall all PHP
 \t${CMSG} 6${CEND}. Uninstall PHP opcode cache
 \t${CMSG} 7${CEND}. Uninstall PHP extensions
-\t${CMSG} 8${CEND}. Uninstall HHVM
-\t${CMSG} 9${CEND}. Uninstall PureFtpd
-\t${CMSG}10${CEND}. Uninstall Redis
-\t${CMSG}11${CEND}. Uninstall Memcached
-\t${CMSG}12${CEND}. Uninstall phpMyAdmin
-\t${CMSG}13${CEND}. Uninstall Python (PATH: ${python_install_dir})
+\t${CMSG} 8${CEND}. Uninstall PureFtpd
+\t${CMSG} 9${CEND}. Uninstall Redis
+\t${CMSG}10${CEND}. Uninstall Memcached
+\t${CMSG}11${CEND}. Uninstall phpMyAdmin
+\t${CMSG}12${CEND}. Uninstall Python (PATH: ${python_install_dir})
 \t${CMSG} q${CEND}. Exit
 "
   echo
   read -e -p "Please input the correct option: " Number
-  if [[ ! "${Number}" =~ ^[0-9,q]$|^1[0-3]$ ]]; then
-    echo "${CWARNING}input error! Please only input 0~13 and q${CEND}"
+  if [[ ! "${Number}" =~ ^[0-9,q]$|^1[0-2]$ ]]; then
+    echo "${CWARNING}input error! Please only input 0~12 and q${CEND}"
   else
     case "$Number" in
     0)
@@ -617,7 +596,6 @@ What Are You Doing?
       Print_PostgreSQL
       Print_MongoDB
       Print_ALLPHP
-      Print_HHVM
       Print_PureFtpd
       Print_Redis_server
       Print_Memcached_server
@@ -631,7 +609,6 @@ What Are You Doing?
         Uninstall_PostgreSQL
         Uninstall_MongoDB
         Uninstall_ALLPHP
-        Uninstall_HHVM
         Uninstall_PureFtpd
         Uninstall_Redis_server
         Uninstall_Memcached_server
@@ -681,31 +658,26 @@ What Are You Doing?
       [ "${uninstall_flag}" == 'y' ] && Uninstall_PHPext || exit
       ;;
     8)
-      Print_HHVM
-      Uninstall_status
-      [ "${uninstall_flag}" == 'y' ] && Uninstall_HHVM || exit
-      ;;
-    9)
       Print_PureFtpd
       Uninstall_status
       [ "${uninstall_flag}" == 'y' ] && Uninstall_PureFtpd || exit
       ;;
-    10)
+    9)
       Print_Redis_server
       Uninstall_status
       [ "${uninstall_flag}" == 'y' ] && Uninstall_Redis_server || exit
       ;;
-    11)
+    10)
       Print_Memcached_server
       Uninstall_status
       [ "${uninstall_flag}" == 'y' ] && Uninstall_Memcached_server || exit
       ;;
-    12)
+    11)
       Print_phpMyAdmin
       Uninstall_status
       [ "${uninstall_flag}" == 'y' ] && Uninstall_phpMyAdmin || exit
       ;;
-    13)
+    12)
       Print_Python
       Uninstall_status
       [ "${uninstall_flag}" == 'y' ] && { . include/python.sh; Uninstall_Python; } || exit
@@ -731,7 +703,6 @@ else
     [ "${php_flag}" == 'y' ] && Print_PHP
     [ "${mphp_flag}" == 'y' ] && [ "${phpcache_flag}" != 'y' ] && [ -z "${php_extensions}" ] && Print_MPHP
   fi
-  [ "${hhvm_flag}" == 'y' ] && Print_HHVM
   [ "${pureftpd_flag}" == 'y' ] && Print_PureFtpd
   [ "${redis_flag}" == 'y' ] && Print_Redis_server
   [ "${memcached_flag}" == 'y' ] && Print_Memcached_server
@@ -754,7 +725,6 @@ else
       [ "${mphp_flag}" == 'y' ] && [ "${phpcache_flag}" == 'y' ] && { php_install_dir=${php_install_dir}${mphp_ver}; Uninstall_PHPcache; }
       [ "${mphp_flag}" == 'y' ] && [ -n "${php_extensions}" ] && { php_install_dir=${php_install_dir}${mphp_ver}; Uninstall_PHPext; }
     fi
-    [ "${hhvm_flag}" == 'y' ] && Uninstall_HHVM
     [ "${pureftpd_flag}" == 'y' ] && Uninstall_PureFtpd
     [ "${redis_flag}" == 'y' ] && Uninstall_Redis_server
     [ "${memcached_flag}" == 'y' ] && Uninstall_Memcached_server

+ 15 - 18
versions.txt

@@ -3,16 +3,15 @@
 nginx_ver=1.18.0
 tengine_ver=2.3.2
 openresty_ver=1.19.3.1
-openssl11_ver=1.1.1j
+openssl11_ver=1.1.1k
 openssl_ver=1.0.2u
 
-tomcat9_ver=9.0.41
-tomcat8_ver=8.5.61
-tomcat7_ver=7.0.107
+tomcat9_ver=9.0.44
+tomcat8_ver=8.5.64
+tomcat7_ver=7.0.108
 tomcat6_ver=6.0.53
 
-apache24_ver=2.4.46
-apache22_ver=2.2.34
+apache_ver=2.4.46
 pcre_ver=8.44
 apr_ver=1.7.0
 apr_util_ver=1.6.1
@@ -34,8 +33,6 @@ percona57_ver=5.7.33-36
 percona56_ver=5.6.51-91.0
 percona55_ver=5.5.62-38.14
 
-alisql_ver=5.6.32-9
-
 pgsql_ver=12.6
 
 mongodb_ver=4.0.16
@@ -68,22 +65,22 @@ icu4c_ver=63_1
 libsodium_ver=1.0.18
 libzip_ver=1.2.0
 argon2_ver=20171227
-imagemagick_ver=7.0.11-3
+imagemagick_ver=7.0.11-4
 imagick_ver=3.4.4
 graphicsmagick_ver=1.3.36
 gmagick_ver=2.0.5RC1
 gmagick_oldver=1.1.7RC3
 zendopcache_ver=7.0.5
 xcache_ver=3.2.0
-apcu_ver=5.1.18
+apcu_ver=5.1.20
 apcu_oldver=4.0.11
 eaccelerator_ver=0.9.6.1
 phalcon_ver=4.0.4
 phalcon_oldver=3.4.5
 yaf_ver=3.0.9
 yar_ver=2.0.7
-swoole_ver=4.5.2
-swoole_oldver=1.10.5
+swoole_ver=4.6.4
+swoole_oldver=4.5.2
 xdebug_ver=2.9.5
 xdebug_oldver=2.5.5
 
@@ -93,7 +90,7 @@ pureftpd_ver=1.0.49
 # Redis
 redis_ver=6.2.1
 redis_oldver=5.0.9
-pecl_redis_ver=5.3.3
+pecl_redis_ver=5.3.4
 pecl_redis_oldver=4.3.0
 
 # Memcached
@@ -109,7 +106,7 @@ pecl_mongodb_ver=1.9.0
 pecl_mongo_ver=1.6.16
 
 # phpMyadmin
-phpmyadmin_ver=5.0.4
+phpmyadmin_ver=5.1.0
 phpmyadmin_oldver=4.4.15.10
 
 # jemalloc
@@ -124,7 +121,7 @@ boost_oldver=1.59.0
 lua_nginx_module_ver=0.10.15
 htop_ver=3.0.2
 bison_ver=2.7.1
-python_ver=3.6.11
-setuptools_ver=50.3.0
-pip_ver=20.2.3
-fail2ban_ver=0.11.1
+python_ver=3.6.13
+setuptools_ver=54.2.0
+pip_ver=21.0.1
+fail2ban_ver=0.11.2

+ 9 - 75
vhost.sh

@@ -111,17 +111,16 @@ Choose_ENV() {
     [ "$(${apache_install_dir}/bin/apachectl -v | awk -F'.' /version/'{print $2}')" == '4' ] && { Apache_main_ver=24; Apache_grant='Require all granted'; }
     [ "$(${apache_install_dir}/bin/apachectl -v | awk -F'.' /version/'{print $2}')" == '2' ] && Apache_main_ver=22
   fi
-  if [ -e "${php_install_dir}/bin/phpize" -a -e "${tomcat_install_dir}/conf/server.xml" -a -e "/usr/bin/hhvm" ]; then
-    Number=111
+  if [ -e "${php_install_dir}/bin/phpize" -a -e "${tomcat_install_dir}/conf/server.xml" ]; then
+    Number=11
     while :; do echo
       echo "Please choose to use environment:"
       echo -e "\t${CMSG}1${CEND}. Use php"
       echo -e "\t${CMSG}2${CEND}. Use java"
-      echo -e "\t${CMSG}3${CEND}. Use hhvm"
       read -e -p "Please input a number:(Default 1 press Enter) " ENV_FLAG
       ENV_FLAG=${ENV_FLAG:-1}
-      if [[ ! ${ENV_FLAG} =~ ^[1-3]$ ]]; then
-        echo "${CWARNING}input error! Please only input number 1~3${CEND}"
+      if [[ ! ${ENV_FLAG} =~ ^[1-2]$ ]]; then
+        echo "${CWARNING}input error! Please only input number 1~2${CEND}"
       else
         break
       fi
@@ -133,69 +132,12 @@ Choose_ENV() {
       2)
         NGX_FLAG=java
         ;;
-      3)
-        NGX_FLAG=hhvm
-        ;;
     esac
-  elif [ -e "${php_install_dir}/bin/phpize" -a -e "${tomcat_install_dir}/conf/server.xml" -a ! -e "/usr/bin/hhvm" ]; then
-    Number=110
-    while :; do echo
-      echo "Please choose to use environment:"
-      echo -e "\t${CMSG}1${CEND}. Use php"
-      echo -e "\t${CMSG}2${CEND}. Use java"
-      read -e -p "Please input a number:(Default 1 press Enter) " ENV_FLAG
-      ENV_FLAG=${ENV_FLAG:-1}
-      if [[ ! ${ENV_FLAG} =~ ^[1-2]$ ]]; then
-        echo "${CWARNING}input error! Please only input number 1~2${CEND}"
-      else
-        break
-      fi
-    done
-    [ "${ENV_FLAG}" == '1' ] && NGX_FLAG=php
-    [ "${ENV_FLAG}" == '2' ] && NGX_FLAG=java
-  elif [ -e "${php_install_dir}/bin/phpize" -a ! -e "${tomcat_install_dir}/conf/server.xml" -a ! -e "/usr/bin/hhvm" ]; then
-    Number=100
+  elif [ -e "${php_install_dir}/bin/phpize" -a ! -e "${tomcat_install_dir}/conf/server.xml" ]; then
+    Number=10
     NGX_FLAG=php
-  elif [ -e "${php_install_dir}/bin/phpize" -a ! -e "${tomcat_install_dir}/conf/server.xml" -a -e "/usr/bin/hhvm" ]; then
-    Number=101
-    while :; do echo
-      echo "Please choose to use environment:"
-      echo -e "\t${CMSG}1${CEND}. Use php"
-      echo -e "\t${CMSG}2${CEND}. Use hhvm"
-      read -e -p "Please input a number:(Default 1 press Enter) " ENV_FLAG
-      ENV_FLAG=${ENV_FLAG:-1}
-      if [[ ! ${ENV_FLAG} =~ ^[1-2]$ ]]; then
-        echo "${CWARNING}input error! Please only input number 1~2${CEND}"
-      else
-        break
-      fi
-    done
-    [ "${ENV_FLAG}" == '1' ] && NGX_FLAG=php
-    [ "${ENV_FLAG}" == '2' ] && NGX_FLAG=hhvm
-  elif [ ! -e "${php_install_dir}/bin/phpize" -a -e "${tomcat_install_dir}/conf/server.xml" -a -e "/usr/bin/hhvm" ]; then
-    Number=011
-    while :; do echo
-      echo "Please choose to use environment:"
-      echo -e "\t${CMSG}1${CEND}. Use java"
-      echo -e "\t${CMSG}2${CEND}. Use hhvm"
-      read -e -p "Please input a number:(Default 1 press Enter) " ENV_FLAG
-      ENV_FLAG=${ENV_FLAG:-1}
-      if [[ ! ${ENV_FLAG} =~ ^[1-2]$ ]]; then
-        echo "${CWARNING}input error! Please only input number 1~2${CEND}"
-      else
-        break
-      fi
-    done
-    [ "${ENV_FLAG}" == '1' ] && NGX_FLAG=java
-    [ "${ENV_FLAG}" == '2' ] && NGX_FLAG=hhvm
-  elif [ ! -e "${php_install_dir}/bin/phpize" -a -e "${tomcat_install_dir}/conf/server.xml" -a ! -e "/usr/bin/hhvm" ]; then
-    Number=010
-    NGX_FLAG=java
-  elif [ ! -e "${php_install_dir}/bin/phpize" -a ! -e "${tomcat_install_dir}/conf/server.xml" -a -e "/usr/bin/hhvm" ]; then
-    Number=001
-    NGX_FLAG=hhvm
   else
-    Number=000
+    Number=00
     NGX_FLAG=php
   fi
 }
@@ -404,9 +346,6 @@ What Are You Doing?
     "java")
       NGX_CONF=$(echo -e "location ~ {\n    proxy_pass http://127.0.0.1:8080;\n    include proxy.conf;\n  }")
       ;;
-    "hhvm")
-      NGX_CONF=$(echo -e "location ~ .*\.(php|php5)?$ {\n    fastcgi_pass unix:/var/log/hhvm/sock;\n    fastcgi_index index.php;\n    fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n    include fastcgi_params;\n  }")
-      ;;
   esac
 
   if [ "${Domian_Mode}" == '3' -o "${dnsapi_flag}" == 'y' ] && [ ! -e ~/.acme.sh/acme.sh ]; then
@@ -717,7 +656,7 @@ EOF
   echo "$(printf "%-30s" "index url:")${CMSG}http://${domain}:8080/${CEND}"
 }
 
-Create_nginx_phpfpm_hhvm_conf() {
+Create_nginx_phpfpm_conf() {
   [ ! -d ${web_install_dir}/conf/vhost ] && mkdir ${web_install_dir}/conf/vhost
   cat > ${web_install_dir}/conf/vhost/${domain}.conf << EOF
 server {
@@ -754,7 +693,6 @@ EOF
     sed -i "s@^  set \$MAGE_ROOT.*;@  set \$MAGE_ROOT ${vhostdir};@" ${web_install_dir}/conf/vhost/${domain}.conf
     sed -i "s@^  server_name.*;@  server_name ${domain}${moredomainame};@" ${web_install_dir}/conf/vhost/${domain}.conf
     sed -i "s@^  server_name.*;@&\n  ${Nginx_log}@" ${web_install_dir}/conf/vhost/${domain}.conf
-    [ "${NGX_FLAG}" == 'hhvm' ] && sed -i 's@fastcgi_pass unix:.*;@fastcgi_pass unix:/var/log/hhvm/sock;@g' ${web_install_dir}/conf/vhost/${domain}.conf
     if [ "${anti_hotlinking_flag}" == 'y' ]; then
       sed -i "s@^  root.*;@&\n  }@" ${web_install_dir}/conf/vhost/${domain}.conf
       sed -i "s@^  root.*;@&\n    }@" ${web_install_dir}/conf/vhost/${domain}.conf
@@ -1106,7 +1044,7 @@ Add_Vhost() {
           Create_nginx_tomcat_conf
         else
           Nginx_log
-          Create_nginx_phpfpm_hhvm_conf
+          Create_nginx_phpfpm_conf
         fi
     fi
   elif [ ! -e "${web_install_dir}/sbin/nginx" -a -e "${apache_install_dir}/bin/httpd" ]; then
@@ -1126,10 +1064,6 @@ Add_Vhost() {
       Nginx_rewrite
       Nginx_log
       Create_nginx_tomcat_conf
-    elif [ "${NGX_FLAG}" == "hhvm" ]; then
-      Nginx_rewrite
-      Nginx_log
-      Create_nginx_phpfpm_hhvm_conf
     elif [ "${NGX_FLAG}" == "php" ]; then
       Nginx_log
       Apache_log