Ver Fonte

Del blank

lj2007331@gmail.com há 7 anos atrás
pai
commit
344e164ee7

+ 2 - 2
include/GraphicsMagick.sh

@@ -24,8 +24,8 @@ Install_php-gmagick() {
   if [ -e "${php_install_dir}/bin/phpize" ]; then
     phpExtensionDir=`${php_install_dir}/bin/php-config --extension-dir`
     if [ "`${php_install_dir}/bin/php -r 'echo PHP_VERSION;' | awk -F. '{print $1}'`" == '7' ]; then
-      tar xzf gmagick-${gmagick_for_php7_ver}.tgz 
-      pushd gmagick-${gmagick_for_php7_ver} 
+      tar xzf gmagick-${gmagick_for_php7_ver}.tgz
+      pushd gmagick-${gmagick_for_php7_ver}
     else
       tar xzf gmagick-${gmagick_ver}.tgz
       pushd gmagick-${gmagick_ver}

+ 2 - 2
include/ZendGuardLoader.sh

@@ -40,7 +40,7 @@ Install_ZendGuardLoader() {
         echo "Error! Your PHP ${PHP_detail_ver} does not support ZendGuardLoader!"
         ;;
     esac
-  
+
     if [ -f "${phpExtensionDir}/ZendGuardLoader.so" ]; then
       cat > ${php_install_dir}/etc/php.d/01-ZendGuardLoader.ini<< EOF
 [Zend Guard Loader]
@@ -52,7 +52,7 @@ EOF
       echo "${CSUCCESS}PHP ZendGuardLoader module installed successfully! ${CEND}"
     fi
   else
-    echo "Error! Your Apache's prefork or PHP already enable thread safety! " 
+    echo "Error! Your Apache's prefork or PHP already enable thread safety! "
   fi
   popd
 }

+ 1 - 1
include/alisql-5.6.sh

@@ -47,7 +47,7 @@ Install_AliSQL56() {
     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 
+  [ -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

+ 3 - 3
include/apache-2.2.sh

@@ -39,7 +39,7 @@ Install_Apache22() {
   chmod +x /etc/init.d/httpd
   [ "$OS" == 'CentOS' ] && { chkconfig --add httpd; chkconfig httpd on; }
   [[ $OS =~ ^Ubuntu$|^Debian$ ]] && update-rc.d httpd defaults
-  
+
   sed -i "s@^User daemon@User ${run_user}@" ${apache_install_dir}/conf/httpd.conf
   sed -i "s@^Group daemon@Group ${run_user}@" ${apache_install_dir}/conf/httpd.conf
   if [ "${nginx_option}" == '4' -a ! -e "${web_install_dir}/sbin/nginx" ]; then
@@ -56,7 +56,7 @@ Install_Apache22() {
   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 {
@@ -127,5 +127,5 @@ EOF
   fi
   ldconfig
   service httpd start
-  popd 
+  popd
 }

+ 5 - 5
include/apache-2.4.sh

@@ -42,7 +42,7 @@ Install_Apache24() {
   unset LDFLAGS
   if [ -e "${apache_install_dir}/conf/httpd.conf" ]; then
     echo "${CSUCCESS}Apache installed successfully! ${CEND}"
-    popd 
+    popd
     rm -rf httpd-${apache24_ver}
   else
     rm -rf ${apache_install_dir}
@@ -53,7 +53,7 @@ Install_Apache24() {
   [ -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
-  
+
   sed -i "s@^export LD_LIBRARY_PATH.*@export LD_LIBRARY_PATH=${openssl_install_dir}/lib:\$LD_LIBRARY_PATH@" ${apache_install_dir}/bin/envvars
   /bin/cp ${apache_install_dir}/bin/apachectl /etc/init.d/httpd
   sed -i '2a # chkconfig: - 85 15' /etc/init.d/httpd
@@ -61,7 +61,7 @@ Install_Apache24() {
   chmod +x /etc/init.d/httpd
   [ "$OS" == 'CentOS' ] && { chkconfig --add httpd; chkconfig httpd on; }
   [[ $OS =~ ^Ubuntu$|^Debian$ ]] && update-rc.d httpd defaults
-  
+
   sed -i "s@^User daemon@User ${run_user}@" ${apache_install_dir}/conf/httpd.conf
   sed -i "s@^Group daemon@Group ${run_user}@" ${apache_install_dir}/conf/httpd.conf
   if [ "${nginx_option}" == '4' -a ! -e "${web_install_dir}/sbin/nginx" ]; then
@@ -85,7 +85,7 @@ Install_Apache24() {
   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 {
@@ -107,7 +107,7 @@ EOF
 <VirtualHost *:$TMP_PORT>
   ServerAdmin admin@example.com
   DocumentRoot "${wwwroot_dir}/default"
-  ServerName 127.0.0.1 
+  ServerName 127.0.0.1
   ErrorLog "${wwwlogs_dir}/error_apache.log"
   CustomLog "${wwwlogs_dir}/access_apache.log" common
 <Directory "${wwwroot_dir}/default">

+ 3 - 3
include/init_CentOS.sh

@@ -77,14 +77,14 @@ net.ipv4.tcp_sack = 1
 net.ipv4.tcp_window_scaling = 1
 net.ipv4.tcp_rmem = 4096 87380 4194304
 net.ipv4.tcp_wmem = 4096 16384 4194304
-net.ipv4.tcp_max_syn_backlog = 16384 
+net.ipv4.tcp_max_syn_backlog = 16384
 net.core.netdev_max_backlog = 32768
 net.core.somaxconn = 32768
 net.core.wmem_default = 8388608
 net.core.rmem_default = 8388608
 net.core.rmem_max = 16777216
 net.core.wmem_max = 16777216
-net.ipv4.tcp_timestamps = 1 
+net.ipv4.tcp_timestamps = 1
 net.ipv4.tcp_fin_timeout = 20
 net.ipv4.tcp_synack_retries = 2
 net.ipv4.tcp_syn_retries = 2
@@ -126,7 +126,7 @@ if [ "${iptables_yn}" == 'y' ]; then
   else
     IPTABLES_STATUS=no
   fi
-  
+
   if [ "$IPTABLES_STATUS" == "no" ]; then
     [ -e "/etc/sysconfig/iptables" ] && /bin/mv /etc/sysconfig/iptables{,_bk}
     cat > /etc/sysconfig/iptables << EOF

+ 4 - 4
include/init_Debian.sh

@@ -68,13 +68,13 @@ net.ipv4.tcp_syncookies = 1
 net.ipv4.tcp_fin_timeout = 30
 net.ipv4.tcp_tw_reuse = 1
 net.ipv4.ip_local_port_range = 1024 65000
-net.ipv4.tcp_max_syn_backlog = 16384 
+net.ipv4.tcp_max_syn_backlog = 16384
 net.ipv4.tcp_max_tw_buckets = 6000
 net.ipv4.route.gc_timeout = 100
 net.ipv4.tcp_syn_retries = 1
 net.ipv4.tcp_synack_retries = 1
-net.core.somaxconn = 32768 
-net.core.netdev_max_backlog = 32768 
+net.core.somaxconn = 32768
+net.core.netdev_max_backlog = 32768
 net.ipv4.tcp_timestamps = 0
 net.ipv4.tcp_max_orphans = 32768
 EOF
@@ -95,7 +95,7 @@ if [ "${iptables_yn}" == 'y' ]; then
   else
     IPTABLES_STATUS=no
   fi
-  
+
   if [ "${IPTABLES_STATUS}" == "no" ]; then
     [ -e "/etc/iptables.up.rules" ] && /bin/mv /etc/iptables.up.rules{,_bk}
     cat > /etc/iptables.up.rules << EOF

+ 5 - 5
include/init_Ubuntu.sh

@@ -70,15 +70,15 @@ net.ipv4.tcp_syncookies = 1
 net.ipv4.tcp_fin_timeout = 30
 net.ipv4.tcp_tw_reuse = 1
 net.ipv4.ip_local_port_range = 1024 65000
-net.ipv4.tcp_max_syn_backlog = 16384 
+net.ipv4.tcp_max_syn_backlog = 16384
 net.ipv4.tcp_max_tw_buckets = 6000
 net.ipv4.route.gc_timeout = 100
 net.ipv4.tcp_syn_retries = 1
 net.ipv4.tcp_synack_retries = 1
-net.core.somaxconn = 32768 
-net.core.netdev_max_backlog = 32768 
+net.core.somaxconn = 32768
+net.core.netdev_max_backlog = 32768
 net.ipv4.tcp_timestamps = 0
-net.ipv4.tcp_max_orphans = 32768 
+net.ipv4.tcp_max_orphans = 32768
 EOF
 sysctl -p
 
@@ -103,7 +103,7 @@ if [ "${iptables_yn}" == 'y' ]; then
   else
     IPTABLES_STATUS=no
   fi
-  
+
   if [ "${IPTABLES_STATUS}" == "no" ]; then
     [ -e "/etc/iptables.up.rules" ] && /bin/mv /etc/iptables.up.rules{,_bk}
     cat > /etc/iptables.up.rules << EOF

+ 2 - 2
include/memcached.sh

@@ -86,8 +86,8 @@ Install_php-memcached() {
     rm -rf libmemcached-${libmemcached_ver}
 
     if [ "$(${php_install_dir}/bin/php -r 'echo PHP_VERSION;' | awk -F. '{print $1}')" == '7' ]; then
-      tar xzf memcached-${memcached_pecl_php7_ver}.tgz 
-      pushd memcached-${memcached_pecl_php7_ver} 
+      tar xzf memcached-${memcached_pecl_php7_ver}.tgz
+      pushd memcached-${memcached_pecl_php7_ver}
     else
       tar xzf memcached-${memcached_pecl_ver}.tgz
       pushd memcached-${memcached_pecl_ver}

+ 7 - 7
include/mongodb.sh

@@ -31,7 +31,7 @@ systemLog:
 
 # Where and how to store data.
 storage:
-  dbPath: ${mongo_data_dir} 
+  dbPath: ${mongo_data_dir}
   journal:
     enabled: true
 #  engine:
@@ -46,9 +46,9 @@ processManagement:
 # network interfaces
 net:
   port: 27017
-  bindIp: 0.0.0.0 
+  bindIp: 0.0.0.0
   unixDomainSocket:
-    enabled: false 
+    enabled: false
 
 #security:
 #  authorization: enabled
@@ -59,14 +59,14 @@ net:
 EOF
   service mongod start
   echo ${mongo_install_dir}/bin/mongo 127.0.0.1/admin --eval \"db.createUser\(\{user:\'root\',pwd:\'$dbmongopwd\',roles:[\'userAdminAnyDatabase\']\}\)\" | bash
-  sed -i 's@^#security:@security:@' /etc/mongod.conf 
-  sed -i 's@^#  authorization:@  authorization:@' /etc/mongod.conf 
+  sed -i 's@^#security:@security:@' /etc/mongod.conf
+  sed -i 's@^#  authorization:@  authorization:@' /etc/mongod.conf
   if [ -e "${mongo_install_dir}/bin/mongo" ]; then
     sed -i "s+^dbmongopwd.*+dbmongopwd='$dbmongopwd'+" ../options.conf
     echo "${CSUCCESS}MongoDB installed successfully! ${CEND}"
-    rm -rf mongodb-linux-${SYS_BIT_b}-${mongodb_ver} 
+    rm -rf mongodb-linux-${SYS_BIT_b}-${mongodb_ver}
   else
-    rm -rf ${mongo_install_dir} ${mongo_data_dir} mongodb-linux-${SYS_BIT_b}-${mongodb_ver} 
+    rm -rf ${mongo_install_dir} ${mongo_data_dir} mongodb-linux-${SYS_BIT_b}-${mongodb_ver}
     echo "${CFAILURE}MongoDB install failed, Please contact the author! ${CEND}"
     kill -9 $$
   fi

+ 8 - 8
include/nginx.sh

@@ -12,7 +12,7 @@ Install_Nginx() {
   pushd ${oneinstack_dir}/src > /dev/null
   id -u ${run_user} >/dev/null 2>&1
   [ $? -ne 0 ] && useradd -M -s /sbin/nologin ${run_user}
-  
+
   tar xzf pcre-$pcre_ver.tar.gz
   tar xzf nginx-$nginx_ver.tar.gz
   tar xzf openssl-$openssl_ver.tar.gz
@@ -21,15 +21,15 @@ Install_Nginx() {
   #sed -i 's@#define NGINX_VERSION.*$@#define NGINX_VERSION      "1.2"@' src/core/nginx.h
   #sed -i 's@#define NGINX_VER.*NGINX_VERSION$@#define NGINX_VER          "Linuxeye/" NGINX_VERSION@' src/core/nginx.h
   #sed -i 's@Server: nginx@Server: linuxeye@' src/http/ngx_http_header_filter_module.c
-  
+
   # close debug
   sed -i 's@CFLAGS="$CFLAGS -g"@#CFLAGS="$CFLAGS -g"@' auto/cc/gcc
-  
+
   [ ! -d "$nginx_install_dir" ] && mkdir -p $nginx_install_dir
-  ./configure --prefix=$nginx_install_dir --user=${run_user} --group=${run_user} --with-http_stub_status_module --with-http_v2_module --with-http_ssl_module --with-http_gzip_static_module --with-http_realip_module --with-http_flv_module --with-http_mp4_module --with-openssl=../openssl-$openssl_ver --with-pcre=../pcre-$pcre_ver --with-pcre-jit --with-ld-opt='-ljemalloc' $nginx_modules_options 
+  ./configure --prefix=$nginx_install_dir --user=${run_user} --group=${run_user} --with-http_stub_status_module --with-http_v2_module --with-http_ssl_module --with-http_gzip_static_module --with-http_realip_module --with-http_flv_module --with-http_mp4_module --with-openssl=../openssl-$openssl_ver --with-pcre=../pcre-$pcre_ver --with-pcre-jit --with-ld-opt='-ljemalloc' $nginx_modules_options
   make -j ${THREAD} && make install
   if [ -e "$nginx_install_dir/conf/nginx.conf" ]; then
-    popd 
+    popd
     rm -rf nginx-$nginx_ver
     echo "${CSUCCESS}Nginx installed successfully! ${CEND}"
   else
@@ -41,12 +41,12 @@ Install_Nginx() {
   [ -z "`grep ^'export PATH=' /etc/profile`" ] && echo "export PATH=$nginx_install_dir/sbin:\$PATH" >> /etc/profile
   [ -n "`grep ^'export PATH=' /etc/profile`" -a -z "`grep $nginx_install_dir /etc/profile`" ] && sed -i "s@^export PATH=\(.*\)@export PATH=$nginx_install_dir/sbin:\1@" /etc/profile
   . /etc/profile
-  
+
   [ "$OS" == 'CentOS' ] && { /bin/cp ../init.d/Nginx-init-CentOS /etc/init.d/nginx; chkconfig --add nginx; chkconfig nginx on; }
   [[ $OS =~ ^Ubuntu$|^Debian$ ]] && { /bin/cp ../init.d/Nginx-init-Ubuntu /etc/init.d/nginx; update-rc.d nginx defaults; }
 
   sed -i "s@/usr/local/nginx@$nginx_install_dir@g" /etc/init.d/nginx
-  
+
   mv $nginx_install_dir/conf/nginx.conf{,_bk}
   if [[ ${apache_option} =~ ^[1-2]$ ]]; then
     /bin/cp ../config/nginx_apache.conf $nginx_install_dir/conf/nginx.conf
@@ -76,7 +76,7 @@ EOF
   sed -i "s@/data/wwwroot/default@${wwwroot_dir}/default@" $nginx_install_dir/conf/nginx.conf
   sed -i "s@/data/wwwlogs@${wwwlogs_dir}@g" $nginx_install_dir/conf/nginx.conf
   sed -i "s@^user www www@user ${run_user} ${run_user}@" $nginx_install_dir/conf/nginx.conf
-  
+
   # logrotate nginx log
   cat > /etc/logrotate.d/nginx << EOF
 ${wwwlogs_dir}/*nginx.log {

+ 8 - 8
include/openresty.sh

@@ -12,18 +12,18 @@ Install_OpenResty() {
   pushd ${oneinstack_dir}/src > /dev/null
   id -u ${run_user} >/dev/null 2>&1
   [ $? -ne 0 ] && useradd -M -s /sbin/nologin ${run_user}
-  
+
   tar xzf pcre-$pcre_ver.tar.gz
   tar xzf openresty-$openresty_ver.tar.gz
   tar xzf openssl-$openssl_ver.tar.gz
   pushd openresty-$openresty_ver
-  
+
   # close debug
   openresty_ver_tmp=${openresty_ver%.*}
   sed -i 's@CFLAGS="$CFLAGS -g"@#CFLAGS="$CFLAGS -g"@' bundle/nginx-$openresty_ver_tmp/auto/cc/gcc # close debug
-  
+
   [ ! -d "$openresty_install_dir" ] && mkdir -p $openresty_install_dir
-  ./configure --prefix=$openresty_install_dir --user=${run_user} --group=${run_user} --with-http_stub_status_module --with-http_v2_module --with-http_ssl_module --with-http_gzip_static_module --with-http_realip_module --with-http_flv_module --with-http_mp4_module --with-openssl=../openssl-$openssl_ver --with-pcre=../pcre-$pcre_ver --with-pcre-jit --with-ld-opt='-ljemalloc' $nginx_modules_options 
+  ./configure --prefix=$openresty_install_dir --user=${run_user} --group=${run_user} --with-http_stub_status_module --with-http_v2_module --with-http_ssl_module --with-http_gzip_static_module --with-http_realip_module --with-http_flv_module --with-http_mp4_module --with-openssl=../openssl-$openssl_ver --with-pcre=../pcre-$pcre_ver --with-pcre-jit --with-ld-opt='-ljemalloc' $nginx_modules_options
   make -j ${THREAD} && make install
   if [ -e "$openresty_install_dir/nginx/conf/nginx.conf" ]; then
     popd
@@ -38,12 +38,12 @@ Install_OpenResty() {
   [ -z "`grep ^'export PATH=' /etc/profile`" ] && echo "export PATH=$openresty_install_dir/nginx/sbin:\$PATH" >> /etc/profile
   [ -n "`grep ^'export PATH=' /etc/profile`" -a -z "`grep $openresty_install_dir /etc/profile`" ] && sed -i "s@^export PATH=\(.*\)@export PATH=$openresty_install_dir/nginx/sbin:\1@" /etc/profile
   . /etc/profile
-  
+
   [ "$OS" == 'CentOS' ] && { /bin/cp ../init.d/Nginx-init-CentOS /etc/init.d/nginx; chkconfig --add nginx; chkconfig nginx on; }
   [[ $OS =~ ^Ubuntu$|^Debian$ ]] && { /bin/cp ../init.d/Nginx-init-Ubuntu /etc/init.d/nginx; update-rc.d nginx defaults; }
-  
+
   sed -i "s@/usr/local/nginx@$openresty_install_dir/nginx@g" /etc/init.d/nginx
-  
+
   mv $openresty_install_dir/nginx/conf/nginx.conf{,_bk}
   if [[ ${apache_option} =~ ^[1-2]$ ]]; then
     /bin/cp ../config/nginx_apache.conf $openresty_install_dir/nginx/conf/nginx.conf
@@ -73,7 +73,7 @@ EOF
   sed -i "s@/data/wwwroot/default@${wwwroot_dir}/default@" $openresty_install_dir/nginx/conf/nginx.conf
   sed -i "s@/data/wwwlogs@${wwwlogs_dir}@g" $openresty_install_dir/nginx/conf/nginx.conf
   sed -i "s@^user www www@user ${run_user} ${run_user}@" $openresty_install_dir/nginx/conf/nginx.conf
-  
+
   # logrotate nginx log
   cat > /etc/logrotate.d/nginx << EOF
 ${wwwlogs_dir}/*nginx.log {

+ 4 - 4
include/pecl_mongodb.sh

@@ -13,8 +13,8 @@ Install_pecl-mongodb() {
   if [ -e "${php_install_dir}/bin/phpize" ]; then
     phpExtensionDir=$(${php_install_dir}/bin/php-config --extension-dir)
     if [[ "$(${php_install_dir}/bin/php -r 'echo PHP_VERSION;' | awk -F. '{print $1$2}')" =~ ^5[3-4]$ ]]; then
-      tar xzf mongo-${mongo_pecl_ver}.tgz 
-      pushd mongo-${mongo_pecl_ver} 
+      tar xzf mongo-${mongo_pecl_ver}.tgz
+      pushd mongo-${mongo_pecl_ver}
       ${php_install_dir}/bin/phpize
       ./configure --with-php-config=${php_install_dir}/bin/php-config
       make -j ${THREAD} && make install
@@ -27,8 +27,8 @@ Install_pecl-mongodb() {
         echo "${CFAILURE}PHP mongo module install failed, Please contact the author! ${CEND}"
       fi
     else
-      tar xzf mongodb-${mongodb_pecl_ver}.tgz 
-      pushd mongodb-${mongodb_pecl_ver} 
+      tar xzf mongodb-${mongodb_pecl_ver}.tgz
+      pushd mongodb-${mongodb_pecl_ver}
       ${php_install_dir}/bin/phpize
       ./configure --with-php-config=${php_install_dir}/bin/php-config
       make -j ${THREAD} && make install

+ 1 - 1
include/pecl_pgsql.sh

@@ -28,7 +28,7 @@ Install_pecl-pgsql() {
     echo 'extension=pdo_pgsql.so' >> ${php_install_dir}/etc/php.d/07-pgsql.ini
     echo "${CSUCCESS}PHP pgsql module installed successfully! ${CEND}"
     popd
-    rm -rf php-${PHP_detail_ver} 
+    rm -rf php-${PHP_detail_ver}
   else
     echo "${CFAILURE}PHP pgsql module install failed, Please contact the author! ${CEND}"
   fi

+ 1 - 1
include/percona-5.5.sh

@@ -21,7 +21,7 @@ Install_Percona55() {
     tar xzf Percona-Server-${perconaVerStr1}-Linux.${SYS_BIT_b}.${sslLibVer}.tar.gz
     mv Percona-Server-${perconaVerStr1}-Linux.${SYS_BIT_b}.${sslLibVer}/* ${percona_install_dir}
     sed -i 's@executing mysqld_safe@executing mysqld_safe\nexport LD_PRELOAD=/usr/local/lib/libjemalloc.so@' ${percona_install_dir}/bin/mysqld_safe
-    sed -i "s@/usr/local/Percona-Server-${perconaVerStr1}-Linux.${SYS_BIT_b}.${sslLibVer}@${percona_install_dir}@g" ${percona_install_dir}/bin/mysqld_safe 
+    sed -i "s@/usr/local/Percona-Server-${perconaVerStr1}-Linux.${SYS_BIT_b}.${sslLibVer}@${percona_install_dir}@g" ${percona_install_dir}/bin/mysqld_safe
   elif [ "${dbinstallmethod}" == "2" ]; then
     tar xzf percona-server-${percona55_ver}.tar.gz
     pushd percona-server-${percona55_ver}

+ 1 - 1
include/percona-5.6.sh

@@ -21,7 +21,7 @@ Install_Percona56() {
     tar xzf Percona-Server-${perconaVerStr1}-Linux.${SYS_BIT_b}.${sslLibVer}.tar.gz
     mv Percona-Server-${perconaVerStr1}-Linux.${SYS_BIT_b}.${sslLibVer}/* ${percona_install_dir}
     sed -i 's@executing mysqld_safe@executing mysqld_safe\nexport LD_PRELOAD=/usr/local/lib/libjemalloc.so@' ${percona_install_dir}/bin/mysqld_safe
-    sed -i "s@/usr/local/Percona-Server-${perconaVerStr1}-Linux.${SYS_BIT_b}.${sslLibVer}@${percona_install_dir}@g" ${percona_install_dir}/bin/mysqld_safe 
+    sed -i "s@/usr/local/Percona-Server-${perconaVerStr1}-Linux.${SYS_BIT_b}.${sslLibVer}@${percona_install_dir}@g" ${percona_install_dir}/bin/mysqld_safe
   elif [ "${dbinstallmethod}" == "2" ]; then
     tar xzf percona-server-${percona56_ver}.tar.gz
     pushd percona-server-${percona56_ver}

+ 1 - 1
include/percona-5.7.sh

@@ -20,7 +20,7 @@ Install_Percona57() {
     tar xzf Percona-Server-${percona57_ver}-Linux.${SYS_BIT_b}.${sslLibVer}.tar.gz
     mv Percona-Server-${percona57_ver}-Linux.${SYS_BIT_b}.${sslLibVer}/* ${percona_install_dir}
     sed -i 's@executing mysqld_safe@executing mysqld_safe\nexport LD_PRELOAD=/usr/local/lib/libjemalloc.so@' ${percona_install_dir}/bin/mysqld_safe
-    sed -i "s@/usr/local/Percona-Server-${percona57_ver}-Linux.${SYS_BIT_b}.${sslLibVer}@${percona_install_dir}@g" ${percona_install_dir}/bin/mysqld_safe 
+    sed -i "s@/usr/local/Percona-Server-${percona57_ver}-Linux.${SYS_BIT_b}.${sslLibVer}@${percona_install_dir}@g" ${percona_install_dir}/bin/mysqld_safe
   elif [ "${dbinstallmethod}" == "2" ]; then
     tar xzf percona-server-${percona57_ver}.tar.gz
     pushd percona-server-${percona57_ver}

+ 1 - 1
include/postgresql.sh

@@ -11,7 +11,7 @@
 Install_PostgreSQL() {
   pushd ${oneinstack_dir}/src > /dev/null
   id -u postgres >/dev/null 2>&1
-  [ $? -ne 0 ] && useradd -d ${pgsql_install_dir} -s /bin/bash postgres 
+  [ $? -ne 0 ] && useradd -d ${pgsql_install_dir} -s /bin/bash postgres
   mkdir -p ${pgsql_data_dir};chown postgres.postgres -R ${pgsql_data_dir}
   tar xzf postgresql-${pgsql_ver}.tar.gz
   pushd postgresql-${pgsql_ver}

+ 8 - 8
include/tengine.sh

@@ -12,17 +12,17 @@ Install_Tengine() {
   pushd ${oneinstack_dir}/src > /dev/null
   id -u ${run_user} >/dev/null 2>&1
   [ $? -ne 0 ] && useradd -M -s /sbin/nologin ${run_user}
-  
+
   tar xzf pcre-$pcre_ver.tar.gz
   tar xzf tengine-$tengine_ver.tar.gz
   tar xzf openssl-$openssl_ver.tar.gz
   pushd tengine-$tengine_ver
   # Modify Tengine version
   #sed -i 's@TENGINE "/" TENGINE_VERSION@"Tengine/unknown"@' src/core/nginx.h
-  
+
   # close debug
   sed -i 's@CFLAGS="$CFLAGS -g"@#CFLAGS="$CFLAGS -g"@' auto/cc/gcc
-  
+
   [ ! -d "$tengine_install_dir" ] && mkdir -p $tengine_install_dir
   ./configure --prefix=$tengine_install_dir --user=${run_user} --group=${run_user} --with-http_v2_module --with-http_ssl_module --with-http_gzip_static_module --with-http_realip_module --with-http_flv_module --with-http_mp4_module --with-http_concat_module=shared --with-http_sysguard_module=shared --with-openssl=../openssl-$openssl_ver --with-pcre=../pcre-$pcre_ver --with-pcre-jit --with-jemalloc $nginx_modules_options
   make -j ${THREAD} && make install
@@ -39,12 +39,12 @@ Install_Tengine() {
   [ -z "`grep ^'export PATH=' /etc/profile`" ] && echo "export PATH=$tengine_install_dir/sbin:\$PATH" >> /etc/profile
   [ -n "`grep ^'export PATH=' /etc/profile`" -a -z "`grep $tengine_install_dir /etc/profile`" ] && sed -i "s@^export PATH=\(.*\)@export PATH=$tengine_install_dir/sbin:\1@" /etc/profile
   . /etc/profile
-  
+
   [ "$OS" == 'CentOS' ] && { /bin/cp ../init.d/Nginx-init-CentOS /etc/init.d/nginx; chkconfig --add nginx; chkconfig nginx on; }
   [[ $OS =~ ^Ubuntu$|^Debian$ ]] && { /bin/cp ../init.d/Nginx-init-Ubuntu /etc/init.d/nginx; update-rc.d nginx defaults; }
-  
+
   sed -i "s@/usr/local/nginx@$tengine_install_dir@g" /etc/init.d/nginx
-  
+
   mv $tengine_install_dir/conf/nginx.conf{,_bk}
   if [[ ${apache_option} =~ ^[1-2]$ ]]; then
     /bin/cp ../config/nginx_apache.conf $tengine_install_dir/conf/nginx.conf
@@ -75,10 +75,10 @@ EOF
   sed -i "s@/data/wwwlogs@${wwwlogs_dir}@g" $tengine_install_dir/conf/nginx.conf
   sed -i "s@^user www www@user ${run_user} ${run_user}@" $tengine_install_dir/conf/nginx.conf
   uname -r | awk -F'.' '{if ($1$2>=39)S=0;else S=1}{exit S}' && [ -z "`grep 'reuse_port on;' $tengine_install_dir/conf/nginx.conf`" ] && sed -i "s@worker_connections 51200;@worker_connections 51200;\n    reuse_port on;@" $tengine_install_dir/conf/nginx.conf
-  
+
   # worker_cpu_affinity
   sed -i "s@^worker_processes.*@worker_processes auto;\nworker_cpu_affinity auto;\ndso {\n\tload ngx_http_concat_module.so;\n\tload ngx_http_sysguard_module.so;\n}@" $tengine_install_dir/conf/nginx.conf
-  
+
   # logrotate nginx log
   cat > /etc/logrotate.d/nginx << EOF
 ${wwwlogs_dir}/*nginx.log {

+ 2 - 2
include/upgrade_db.sh

@@ -49,7 +49,7 @@ Upgrade_DB() {
   echo "${CSUCCESS}Starting $DB backup${CEND}......"
   ${db_install_dir}/bin/mysqldump -uroot -p${dbrootpwd} --opt --all-databases > DB_all_backup_$(date +"%Y%m%d").sql
   [ -f "DB_all_backup_$(date +"%Y%m%d").sql" ] && echo "$DB backup success, Backup file: ${MSG}`pwd`/DB_all_backup_$(date +"%Y%m%d").sql${CEND}"
-  
+
   #upgrade
   echo
   echo "Current $DB Version: ${CMSG}$OLD_db_ver${CEND}"
@@ -142,7 +142,7 @@ Upgrade_DB() {
       [ ! -d "${percona_install_dir}" ] && mkdir -p ${percona_install_dir}
       mkdir -p ${percona_data_dir};chown mysql.mysql -R ${percona_data_dir}
       make install
-      popd 
+      popd
       if [ "`echo $NEW_db_ver | awk -F. '{print $1"."$2}'`" == '5.7' ]; then
         ${percona_install_dir}/bin/mysqld --initialize-insecure --user=mysql --basedir=${percona_install_dir} --datadir=${percona_data_dir}
       else

+ 1 - 1
include/upgrade_oneinstack.sh

@@ -11,7 +11,7 @@
 Upgrade_OneinStack() {
   pushd ${oneinstack_dir} > /dev/null
   Latest_OneinStack_MD5=$(curl -s http://mirrors.linuxeye.com/md5sum.txt | grep oneinstack.tar.gz | awk '{print $1}')
-  [ ! -e install.sh ] && install_flag=n 
+  [ ! -e install.sh ] && install_flag=n
   if [ "$oneinstack_md5" != "$Latest_OneinStack_MD5" ]; then
     /bin/mv options.conf /tmp
     sed -i '/oneinstack_dir=/d' /tmp/options.conf

+ 1 - 1
include/upgrade_php.sh

@@ -43,7 +43,7 @@ Upgrade_PHP() {
     make clean
     ${php_install_dir}/bin/php -i |grep 'Configure Command' | awk -F'=>' '{print $2}' | bash
     make ZEND_EXTRA_LIBS='-liconv'
-    if [ -e "${apache_install_dir}/bin/apachectl" ]; then 
+    if [ -e "${apache_install_dir}/bin/apachectl" ]; then
       echo "Stoping apache..."
       service httpd stop
       make install

+ 1 - 1
versions.txt

@@ -3,7 +3,7 @@
 nginx_ver=1.12.2
 tengine_ver=2.2.2
 openresty_ver=1.13.6.1
-openssl_ver=1.0.2n
+openssl_ver=1.0.2o
 
 tomcat9_ver=9.0.6
 tomcat8_ver=8.5.29

+ 2 - 2
vhost.sh

@@ -191,13 +191,13 @@ If you enter '.', the field will be left blank.
         fi
       done
       ~/.acme.sh/acme.sh --issue --dns dns_${DNS_PRO} -d ${domain} -d ${moredomain}
-    else 
+    else
       if [ "${nginx_ssl_flag}" == 'y' ]; then
         [ ! -d ${web_install_dir}/conf/vhost ] && mkdir ${web_install_dir}/conf/vhost
         echo "server {  server_name ${domain}${moredomainame};  root ${vhostdir};  access_log off; }" > ${web_install_dir}/conf/vhost/${domain}.conf
         ${web_install_dir}/sbin/nginx -s reload
       fi
-      if [ "${apache_ssl_flag}" == 'y' ]; then 
+      if [ "${apache_ssl_flag}" == 'y' ]; then
         [ ! -d ${apache_install_dir}/conf/vhost ] && mkdir ${apache_install_dir}/conf/vhost
         cat > ${apache_install_dir}/conf/vhost/${domain}.conf << EOF
 <VirtualHost *:80>