Browse Source

Fix install.sh

lj2007331@gmail.com 7 years ago
parent
commit
3a99a54874
3 changed files with 8 additions and 9 deletions
  1. 1 1
      README.md
  2. 6 7
      install.sh
  3. 1 1
      versions.txt

+ 1 - 1
README.md

@@ -3,7 +3,7 @@
 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~7(including redhat), Debian 6~9, Ubuntu 12~16 of 32 and 64.
 
 Script properties:
-- Continually updated
+- 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-5.7, MySQL-5.6, MySQL-5.5, MariaDB-10.1, MariaDB-10.0, MariaDB-5.5, Percona-5.7, Percona-5.6, Percona-5.5, AliSQL-5.6, PostgreSQL, MongoDB)

+ 6 - 7
install.sh

@@ -39,7 +39,7 @@ dbinstallmethod=1
 
 version() {
   echo "version: 1.7"
-  echo "updated date: 2018-03-25"
+  echo "updated date: 2018-03-30"
 }
 
 showhelp() {
@@ -965,9 +965,8 @@ endTime=`date +%s`
 ((installTime=($endTime-$startTime)/60))
 echo "####################Congratulations########################"
 echo "Total OneinStack Install Time: ${CQUESTION}${installTime}${CEND} minutes"
-[ "${web_yn}" == 'y' -a "${nginx_option}" != '4' -a "${apache_option}" == '3' ] && echo -e "\n$(printf "%-32s" "Nginx install dir":)${CMSG}${web_install_dir}${CEND}"
-[ "${web_yn}" == 'y' -a "${nginx_option}" != '4' -a "${apache_option}" != '3' ] && echo -e "\n$(printf "%-32s" "Nginx install dir":)${CMSG}${web_install_dir}${CEND}\n$(printf "%-32s" "Apache install  dir":)${CMSG}${apache_install_dir}${CEND}"
-[ "${web_yn}" == 'y' -a "${nginx_option}" == '4' -a "${apache_option}" != '3' ] && echo -e "\n$(printf "%-32s" "Apache install dir":)${CMSG}${apache_install_dir}${CEND}"
+[ "${web_yn}" == 'y' ] && [[ "${nginx_option}" =~ ^[1-3]$ ]] && echo -e "\n$(printf "%-32s" "Nginx install dir":)${CMSG}${web_install_dir}${CEND}"
+[ "${web_yn}" == 'y' ] && [[ "${apache_option}" =~ ^[1,2]$ ]] && echo -e "\n$(printf "%-32s" "Apache install dir":)${CMSG}${apache_install_dir}${CEND}"
 [[ "${tomcat_option}" =~ ^[1,2]$ ]] && echo -e "\n$(printf "%-32s" "Tomcat install dir":)${CMSG}${tomcat_install_dir}${CEND}"
 [[ "${db_option}" =~ ^[1-9]$|^1[0-1]$ ]] && echo -e "\n$(printf "%-32s" "Database install dir:")${CMSG}${db_install_dir}${CEND}"
 [[ "${db_option}" =~ ^[1-9]$|^1[0-1]$ ]] && echo "$(printf "%-32s" "Database data dir:")${CMSG}${db_data_dir}${CEND}"
@@ -1000,12 +999,12 @@ echo "Total OneinStack Install Time: ${CQUESTION}${installTime}${CEND} minutes"
 if [ ${ARG_NUM} == 0 ]; then
   while :; do echo
     echo "${CMSG}Please restart the server and see if the services start up fine.${CEND}"
-    read -p "Do you want to restart OS ? [y/n]: " restart_yn
-    if [[ ! "${restart_yn}" =~ ^[y,n]$ ]]; then
+    read -p "Do you want to restart OS ? [y/n]: " reboot_yn
+    if [[ ! "${reboot_yn}" =~ ^[y,n]$ ]]; then
       echo "${CWARNING}input error! Please only input 'y' or 'n'${CEND}"
     else
       break
     fi
   done
 fi
-[ "${restart_yn}" == 'y' ] && reboot
+[ "${reboot_yn}" == 'y' ] && reboot

+ 1 - 1
versions.txt

@@ -76,7 +76,7 @@ redis_ver=4.0.9
 redis_pecl_ver=4.0.0
 
 # Memcached
-memcached_ver=1.5.6
+memcached_ver=1.5.7
 libmemcached_ver=1.0.18
 memcached_pecl_ver=2.2.0
 memcached_pecl_php7_ver=3.0.4