lj2007331 8 rokov pred
rodič
commit
0bab0e755b

+ 1 - 1
README.md

@@ -15,7 +15,7 @@ Script properties:
 - According to their needs to install PHP Cache Accelerator provides ZendOPcache, xcache, apcu, eAccelerator. And php encryption and decryption tool ionCube, ZendGuardLoader
 - Installation Pureftpd, phpMyAdmin according to their needs
 - Install memcached, redis according to their needs
-- Tcmalloc can use according to their needs or jemalloc optimize MySQL, Nginx
+- Jemalloc optimize MySQL, Nginx
 - Providing add a virtual host script, include Let's Encrypt SSL certificate
 - Provide Nginx/Tengine, MySQL/MariaDB/Percona, PHP, Redis, phpMyAdmin upgrade script
 - Provide local backup and remote backup (rsync between servers) script

+ 1 - 1
config/index.html

@@ -22,7 +22,7 @@ font-family:"Microsoft YaHei",sans-serif;
 <div id="main">
 <br>
 <div align="center"><h2>Congratulations, OneinStack installed successfully!</h2></div>
-<h3><a href="https://oneinstack.com" target="_blank" class="links">OneinStack </a><a href="http://www.linuxeye.com/" target="_blank">Linux</a>+Nginx/Tengine+MySQL/MariaDB/Percona</br>+PHP+Pureftpd+phpMyAdmin+redis+memcached+jemalloc/tcmalloc.</h3>
+<h3><a href="https://oneinstack.com" target="_blank" class="links">OneinStack </a><a href="http://www.linuxeye.com/" target="_blank">Linux</a>+Nginx/Tengine+MySQL/MariaDB/Percona</br>+PHP+Pureftpd+phpMyAdmin+redis+memcached+jemalloc.</h3>
 <p><b>Check environment:&nbsp;&nbsp;</b><a href="/proberv.php" target="_blank" class="links">Proberv</a>&nbsp;<a href="/phpinfo.php" target="_blank" class="links">phpinfo</a>&nbsp;<a href="/ocp.php" target="_blank" class="links">Opcache</a>&nbsp;<a href="/phpMyAdmin/" target="_blank" class="links">phpMyAdmin</a></p>
 <p><b>Create Web virtual running script:</b>&nbsp;&nbsp;<font color="#008000">./vhost.sh</font></p>
 <p><b>Create FTP virtual running script:</b>&nbsp;&nbsp;<font color="#008000">./pureftpd_vhost.sh</font></p>

+ 1 - 1
config/index_cn.html

@@ -22,7 +22,7 @@ font-family:微软雅黑,sans-serif;
 <div id="main">
 <br>
 <div align="center"><h2>恭喜您,OneinStack 安装成功!</h2></div>
-<h3><a href="https://oneinstack.com" target="_blank" class="links">OneinStack </a> <a href="http://www.linuxeye.com/" target="_blank">Linux</a>+Nginx/Tengine+MySQL/MariaDB/Percona+PHP</br>+Pureftpd+phpMyAdmin+redis+memcached+jemalloc/tcmalloc 脚本中用到的软件包大多最新稳定版本,修复了一些安全性问题。</h3>
+<h3><a href="https://oneinstack.com" target="_blank" class="links">OneinStack </a> <a href="http://www.linuxeye.com/" target="_blank">Linux</a>+Nginx/Tengine+MySQL/MariaDB/Percona+PHP</br>+Pureftpd+phpMyAdmin+redis+memcached+jemalloc脚本中用到的软件包大多最新稳定版本,修复了一些安全性问题。</h3>
 <p><b>查看本地环境:</b>&nbsp;&nbsp;<a href="/tz.php" target="_blank" class="links">探针</a>&nbsp;<a href="/phpinfo.php" target="_blank" class="links">phpinfo</a>&nbsp;<a href="/ocp.php" target="_blank" class="links">Opcache</a>&nbsp;<a href="/phpMyAdmin/" target="_blank" class="links">phpMyAdmin</a>(为了更安全,建议重命名 phpMyAdmin 目录!)</p>
 <p><b>创建 WEB 虚拟主机执行脚本:</b>&nbsp;&nbsp;<font color="#008000">./vhost.sh</font></p>
 <p><b>创建 FTP 虚拟账号执行脚本:</b>&nbsp;&nbsp;<font color="#008000">./pureftpd_vhost.sh</font></p>

+ 3 - 8
include/check_download.sh

@@ -685,14 +685,9 @@ checkDownload(){
     src_url=https://launchpad.net/libmemcached/1.0/${libmemcached_version}/+download/libmemcached-${libmemcached_version}.tar.gz && Download_src
   fi
 
-  if [ "${je_tc_malloc_yn}" == 'y' ]; then
-    if [ "${je_tc_malloc}" == '1' ]; then
-      echo "Download jemalloc..."
-      src_url=${mirrorLink}/jemalloc-${jemalloc_version}.tar.bz2 && Download_src
-    elif [ "${je_tc_malloc}" == '2' ]; then
-      echo "Download tcmalloc..."
-      src_url=${mirrorLink}/gperftools-${tcmalloc_version}.tar.gz && Download_src
-    fi
+  if [[ $Nginx_version =~ ^[1-3]$ ]] || [ "$DB_yn" == 'y' -a "$DB_version" != '10' ]; then
+    echo "Download jemalloc..."
+    src_url=${mirrorLink}/jemalloc-${jemalloc_version}.tar.bz2 && Download_src
   fi
 
   # others

+ 2 - 2
include/jemalloc.sh

@@ -17,9 +17,9 @@ Install_jemalloc() {
   popd
   if [ -f "/usr/local/lib/libjemalloc.so" ]; then
     if [ "$OS_BIT" == '64' -a "$OS" == 'CentOS' ]; then
-        ln -s /usr/local/lib/libjemalloc.so.2 /usr/lib64/libjemalloc.so.1
+      ln -s /usr/local/lib/libjemalloc.so.2 /usr/lib64/libjemalloc.so.1
     else
-        ln -s /usr/local/lib/libjemalloc.so.2 /usr/lib/libjemalloc.so.1
+      ln -s /usr/local/lib/libjemalloc.so.2 /usr/lib/libjemalloc.so.1
     fi
     echo '/usr/local/lib' > /etc/ld.so.conf.d/local.conf
     ldconfig

+ 2 - 14
include/mariadb-10.0.sh

@@ -20,22 +20,10 @@ Install_MariaDB-10-0() {
   if [ "${dbInstallMethods}" == "1" ]; then
     tar zxf mariadb-${mariadb_10_0_version}-${GLIBC_FLAG}-${SYS_BIT_b}.tar.gz
     mv mariadb-${mariadb_10_0_version}-*-${SYS_BIT_b}/* ${mariadb_install_dir}
-
-    if [ "${je_tc_malloc}" == "1" ]; then
-      sed -i 's@executing mysqld_safe@executing mysqld_safe\nexport LD_PRELOAD=/usr/local/lib/libjemalloc.so@' ${mariadb_install_dir}/bin/mysqld_safe
-    elif [ "${je_tc_malloc}" == "2" ]; then
-      sed -i 's@executing mysqld_safe@executing mysqld_safe\nexport LD_PRELOAD=/usr/local/lib/libtcmalloc.so@' ${mariadb_install_dir}/bin/mysqld_safe
-    fi
+    sed -i 's@executing mysqld_safe@executing mysqld_safe\nexport LD_PRELOAD=/usr/local/lib/libjemalloc.so@' ${mariadb_install_dir}/bin/mysqld_safe
   elif [ "${dbInstallMethods}" == "2" ]; then
     tar xvf mariadb-${mariadb_10_0_version}.tar.gz
     pushd mariadb-${mariadb_10_0_version}
-
-    if [ "${je_tc_malloc}" == "1" ]; then
-      EXE_LINKER="-DCMAKE_EXE_LINKER_FLAGS='-ljemalloc'"
-    elif [ "${je_tc_malloc}" == "2" ]; then
-      EXE_LINKER="-DCMAKE_EXE_LINKER_FLAGS='-ltcmalloc'"
-    fi
-
     cmake . -DCMAKE_INSTALL_PREFIX=${mariadb_install_dir} \
     -DMYSQL_DATADIR=${mariadb_data_dir} \
     -DSYSCONFDIR=/etc \
@@ -50,7 +38,7 @@ Install_MariaDB-10-0() {
     -DDEFAULT_CHARSET=utf8mb4 \
     -DDEFAULT_COLLATION=utf8mb4_general_ci \
     -DEXTRA_CHARSETS=all \
-    ${EXE_LINKER}
+    -DCMAKE_EXE_LINKER_FLAGS='-ljemalloc'
     make -j ${THREAD}
     make install
     popd

+ 2 - 14
include/mariadb-10.1.sh

@@ -20,22 +20,10 @@ Install_MariaDB-10-1() {
   if [ "${dbInstallMethods}" == "1" ]; then
     tar zxf mariadb-${mariadb_10_1_version}-${GLIBC_FLAG}-${SYS_BIT_b}.tar.gz
     mv mariadb-${mariadb_10_1_version}-*-${SYS_BIT_b}/* ${mariadb_install_dir}
-
-    if [ "${je_tc_malloc}" == "1" ]; then
-      sed -i 's@executing mysqld_safe@executing mysqld_safe\nexport LD_PRELOAD=/usr/local/lib/libjemalloc.so@' ${mariadb_install_dir}/bin/mysqld_safe
-    elif [ "${je_tc_malloc}" == "2" ]; then
-      sed -i 's@executing mysqld_safe@executing mysqld_safe\nexport LD_PRELOAD=/usr/local/lib/libtcmalloc.so@' ${mariadb_install_dir}/bin/mysqld_safe
-    fi
+    sed -i 's@executing mysqld_safe@executing mysqld_safe\nexport LD_PRELOAD=/usr/local/lib/libjemalloc.so@' ${mariadb_install_dir}/bin/mysqld_safe
   elif [ "${dbInstallMethods}" == "2" ]; then
     tar xvf mariadb-${mariadb_10_1_version}.tar.gz
     pushd mariadb-${mariadb_10_1_version}
-
-    if [ "${je_tc_malloc}" == "1" ]; then
-      EXE_LINKER="-DCMAKE_EXE_LINKER_FLAGS='-ljemalloc'"
-    elif [ "${je_tc_malloc}" == "2" ]; then
-      EXE_LINKER="-DCMAKE_EXE_LINKER_FLAGS='-ltcmalloc'"
-    fi
-
     cmake . -DCMAKE_INSTALL_PREFIX=${mariadb_install_dir} \
     -DMYSQL_DATADIR=${mariadb_data_dir} \
     -DSYSCONFDIR=/etc \
@@ -50,7 +38,7 @@ Install_MariaDB-10-1() {
     -DDEFAULT_CHARSET=utf8mb4 \
     -DDEFAULT_COLLATION=utf8mb4_general_ci \
     -DEXTRA_CHARSETS=all \
-    ${EXE_LINKER}
+    -DCMAKE_EXE_LINKER_FLAGS='-ljemalloc'
     make -j ${THREAD}
     make install
     popd

+ 3 - 18
include/mariadb-5.5.sh

@@ -20,26 +20,11 @@ Install_MariaDB-5-5() {
   if [ "${dbInstallMethods}" == "1" ]; then
     tar zxf mariadb-${mariadb_5_5_version}-${GLIBC_FLAG}-${SYS_BIT_b}.tar.gz
     mv mariadb-${mariadb_5_5_version}-*-${SYS_BIT_b}/* ${mariadb_install_dir}
-
-    if [ "${je_tc_malloc}" == "1" ]; then
-      sed -i 's@executing mysqld_safe@executing mysqld_safe\nexport LD_PRELOAD=/usr/local/lib/libjemalloc.so@' ${mariadb_install_dir}/bin/mysqld_safe
-    elif [ "${je_tc_malloc}" == "2" ]; then
-      sed -i 's@executing mysqld_safe@executing mysqld_safe\nexport LD_PRELOAD=/usr/local/lib/libtcmalloc.so@' ${mariadb_install_dir}/bin/mysqld_safe
-    fi
+    sed -i 's@executing mysqld_safe@executing mysqld_safe\nexport LD_PRELOAD=/usr/local/lib/libjemalloc.so@' ${mariadb_install_dir}/bin/mysqld_safe
   elif [ "${dbInstallMethods}" == "2" ]; then
     tar xvf mariadb-${mariadb_5_5_version}.tar.gz
     pushd mariadb-${mariadb_5_5_version}
-
-    if [ "${je_tc_malloc}" == "1" ]; then
-      EXE_LINKER="-DCMAKE_EXE_LINKER_FLAGS='-ljemalloc'"
-    elif [ "${je_tc_malloc}" == "2" ]; then
-      EXE_LINKER="-DCMAKE_EXE_LINKER_FLAGS='-ltcmalloc'"
-    fi
-    
-    if [ "${armPlatform}" == "y" ]; then
-      patch -p1 < ../mysql-5.5-fix-arm-client_plugin.patch
-    fi
-
+    [ "${armPlatform}" == "y" ] && patch -p1 < ../mysql-5.5-fix-arm-client_plugin.patch
     cmake . -DCMAKE_INSTALL_PREFIX=${mariadb_install_dir} \
     -DMYSQL_DATADIR=${mariadb_data_dir} \
     -DSYSCONFDIR=/etc \
@@ -55,7 +40,7 @@ Install_MariaDB-5-5() {
     -DDEFAULT_CHARSET=utf8mb4 \
     -DDEFAULT_COLLATION=utf8mb4_general_ci \
     -DEXTRA_CHARSETS=all \
-    ${EXE_LINKER}
+    -DCMAKE_EXE_LINKER_FLAGS='-ljemalloc'
     make -j ${THREAD}
     make install
     popd

+ 2 - 15
include/mysql-5.5.sh

@@ -20,24 +20,11 @@ Install_MySQL-5-5() {
   if [ "${dbInstallMethods}" == "1" ]; then
     tar xvf mysql-${mysql_5_5_version}-linux2.6-${SYS_BIT_b}.tar.gz
     mv mysql-${mysql_5_5_version}-linux2.6-${SYS_BIT_b}/* ${mysql_install_dir}
-
-    if [ "${je_tc_malloc}" == "1" ]; then
-      sed -i 's@executing mysqld_safe@executing mysqld_safe\nexport LD_PRELOAD=/usr/local/lib/libjemalloc.so@' ${mysql_install_dir}/bin/mysqld_safe
-    elif [ "${je_tc_malloc}" == "2" ]; then
-      sed -i 's@executing mysqld_safe@executing mysqld_safe\nexport LD_PRELOAD=/usr/local/lib/libtcmalloc.so@' ${mysql_install_dir}/bin/mysqld_safe
-    fi
+    sed -i 's@executing mysqld_safe@executing mysqld_safe\nexport LD_PRELOAD=/usr/local/lib/libjemalloc.so@' ${mysql_install_dir}/bin/mysqld_safe
   elif [ "${dbInstallMethods}" == "2" ]; then
     tar xvf mysql-${mysql_5_5_version}.tar.gz
     pushd mysql-${mysql_5_5_version}
-
-    if [ "${je_tc_malloc}" == "1" ]; then
-      EXE_LINKER="-DCMAKE_EXE_LINKER_FLAGS='-ljemalloc'"
-    elif [ "${je_tc_malloc}" == "2" ]; then
-      EXE_LINKER="-DCMAKE_EXE_LINKER_FLAGS='-ltcmalloc'"
-    fi
-    
     [ "${armPlatform}" == "y" ] && patch -p1 < ../mysql-5.5-fix-arm-client_plugin.patch
-
     cmake . -DCMAKE_INSTALL_PREFIX=${mysql_install_dir} \
     -DMYSQL_DATADIR=${mysql_data_dir} \
     -DSYSCONFDIR=/etc \
@@ -53,7 +40,7 @@ Install_MySQL-5-5() {
     -DDEFAULT_CHARSET=utf8mb4 \
     -DDEFAULT_COLLATION=utf8mb4_general_ci \
     -DEXTRA_CHARSETS=all \
-    ${EXE_LINKER}
+    -DCMAKE_EXE_LINKER_FLAGS='-ljemalloc'
     make -j ${THREAD}
     make install
     popd

+ 2 - 14
include/mysql-5.6.sh

@@ -20,22 +20,10 @@ Install_MySQL-5-6() {
   if [ "${dbInstallMethods}" == "1" ]; then
     tar xvf mysql-${mysql_5_6_version}-linux-glibc2.5-${SYS_BIT_b}.tar.gz
     mv mysql-${mysql_5_6_version}-linux-glibc2.5-${SYS_BIT_b}/* ${mysql_install_dir}
-
-    if [ "${je_tc_malloc}" == "1" ]; then
-      sed -i 's@executing mysqld_safe@executing mysqld_safe\nexport LD_PRELOAD=/usr/local/lib/libjemalloc.so@' ${mysql_install_dir}/bin/mysqld_safe
-    elif [ "${je_tc_malloc}" == "2" ]; then
-      sed -i 's@executing mysqld_safe@executing mysqld_safe\nexport LD_PRELOAD=/usr/local/lib/libtcmalloc.so@' ${mysql_install_dir}/bin/mysqld_safe
-    fi
+    sed -i 's@executing mysqld_safe@executing mysqld_safe\nexport LD_PRELOAD=/usr/local/lib/libjemalloc.so@' ${mysql_install_dir}/bin/mysqld_safe
   elif [ "${dbInstallMethods}" == "2" ]; then
     tar xvf mysql-${mysql_5_6_version}.tar.gz
     pushd mysql-${mysql_5_6_version}
-
-    if [ "${je_tc_malloc}" == "1" ]; then
-      EXE_LINKER="-DCMAKE_EXE_LINKER_FLAGS='-ljemalloc'"
-    elif [ "${je_tc_malloc}" == "2" ]; then
-      EXE_LINKER="-DCMAKE_EXE_LINKER_FLAGS='-ltcmalloc'"
-    fi
-
     cmake . -DCMAKE_INSTALL_PREFIX=${mysql_install_dir} \
     -DMYSQL_DATADIR=${mysql_data_dir} \
     -DSYSCONFDIR=/etc \
@@ -50,7 +38,7 @@ Install_MySQL-5-6() {
     -DDEFAULT_CHARSET=utf8mb4 \
     -DDEFAULT_COLLATION=utf8mb4_general_ci \
     -DEXTRA_CHARSETS=all \
-    ${EXE_LINKER}
+    -DCMAKE_EXE_LINKER_FLAGS='-ljemalloc'
     make -j ${THREAD}
     make install
     popd

+ 2 - 14
include/mysql-5.7.sh

@@ -20,22 +20,10 @@ Install_MySQL-5-7() {
   if [ "${dbInstallMethods}" == "1" ]; then
     tar xvf mysql-${mysql_5_7_version}-linux-glibc2.5-${SYS_BIT_b}.tar.gz
     mv mysql-${mysql_5_7_version}-linux-glibc2.5-${SYS_BIT_b}/* ${mysql_install_dir}
-
-    if [ "${je_tc_malloc}" == "1" ]; then
-      sed -i 's@executing mysqld_safe@executing mysqld_safe\nexport LD_PRELOAD=/usr/local/lib/libjemalloc.so@' ${mysql_install_dir}/bin/mysqld_safe
-    elif [ "${je_tc_malloc}" == "2" ]; then
-      sed -i 's@executing mysqld_safe@executing mysqld_safe\nexport LD_PRELOAD=/usr/local/lib/libtcmalloc.so@' ${mysql_install_dir}/bin/mysqld_safe
-    fi
+    sed -i 's@executing mysqld_safe@executing mysqld_safe\nexport LD_PRELOAD=/usr/local/lib/libjemalloc.so@' ${mysql_install_dir}/bin/mysqld_safe
   elif [ "${dbInstallMethods}" == "2" ]; then
     tar xvf mysql-${mysql_5_7_version}.tar.gz
     pushd mysql-${mysql_5_7_version}
-
-    if [ "${je_tc_malloc}" == "1" ]; then
-      EXE_LINKER="-DCMAKE_EXE_LINKER_FLAGS='-ljemalloc'"
-    elif [ "${je_tc_malloc}" == "2" ]; then
-      EXE_LINKER="-DCMAKE_EXE_LINKER_FLAGS='-ltcmalloc'"
-    fi
-
     cmake . -DCMAKE_INSTALL_PREFIX=${mysql_install_dir} \
     -DMYSQL_DATADIR=${mysql_data_dir} \
     -DSYSCONFDIR=/etc \
@@ -50,7 +38,7 @@ Install_MySQL-5-7() {
     -DDEFAULT_CHARSET=utf8mb4 \
     -DDEFAULT_COLLATION=utf8mb4_general_ci \
     -DEXTRA_CHARSETS=all \
-    ${EXE_LINKER}
+    -DCMAKE_EXE_LINKER_FLAGS='-ljemalloc'
     make -j ${THREAD}
     make install
     popd

+ 10 - 19
include/nginx.sh

@@ -26,16 +26,8 @@ Install_Nginx() {
   # close debug
   sed -i 's@CFLAGS="$CFLAGS -g"@#CFLAGS="$CFLAGS -g"@' auto/cc/gcc
   
-  if [ "$je_tc_malloc" == '1' ]; then
-    malloc_module="--with-ld-opt='-ljemalloc'"
-  elif [ "$je_tc_malloc" == '2' ]; then
-    malloc_module='--with-google_perftools_module'
-    mkdir /tmp/tcmalloc
-    chown -R ${run_user}.$run_user /tmp/tcmalloc
-  fi
-
   [ ! -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-ipv6 --with-http_gzip_static_module --with-http_realip_module --with-http_flv_module --with-http_mp4_module --with-openssl=../openssl-$openssl_version --with-pcre=../pcre-$pcre_version --with-pcre-jit $malloc_module
+  ./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-ipv6 --with-http_gzip_static_module --with-http_realip_module --with-http_flv_module --with-http_mp4_module --with-openssl=../openssl-$openssl_version --with-pcre=../pcre-$pcre_version --with-pcre-jit --with-ld-opt='-ljemalloc' 
   make -j ${THREAD} && make install
   if [ -e "$nginx_install_dir/conf/nginx.conf" ]; then
     popd 
@@ -84,21 +76,20 @@ 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
-  [ "$je_tc_malloc" == '2' ] && sed -i 's@^pid\(.*\)@pid\1\ngoogle_perftools_profiles /tmp/tcmalloc;@' $nginx_install_dir/conf/nginx.conf
   
   # logrotate nginx log
   cat > /etc/logrotate.d/nginx << EOF
 $wwwlogs_dir/*nginx.log {
-daily
-rotate 5
-missingok
-dateext
-compress
-notifempty
-sharedscripts
-postrotate
+  daily
+  rotate 5
+  missingok
+  dateext
+  compress
+  notifempty
+  sharedscripts
+  postrotate
     [ -e /var/run/nginx.pid ] && kill -USR1 \`cat /var/run/nginx.pid\`
-endscript
+  endscript
 }
 EOF
   popd

+ 10 - 19
include/openresty.sh

@@ -23,16 +23,8 @@ Install_OpenResty() {
   openresty_version_tmp=${openresty_version%.*}
   sed -i 's@CFLAGS="$CFLAGS -g"@#CFLAGS="$CFLAGS -g"@' bundle/nginx-$openresty_version_tmp/auto/cc/gcc # close debug
   
-  if [ "$je_tc_malloc" == '1' ]; then
-    malloc_module="--with-ld-opt='-ljemalloc'"
-  elif [ "$je_tc_malloc" == '2' ]; then
-    malloc_module='--with-google_perftools_module'
-    mkdir /tmp/tcmalloc
-    chown -R ${run_user}.$run_user /tmp/tcmalloc
-  fi
-
   [ ! -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-ipv6 --with-http_gzip_static_module --with-http_realip_module --with-http_flv_module --with-http_mp4_module --with-openssl=../openssl-$openssl_version --with-pcre=../pcre-$pcre_version --with-pcre-jit $malloc_module
+  ./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-ipv6 --with-http_gzip_static_module --with-http_realip_module --with-http_flv_module --with-http_mp4_module --with-openssl=../openssl-$openssl_version --with-pcre=../pcre-$pcre_version --with-pcre-jit --with-ld-opt='-ljemalloc' 
   make -j ${THREAD} && make install
   if [ -e "$openresty_install_dir/nginx/conf/nginx.conf" ]; then
     popd
@@ -81,21 +73,20 @@ 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
-  [ "$je_tc_malloc" == '2' ] && sed -i 's@^pid\(.*\)@pid\1\ngoogle_perftools_profiles /tmp/tcmalloc;@' $openresty_install_dir/nginx/conf/nginx.conf
   
   # logrotate nginx log
   cat > /etc/logrotate.d/nginx << EOF
 $wwwlogs_dir/*nginx.log {
-daily
-rotate 5
-missingok
-dateext
-compress
-notifempty
-sharedscripts
-postrotate
+  daily
+  rotate 5
+  missingok
+  dateext
+  compress
+  notifempty
+  sharedscripts
+  postrotate
     [ -e /var/run/nginx.pid ] && kill -USR1 \`cat /var/run/nginx.pid\`
-endscript
+  endscript
 }
 EOF
   popd

+ 3 - 18
include/percona-5.5.sh

@@ -21,26 +21,11 @@ Install_Percona-5-5() {
     perconaVerStr1=$(echo ${percona_5_5_version} | sed "s@-@-rel@")
     tar xvf Percona-Server-${perconaVerStr1}-Linux.${SYS_BIT_b}.${sslLibVer}.tar.gz
     mv Percona-Server-${perconaVerStr1}-Linux.${SYS_BIT_b}.${sslLibVer}/* ${percona_install_dir}
-
-    if [ "${je_tc_malloc}" == "1" ]; then
-      sed -i 's@executing mysqld_safe@executing mysqld_safe\nexport LD_PRELOAD=/usr/local/lib/libjemalloc.so@' ${percona_install_dir}/bin/mysqld_safe
-    elif [ "${je_tc_malloc}" == "2" ]; then
-      sed -i 's@executing mysqld_safe@executing mysqld_safe\nexport LD_PRELOAD=/usr/local/lib/libtcmalloc.so@' ${percona_install_dir}/bin/mysqld_safe
-    fi
+    sed -i 's@executing mysqld_safe@executing mysqld_safe\nexport LD_PRELOAD=/usr/local/lib/libjemalloc.so@' ${percona_install_dir}/bin/mysqld_safe
   elif [ "${dbInstallMethods}" == "2" ]; then
     tar xvf percona-server-${percona_5_5_version}.tar.gz
     pushd percona-server-${percona_5_5_version}
-
-    if [ "${je_tc_malloc}" == "1" ]; then
-      EXE_LINKER="-DCMAKE_EXE_LINKER_FLAGS='-ljemalloc'"
-    elif [ "${je_tc_malloc}" == "2" ]; then
-      EXE_LINKER="-DCMAKE_EXE_LINKER_FLAGS='-ltcmalloc'"
-    fi
-
-    if [ "${armPlatform}" == "y" ]; then
-      patch -p1 < ../mysql-5.5-fix-arm-client_plugin.patch
-    fi
-
+    [ "${armPlatform}" == "y" ] && patch -p1 < ../mysql-5.5-fix-arm-client_plugin.patch
     cmake . -DCMAKE_INSTALL_PREFIX=${percona_install_dir} \
     -DMYSQL_DATADIR=${percona_data_dir} \
     -DSYSCONFDIR=/etc \
@@ -56,7 +41,7 @@ Install_Percona-5-5() {
     -DDEFAULT_CHARSET=utf8mb4 \
     -DDEFAULT_COLLATION=utf8mb4_general_ci \
     -DEXTRA_CHARSETS=all \
-    ${EXE_LINKER}
+    -DCMAKE_EXE_LINKER_FLAGS='-ljemalloc'
     make -j ${THREAD}
     make install
     popd

+ 2 - 14
include/percona-5.6.sh

@@ -21,22 +21,10 @@ Install_Percona-5-6() {
     perconaVerStr1=$(echo ${percona_5_6_version} | sed "s@-@-rel@")
     tar xvf Percona-Server-${perconaVerStr1}-Linux.${SYS_BIT_b}.${sslLibVer}.tar.gz
     mv Percona-Server-${perconaVerStr1}-Linux.${SYS_BIT_b}.${sslLibVer}/* ${percona_install_dir}
-
-    if [ "${je_tc_malloc}" == "1" ]; then
-      sed -i 's@executing mysqld_safe@executing mysqld_safe\nexport LD_PRELOAD=/usr/local/lib/libjemalloc.so@' ${percona_install_dir}/bin/mysqld_safe
-    elif [ "${je_tc_malloc}" == "2" ]; then
-      sed -i 's@executing mysqld_safe@executing mysqld_safe\nexport LD_PRELOAD=/usr/local/lib/libtcmalloc.so@' ${percona_install_dir}/bin/mysqld_safe
-    fi
+    sed -i 's@executing mysqld_safe@executing mysqld_safe\nexport LD_PRELOAD=/usr/local/lib/libjemalloc.so@' ${percona_install_dir}/bin/mysqld_safe
   elif [ "${dbInstallMethods}" == "2" ]; then
     tar xvf percona-server-${percona_5_6_version}.tar.gz
     pushd percona-server-${percona_5_6_version}
-
-    if [ "${je_tc_malloc}" == "1" ]; then
-      EXE_LINKER="-DCMAKE_EXE_LINKER_FLAGS='-ljemalloc'"
-    elif [ "${je_tc_malloc}" == "2" ]; then
-      EXE_LINKER="-DCMAKE_EXE_LINKER_FLAGS='-ltcmalloc'"
-    fi
-
     cmake . -DCMAKE_INSTALL_PREFIX=${percona_install_dir} \
     -DMYSQL_DATADIR=${percona_data_dir} \
     -DSYSCONFDIR=/etc \
@@ -52,7 +40,7 @@ Install_Percona-5-6() {
     -DDEFAULT_CHARSET=utf8mb4 \
     -DDEFAULT_COLLATION=utf8mb4_general_ci \
     -DEXTRA_CHARSETS=all \
-    ${EXE_LINKER}
+    -DCMAKE_EXE_LINKER_FLAGS='-ljemalloc'
     make -j ${THREAD}
     make install
     popd

+ 2 - 14
include/percona-5.7.sh

@@ -20,22 +20,10 @@ Install_Percona-5-7() {
   if [ "${dbInstallMethods}" == "1" ]; then
     tar xvf Percona-Server-${percona_5_7_version}-Linux.${SYS_BIT_b}.${sslLibVer}.tar.gz
     mv Percona-Server-${percona_5_7_version}-Linux.${SYS_BIT_b}.${sslLibVer}/* ${percona_install_dir}
-
-    if [ "${je_tc_malloc}" == "1" ]; then
-      sed -i 's@executing mysqld_safe@executing mysqld_safe\nexport LD_PRELOAD=/usr/local/lib/libjemalloc.so@' ${percona_install_dir}/bin/mysqld_safe
-    elif [ "${je_tc_malloc}" == "2" ]; then
-      sed -i 's@executing mysqld_safe@executing mysqld_safe\nexport LD_PRELOAD=/usr/local/lib/libtcmalloc.so@' ${percona_install_dir}/bin/mysqld_safe
-    fi
+    sed -i 's@executing mysqld_safe@executing mysqld_safe\nexport LD_PRELOAD=/usr/local/lib/libjemalloc.so@' ${percona_install_dir}/bin/mysqld_safe
   elif [ "${dbInstallMethods}" == "2" ]; then
     tar xvf percona-server-${percona_5_7_version}.tar.gz
     pushd percona-server-${percona_5_7_version}
-
-    if [ "${je_tc_malloc}" == "1" ]; then
-      EXE_LINKER="-DCMAKE_EXE_LINKER_FLAGS='-ljemalloc'"
-    elif [ "${je_tc_malloc}" == "2" ]; then
-      EXE_LINKER="-DCMAKE_EXE_LINKER_FLAGS='-ltcmalloc'"
-    fi
-
     cmake . -DCMAKE_INSTALL_PREFIX=${percona_install_dir} \
     -DMYSQL_DATADIR=${percona_data_dir} \
     -DSYSCONFDIR=/etc \
@@ -52,7 +40,7 @@ Install_Percona-5-7() {
     -DDEFAULT_CHARSET=utf8mb4 \
     -DDEFAULT_COLLATION=utf8mb4_general_ci \
     -DEXTRA_CHARSETS=all \
-    ${EXE_LINKER}
+    -DCMAKE_EXE_LINKER_FLAGS='-ljemalloc'
     make -j ${THREAD}
     make install
     popd

+ 0 - 28
include/tcmalloc.sh

@@ -1,28 +0,0 @@
-#!/bin/bash
-# Author:  yeho <lj2007331 AT gmail.com>
-# BLOG:  https://blog.linuxeye.com
-#
-# Notes: OneinStack for CentOS/RadHat 5+ Debian 6+ and Ubuntu 12+
-#
-# Project home page:
-#       https://oneinstack.com
-#       https://github.com/lj2007331/oneinstack
-
-Install_tcmalloc() {
-  pushd ${oneinstack_dir}/src
-  tar xzf gperftools-$tcmalloc_version.tar.gz
-  pushd gperftools-$tcmalloc_version
-  ./configure --enable-frame-pointers
-  make -j ${THREAD} && make install
-  popd
-  if [ -f "/usr/local/lib/libtcmalloc.so" ]; then
-    echo '/usr/local/lib' > /etc/ld.so.conf.d/local.conf
-    ldconfig
-    echo "${CSUCCESS}tcmalloc module installed successfully! ${CEND}"
-    rm -rf gperftools-$tcmalloc_version
-  else
-    echo "${CFAILURE}tcmalloc module install failed, Please contact the author! ${CEND}"
-    kill -9 $$
-  fi
-  popd
-}

+ 10 - 19
include/tengine.sh

@@ -24,16 +24,8 @@ Install_Tengine() {
   # close debug
   sed -i 's@CFLAGS="$CFLAGS -g"@#CFLAGS="$CFLAGS -g"@' auto/cc/gcc
   
-  if [ "$je_tc_malloc" == '1' ]; then
-    malloc_module='--with-jemalloc'
-  elif [ "$je_tc_malloc" == '2' ]; then
-    malloc_module='--with-google_perftools_module'
-    mkdir /tmp/tcmalloc
-    chown -R ${run_user}.$run_user /tmp/tcmalloc
-  fi
-
   [ ! -d "$tengine_install_dir" ] && mkdir -p $tengine_install_dir
-  ./configure --prefix=$tengine_install_dir --user=$run_user --group=$run_user --with-http_stub_status_module --with-http_spdy_module --with-http_ssl_module --with-ipv6 --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_version --with-pcre=../pcre-$pcre_version --with-pcre-jit $malloc_module
+  ./configure --prefix=$tengine_install_dir --user=$run_user --group=$run_user --with-http_stub_status_module --with-http_spdy_module --with-http_ssl_module --with-ipv6 --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_version --with-pcre=../pcre-$pcre_version --with-pcre-jit --with-jemalloc 
   make -j ${THREAD} && make install
   if [ -e "$tengine_install_dir/conf/nginx.conf" ]; then
     popd
@@ -82,7 +74,6 @@ EOF
   sed -i "s@/data/wwwroot/default@$wwwroot_dir/default@" $tengine_install_dir/conf/nginx.conf
   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
-  [ "$je_tc_malloc" == '2' ] && sed -i 's@^pid\(.*\)@pid\1\ngoogle_perftools_profiles /tmp/tcmalloc;@' $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
@@ -91,16 +82,16 @@ EOF
   # logrotate nginx log
   cat > /etc/logrotate.d/nginx << EOF
 $wwwlogs_dir/*nginx.log {
-daily
-rotate 5
-missingok
-dateext
-compress
-notifempty
-sharedscripts
-postrotate
+  daily
+  rotate 5
+  missingok
+  dateext
+  compress
+  notifempty
+  sharedscripts
+  postrotate
     [ -e /var/run/nginx.pid ] && kill -USR1 \`cat /var/run/nginx.pid\`
-endscript
+  endscript
 }
 EOF
   popd

+ 4 - 13
include/upgrade_db.sh

@@ -53,10 +53,6 @@ Upgrade_DB() {
   #upgrade
   echo
   echo "Current $DB Version: ${CMSG}$OLD_DB_version${CEND}"
-  [ -e /usr/local/lib/libjemalloc.so ] && { je_tc_malloc=1; EXE_LINKER="-DCMAKE_EXE_LINKER_FLAGS='-ljemalloc'"; }
-  [ -e /usr/local/lib/libtcmalloc.so ] && { je_tc_malloc=2; EXE_LINKER="-DCMAKE_EXE_LINKER_FLAGS='-ltcmalloc'"; }
-  [ -e /usr/local/lib/libjemalloc.so -a -e /usr/local/lib/libtcmalloc.so ] && { je_tc_malloc=1; EXE_LINKER="-DCMAKE_EXE_LINKER_FLAGS='-ljemalloc'"; }
-  
   while :; do echo
     read -p "Please input upgrade $DB Version(example: $OLD_DB_version): " NEW_DB_version
     if [ `echo $NEW_DB_version | awk -F. '{print $1"."$2}'` == `echo $OLD_DB_version | awk -F. '{print $1"."$2}'` ]; then
@@ -95,11 +91,7 @@ Upgrade_DB() {
       tar xzf $DB_name.tar.gz
       [ ! -d "$mariadb_install_dir" ] && mkdir -p $mariadb_install_dir
       mv mariadb-${NEW_DB_version}-*-${SYS_BIT_b}/* $mariadb_install_dir
-      if [ "$je_tc_malloc" == '1' -a "`echo $OLD_DB_version_tmp | awk -F'.' '{print $1"."$2}'`" != '10.1' ]; then
-        sed -i 's@executing mysqld_safe@executing mysqld_safe\nexport LD_PRELOAD=/usr/local/lib/libjemalloc.so@' $mariadb_install_dir/bin/mysqld_safe
-      elif [ "$je_tc_malloc" == '2' -a "`echo $OLD_DB_version_tmp | awk -F'.' '{print $1"."$2}'`" != '10.1' ]; then
-        sed -i 's@executing mysqld_safe@executing mysqld_safe\nexport LD_PRELOAD=/usr/local/lib/libtcmalloc.so@' $mariadb_install_dir/bin/mysqld_safe
-      fi
+      sed -i 's@executing mysqld_safe@executing mysqld_safe\nexport LD_PRELOAD=/usr/local/lib/libjemalloc.so@' $mariadb_install_dir/bin/mysqld_safe
       $mariadb_install_dir/scripts/mysql_install_db --user=mysql --basedir=$mariadb_install_dir --datadir=$mariadb_data_dir
       chown mysql.mysql -R $mariadb_data_dir
       service mysqld start
@@ -127,7 +119,7 @@ Upgrade_DB() {
         -DENABLED_LOCAL_INFILE=1 \
         -DDEFAULT_CHARSET=utf8mb4 \
         -DDEFAULT_COLLATION=utf8mb4_general_ci \
-        $EXE_LINKER
+        -DCMAKE_EXE_LINKER_FLAGS='-ljemalloc'
       else
         cmake . -DCMAKE_INSTALL_PREFIX=$percona_install_dir \
         -DMYSQL_DATADIR=$percona_data_dir \
@@ -142,7 +134,7 @@ Upgrade_DB() {
         -DENABLE_DTRACE=0 \
         -DDEFAULT_CHARSET=utf8mb4 \
         -DDEFAULT_COLLATION=utf8mb4_general_ci \
-        $EXE_LINKER
+        -DCMAKE_EXE_LINKER_FLAGS='-ljemalloc'
       fi
       make -j ${THREAD}
       service mysqld stop
@@ -172,8 +164,7 @@ Upgrade_DB() {
       [ ! -d "$mysql_install_dir" ] && mkdir -p $mysql_install_dir
       mkdir -p $mysql_data_dir;chown mysql.mysql -R $mysql_data_dir
       mv $DB_name/* $mysql_install_dir/
-      [ "$je_tc_malloc" == '1' ] && sed -i 's@executing mysqld_safe@executing mysqld_safe\nexport LD_PRELOAD=/usr/local/lib/libjemalloc.so@' $mysql_install_dir/bin/mysqld_safe
-      [ "$je_tc_malloc" == '2' ] && sed -i 's@executing mysqld_safe@executing mysqld_safe\nexport LD_PRELOAD=/usr/local/lib/libtcmalloc.so@' $mysql_install_dir/bin/mysqld_safe
+      sed -i 's@executing mysqld_safe@executing mysqld_safe\nexport LD_PRELOAD=/usr/local/lib/libjemalloc.so@' $mysql_install_dir/bin/mysqld_safe
       [ "`echo $NEW_DB_version | awk -F. '{print $1"."$2}'`" != '5.7' ] && $mysql_install_dir/scripts/mysql_install_db --user=mysql --basedir=$mysql_install_dir --datadir=$mysql_data_dir
       [ "`echo $NEW_DB_version | awk -F. '{print $1"."$2}'`" == '5.7' ] && $mysql_install_dir/bin/mysqld --initialize-insecure --user=mysql --basedir=$mysql_install_dir --datadir=$mysql_data_dir
 

+ 1 - 5
include/upgrade_web.sh

@@ -159,11 +159,7 @@ Upgrade_OpenResty() {
     openresty_version_tmp=${NEW_OpenResty_version%.*}
     sed -i 's@CFLAGS="$CFLAGS -g"@#CFLAGS="$CFLAGS -g"@' bundle/nginx-$openresty_version_tmp/auto/cc/gcc # close debug
     $openresty_install_dir/nginx/sbin/nginx -V &> $$
-    openresty_configure_arguments=`cat $$ | grep 'configure arguments:' | awk -F: '{print $2}'`
-    rm -rf $$
-    [ -n "`echo $openresty_configure_arguments | grep jemalloc`"] && malloc_module="--with-ld-opt='-ljemalloc'"
-    [ -n "`echo $openresty_configure_arguments | grep perftools`" ] && malloc_module='--with-google_perftools_module'
-    ./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-ipv6 --with-http_gzip_static_module --with-http_realip_module --with-http_flv_module --with-http_mp4_module --with-openssl=../openssl-$openssl_version --with-pcre=../pcre-$pcre_version --with-pcre-jit $malloc_module
+    ./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-ipv6 --with-http_gzip_static_module --with-http_realip_module --with-http_flv_module --with-http_mp4_module --with-openssl=../openssl-$openssl_version --with-pcre=../pcre-$pcre_version --with-pcre-jit --with-ld-opt='-ljemalloc' 
     make -j ${THREAD}
     if [ -f "build/nginx-$openresty_version_tmp/objs/nginx" ]; then
       /bin/mv $openresty_install_dir/nginx/sbin/nginx{,`date +%m%d`}

+ 2 - 2
init.d/Redis-server-init

@@ -30,7 +30,7 @@ case "$1" in
     chown redis:redis $PIDFILE
     if start-stop-daemon --start --quiet --pidfile $PIDFILE --chuid redis:redis --exec $DAEMON -- $DAEMON_ARGS
     then
-      echo -e "\e[00;32m[OK]\e[00m"
+      echo "[OK]"
     else
       echo "failed"
     fi
@@ -39,7 +39,7 @@ case "$1" in
     echo -n "Stopping $DESC: "
     if start-stop-daemon --stop --retry 10 --quiet --oknodo --pidfile $PIDFILE --exec $DAEMON
     then
-      echo -e "\e[00;32m[OK]\e[00m"
+      echo "[OK]"
     else
       echo "failed"
     fi

+ 6 - 38
install.sh

@@ -420,32 +420,6 @@ while :; do echo
   fi
 done
 
-# check jemalloc or tcmalloc
-if [[ $Nginx_version =~ ^[1-3]$ ]] || [ "$DB_yn" == 'y' -a "$DB_version" != '10' ]; then
-  while :; do echo
-    read -p "Do you want to use jemalloc or tcmalloc optimize Database and Web server? [y/n]: " je_tc_malloc_yn
-    if [[ ! $je_tc_malloc_yn =~ ^[y,n]$ ]]; then
-      echo "${CWARNING}input error! Please only input 'y' or 'n'${CEND}"
-    else
-      if [ "$je_tc_malloc_yn" == 'y' ]; then
-        echo 'Please select jemalloc or tcmalloc:'
-        echo -e "\t${CMSG}1${CEND}. jemalloc"
-        echo -e "\t${CMSG}2${CEND}. tcmalloc"
-        while :; do
-          read -p "Please input a number:(Default 1 press Enter) " je_tc_malloc
-          [ -z "$je_tc_malloc" ] && je_tc_malloc=1
-          if [[ ! $je_tc_malloc =~ ^[1-2]$ ]]; then
-            echo "${CWARNING}input error! Please only input number 1,2${CEND}"
-          else
-            break
-          fi
-        done
-      fi
-      break
-    fi
-  done
-fi
-
 while :; do echo
   read -p "Do you want to install HHVM? [y/n]: " HHVM_yn
   if [[ ! $HHVM_yn =~ ^[y,n]$ ]]; then
@@ -511,18 +485,12 @@ checkDownload 2>&1 | tee -a ${oneinstack_dir}/install.log
 # Install dependencies from source package
 installDepsBySrc 2>&1 | tee -a ${oneinstack_dir}/install.log
 
-# jemalloc or tcmalloc
-if [ "$je_tc_malloc_yn" == 'y' -a "$je_tc_malloc" == '1' -a ! -e "/usr/local/lib/libjemalloc.so" ]; then
-  . include/jemalloc.sh
-  Install_jemalloc | tee -a $oneinstack_dir/install.log
-fi
-if [ "$DB_version" == '4' -a ! -e "/usr/local/lib/libjemalloc.so" ]; then
-  . include/jemalloc.sh
-  Install_jemalloc | tee -a $oneinstack_dir/install.log
-fi
-if [ "$je_tc_malloc_yn" == 'y' -a "$je_tc_malloc" == '2' -a ! -e "/usr/local/lib/libtcmalloc.so" ]; then
-  . include/tcmalloc.sh
-  Install_tcmalloc | tee -a $oneinstack_dir/install.log
+# jemalloc
+if [[ $Nginx_version =~ ^[1-3]$ ]] || [ "$DB_yn" == 'y' -a "$DB_version" != '10' ]; then
+  if [ ! -e "/usr/local/lib/libjemalloc.so" ]; then
+    . include/jemalloc.sh
+    Install_jemalloc | tee -a $oneinstack_dir/install.log
+  fi
 fi
 
 # Database

+ 2 - 5
versions.txt

@@ -45,8 +45,8 @@ php_3_version=5.3.29
 zendopcache_version=7.0.5
 xcache_version=3.2.0
 apcu_version=4.0.11
-apcu_for_php7_version=5.1.6
-ImageMagick_version=6.9.6-2
+apcu_for_php7_version=5.1.7
+ImageMagick_version=6.9.6-3
 imagick_version=3.4.1
 imagick_for_php53_version=3.3.0
 GraphicsMagick_version=1.3.25
@@ -79,9 +79,6 @@ phpMyAdmin_version=4.4.15.8
 # jemalloc
 jemalloc_version=4.2.1
 
-# tcmalloc
-tcmalloc_version=2.5
-
 # boost
 boost_version=1.59.0
 

+ 1 - 1
vhost.sh

@@ -319,7 +319,7 @@ Input_Add_domain() {
           break
         fi
       done
-      [ "${redirect_yn}" == 'y' ] && Nginx_redirect=$(echo -e "if (\$host != $domain) {\n  rewrite ^/(.*)\$ \$scheme://$domain/\$1 permanent;\n}")
+      [ "${redirect_yn}" == 'y' ] && Nginx_redirect=$(echo -e "if (\$host != $domain) {\n    rewrite ^/(.*)\$ \$scheme://$domain/\$1 permanent;\n  }")
     fi
   fi