Browse Source

Update apps.conf and README.md

lj2007331 9 years ago
parent
commit
5a9c136f72
5 changed files with 46 additions and 43 deletions
  1. 39 35
      README.md
  2. 1 1
      init/init_CentOS.sh
  3. 1 1
      install.sh
  4. 1 1
      pureftpd_vhost.sh
  5. 4 5
      uninstall.sh

+ 39 - 35
README.md

@@ -1,6 +1,6 @@
-    This script is written using the shell, in order to quickly deploy `LEMP`/`LAMP`/`LNMP` / `LNMPA`(Linux, Nginx/Tengine, MySQL in a production environment/MariaDB/Percona, PHP, JAVA), applicable to CentOS 5~7(including redhat), Debian 6~8, Ubuntu 12.04~15.04 of 32 and 64.
+This script is written using the shell, in order to quickly deploy `LEMP`/`LAMP`/`LNMP` / `LNMPA`(Linux, Nginx/Tengine, MySQL in a production environment/MariaDB/Percona, PHP, JAVA), applicable to CentOS 5~7(including redhat), Debian 6~8, Ubuntu 12.04~15.04 of 32 and 64.
 
-    Script properties:
+Script properties:
 - Continually updated
 - Source compiler installation, most stable source is the latest version, and download from the official site
 - Some security optimization
@@ -22,92 +22,96 @@
 ## How to use 
 If your server system: CentOS/Redhat (Do not enter "//" and "// subsequent sentence)
 ```bash
-   yum -y install wget screen   // for CentOS / Redhat
-   wget http://mirrors.linuxeye.com/oneinstack-full.tar.gz   // Contains the source code
-   tar xzf oneinstack-full.tar.gz
-   cd oneinstack    // If you need to modify the directory (installation, data storage, Nginx logs), modify options.conf file
-   screen -S oneinstack    // If network interruption, you can execute the command `screen -r oneinstack` reconnect install window
-   ./install.sh   // Do not sh install.sh or bash install.sh such execution
+yum -y install wget screen   // for CentOS / Redhat
+wget http://mirrors.linuxeye.com/oneinstack-full.tar.gz   // Contains the source code
+tar xzf oneinstack-full.tar.gz
+cd oneinstack    // If you need to modify the directory (installation, data storage, Nginx logs), modify options.conf file
+screen -S oneinstack    // If network interruption, you can execute the command `screen -r oneinstack` reconnect install window
+./install.sh   // Do not sh install.sh or bash install.sh such execution
 ```
 If your server system: Debian/Ubuntu (Do not enter "//" and "// subsequent sentence)
 ```bash
-   apt-get -y install wget screen    // for Debian / Ubuntu
-   wget http://mirrors.linuxeye.com/oneinstack-full.tar.gz   // Contains the source code
-   tar xzf oneinstack-full.tar.gz
-   cd oneinstack    // If you need to modify the directory (installation, data storage, Nginx logs), modify options.conf file
-   screen -S oneinstack    // If network interruption, you can execute the command `screen -r oneinstack` reconnect install window
-   ./install.sh   // Do not sh install.sh or bash install.sh such execution
+apt-get -y install wget screen    // for Debian / Ubuntu
+wget http://mirrors.linuxeye.com/oneinstack-full.tar.gz   // Contains the source code
+tar xzf oneinstack-full.tar.gz
+cd oneinstack    // If you need to modify the directory (installation, data storage, Nginx logs), modify options.conf file
+screen -S oneinstack    // If network interruption, you can execute the command `screen -r oneinstack` reconnect install window
+./install.sh   // Do not sh install.sh or bash install.sh such execution
 ```
 
 ## How to add a virtual host
 
 ```bash
-   cd ~/oneinstack    // Must enter the directory execution under oneinstack
-   ./vhost.sh    // Do not sh vhost.sh or bash vhost.sh such execution
+cd ~/oneinstack    // Must enter the directory execution under oneinstack
+./vhost.sh    // Do not sh vhost.sh or bash vhost.sh such execution
 ```
 
 ## How to add FTP virtual user
 
 ```bash
-   cd ~/oneinstack
-   ./pureftpd_vhost.sh
+cd ~/oneinstack
+./pureftpd_vhost.sh
 ```
 
 ## How to backup
 
 ```bash
-   cd ~/oneinstack
-   ./backup_setup.sh    // Backup parameters
-   ./backup.sh    // Perform the backup immediately
-   crontab -l    // Can be added to scheduled tasks, such as automatic backups every day 1:00
-     0 1 * * * cd ~/oneinstack;./backup.sh  > /dev/null 2>&1 &
+cd ~/oneinstack
+./backup_setup.sh    // Backup parameters
+./backup.sh    // Perform the backup immediately
+crontab -l    // Can be added to scheduled tasks, such as automatic backups every day 1:00
+  0 1 * * * cd ~/oneinstack;./backup.sh  > /dev/null 2>&1 &
 ```
 
 ## How to manage service
 Nginx/Tengine:
 ```bash
-   service nginx {start|stop|status|restart|reload|configtest}
+service nginx {start|stop|status|restart|reload|configtest}
 ```
 MySQL/MariaDB/Percona:
 ```bash
-   service mysqld {start|stop|restart|reload|status}
+service mysqld {start|stop|restart|reload|status}
 ```
 PHP:
 ```bash
-   service php-fpm {start|stop|restart|reload|status}
+service php-fpm {start|stop|restart|reload|status}
+```
+HHVM:
+```bash
+service supervisord {start|stop|status|restart|reload}
 ```
 Apache:
 ```bash
-   service httpd {start|restart|stop}
+service httpd {start|restart|stop}
 ```
 Tomcat:
 ```bash
-   service tomcat {start|stop|status|restart} 
+service tomcat {start|stop|status|restart} 
 ```
 Pure-Ftpd:
 ```bash
-   service pureftpd {start|stop|restart|status}
+service pureftpd {start|stop|restart|status}
 ```
 Redis:
 ```bash
-   service redis-server {start|stop|status|restart|reload}
+service redis-server {start|stop|status|restart|reload}
 ```
 Memcached:
 ```bash
-   service memcached {start|stop|status|restart|reload}
+service memcached {start|stop|status|restart|reload}
 ```
 
 ## How to upgrade 
 ```bash
-   ./upgrade.sh
+./upgrade.sh
 ```
 
 ## How to uninstall 
 
 ```bash
-   ./uninstall.sh
+./uninstall.sh
 ```
 
 ## Installation
-   For feedback, questions, and to follow the progress of the project (Chinese): <br />
-   [OneinStack](http://oneinstack.com)<br />
+For feedback, questions, and to follow the progress of the project (Chinese): <br />
+[OneinStack](http://oneinstack.com)<br />

+ 1 - 1
init/init_CentOS.sh

@@ -46,7 +46,7 @@ yum check-update
 [ "$upgrade_yn" == 'y' ] && yum -y upgrade
 
 # Install needed packages
-for Package in gcc gcc-c++ make cmake autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel libaio readline-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5-devel libidn libidn-devel openssl openssl-devel libxslt-devel libevent-devel libtool libtool-ltdl bison gd-devel vim-enhanced pcre-devel zip unzip ntpdate sysstat patch bc expect rsync git
+for Package in deltarpm gcc gcc-c++ make cmake autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel libaio readline-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5-devel libidn libidn-devel openssl openssl-devel libxslt-devel libevent-devel libtool libtool-ltdl bison gd-devel vim-enhanced pcre-devel zip unzip ntpdate sysstat patch bc expect rsync git
 do
 	yum -y install $Package
 done

+ 1 - 1
install.sh

@@ -345,7 +345,7 @@ else
                                                 (( ${#xcache_admin_pass} >= 5 )) && { xcache_admin_md5_pass=`echo -n "$xcache_admin_pass" | md5sum | awk '{print $1}'` ; break ; } || echo -e "\033[31mxcache admin password least 5 characters! \033[0m"
                                         done
                                 fi
-				if [ "$PHP_version" != '5' ];then
+				if [ "$PHP_version" != '5' -a "$PHP_cache" != '1' ];then
                                         while :
                                         do
                                                 echo

+ 1 - 1
pureftpd_vhost.sh

@@ -87,7 +87,7 @@ do
 \t\033[32mq\033[0m. Exit"
 	read -p "Please input the correct option: " Number 
 	if [ "$Number" != '1' -a "$Number" != '2' -a "$Number" != '3' -a "$Number" != '4' -a "$Number" != '5' -a "$Number" != '6' -a "$Number" != 'q' ];then
-		echo -e "\033[31minput error! Please only input 1 ~ 8 and q\033[0m"
+		echo -e "\033[31minput error! Please only input 1 ~ 6 and q\033[0m"
 	else
 	case "$Number" in
 	1)

+ 4 - 5
uninstall.sh

@@ -36,15 +36,14 @@ Uninstall()
 [ -e "$memcached_install_dir" ] && service memcached stop && rm -rf /etc/init.d/memcached
 [ -e "/usr/local/imagemagick" ] && rm -rf /usr/local/imagemagick 
 [ -e "/usr/local/graphicsmagick" ] && rm -rf /usr/local/graphicsmagick 
-[ -e "/etc/init.d/supervisord" ] && service supervisord stop && { rm -rf /etc/supervisord.conf; /etc/init.d/supervisord; } 
-[ -e "/etc/systemd/system/hhvm.service" ] && service hhvm stop && { rpm -e hhvm ;rm -rf /etc/systemd/system/hhvm.service /etc/hhvm /var/log/hhvm; } 
-[ -e "/etc/init.d/hhvm" ] && service hhvm stop && { rpm -e hhvm ;rm -rf /etc/init.d/hhvm /etc/hhvm /var/log/hhvm; } 
+[ -e "/etc/init.d/supervisord" ] && service supervisord stop && { rm -rf /etc/supervisord.conf /etc/init.d/supervisord; } 
+[ -e "/usr/bin/hhvm" ] && { rpm -e hhvm ; rm -rf /etc/hhvm /var/log/hhvm; }
 id -u $run_user >/dev/null 2>&1 ; [ $? -eq 0 ] && userdel $run_user
 id -u mysql >/dev/null 2>&1 ; [ $? -eq 0 ] && userdel mysql 
 
 /bin/mv ${wwwroot_dir}{,_$(date +%F)}
 /bin/mv ${db_data_dir}{,_$(date +%F)}
-for D in `cat ./options.conf | grep dir= | grep -v oneinstack | awk -F'=' '{print $2}' | sort | uniq`
+for D in `cat ./options.conf | grep dir= | grep -v oneinstack | grep -v backup_dir | awk -F'=' '{print $2}' | sort | uniq`
 do
         [ -e "$D" ] && rm -rf $D
 done
@@ -75,7 +74,7 @@ echo
 echo -e "\033[31mYou will uninstall OneinStack, Please backup your configure files and DB data! \033[0m"
 echo 
 echo -e "\033[33mThe following directory or files will be remove: \033[0m"
-for D in `cat ./options.conf | grep dir= | grep -v oneinstack | awk -F'=' '{print $2}' | sort | uniq` 
+for D in `cat ./options.conf | grep dir= | grep -v oneinstack | grep -v backup_dir | awk -F'=' '{print $2}' | sort | uniq` 
 do
 	[ -e "$D" ] && echo $D
 done