自动模式使用教程

Welcome to OneinStack 2019,请执行./upgrade.sh, 选择升级OneinStack,您拥有以下功能

install.sh自动模式

OneinStack同时支持《交互安装模式》和《自动安装模式》,后者可通过页面获取命令一键安装环境。两者安装环境一样,不存在交互模式安装性能好,自动模式性能差等问题,交互模式是一步步选择(重复y、n键盘输入)后安装,而自动模式是在页面选择你需要的组件,生成命令一键安装,强烈推荐使用自动模式。

原有addons.sh中安装PHP相关扩展全部迁移集成到install.sh,如果第一次安装PHP没有安装扩展,可通过./install.sh交互或者自动模式再次安装您需要的组件。
想用某个组件请使用./install.sh, 想卸载某个组件请使用./uninstall.sh。

[email protected]:~# ./install.sh -h

#######################################################################
#       OneinStack for CentOS/RedHat 6+ Debian 7+ and Ubuntu 12+      #
#       For more information please visit https://oneinstack.com      #
#######################################################################
version: 2.0
updated date: 2019-01-01
Usage: /root/oneinstack/install.sh  command ...[parameters]....
  --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
  --php_option [1-8]          Install PHP version
  --phpcache_option [1-4]     Install PHP opcode cache, default: 1 opcache
  --php_extensions [ext name] Install PHP extensions, include zendguardloader,ioncube,
                              sourceguardian,imagick,gmagick,fileinfo,imap,phalcon,
                              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
  --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
  --ssh_port [22]             SSH port, default: 22
  --iptables                  Enable iptables
  --reboot                    Restart the server after installation

更多安装参数参考:https://oneinstack.com/faq/argv/

uninstall.sh自动模式

./install.sh安装后,不用某个组件可使用uninstall.sh卸载它
如:安静的删除PHP扩展imagick和memcache,命令如下:

./uninstall.sh --php_extensions imagick,memcache -q

更多参数参考如下:

[email protected]:~# /root/oneinstack/uninstall.sh -h

#######################################################################
#       OneinStack for CentOS/RedHat 6+ Debian 7+ and Ubuntu 12+      #
#                         Uninstall OneinStack                        #
#       For more information please visit https://oneinstack.com      #
#######################################################################

Usage: /root/oneinstack/uninstall.sh  command ...[parameters]....
  --help, -h                    Show this help message, More: https://oneinstack.com
  --quiet, -q                   quiet operation
  --all                         Uninstall All
  --web                         Uninstall Nginx/Tengine/OpenResty/Apache/Tomcat
  --mysql                       Uninstall MySQL/MariaDB/Percona/AliSQL
  --postgresql                  Uninstall PostgreSQL
  --mongodb                     Uninstall MongoDB
  --php                         Uninstall PHP
  --phpcache                    Uninstall PHP opcode cache
  --php_extensions [ext name]   Uninstall PHP extensions, include zendguardloader,ioncube,
                                sourceguardian,imagick,gmagick,fileinfo,imap,phalcon,
                                redis,memcached,memcache,mongodb,swoole,xdebug
  --hhvm                        Uninstall HHVM
  --pureftpd                    Uninstall PureFtpd
  --redis                       Uninstall Redis-server
  --memcached                   Uninstall Memcached-server
  --phpmyadmin                  Uninstall phpMyAdmin

upgrade.sh自动模式

如升级OneinStack脚本,命令如下:
注意:老版本请用./upgrade.sh交互模式升级oneinstack之后,才支持以下参数,

./upgrade.sh --oneinstack

如升级nginx到1.15.8版本,命令如下:

./upgrade.sh --nginx 1.15.8

更多参数参考如下:

[email protected]:~# /root/oneinstack/upgrade.sh -h

#######################################################################
#       OneinStack for CentOS/RedHat 6+ Debian 7+ and Ubuntu 12+      #
#              Upgrade Software versions for OneinStack               #
#       For more information please visit https://oneinstack.com      #
#######################################################################

Usage: /root/oneinstack/upgrade.sh  command ...[version]....
  --help, -h                  Show this help message
  --nginx        [version]    Upgrade Nginx
  --tengine      [version]    Upgrade Tengine
  --openresty    [version]    Upgrade OpenResty
  --apache       [version]    Upgrade Apache
  --tomcat       [version]    Upgrade Tomcat
  --db           [version]    Upgrade MySQL/MariaDB/Percona
  --php          [version]    Upgrade PHP
  --redis        [version]    Upgrade Redis
  --memcached    [version]    Upgrade Memcached
  --phpmyadmin   [version]    Upgrade phpMyAdmin
  --oneinstack                Upgrade OneinStack latest
  --acme.sh                   Upgrade acme.sh latest

addons.sh自动模式

如安装ngx_lua_waf,命令如下:

./addons.sh --install --ngx_lua_waf

更多参数参考如下:

[email protected]:~# /root/oneinstack/addons.sh -h

#######################################################################
#       OneinStack for CentOS/RedHat 6+ Debian 7+ and Ubuntu 12+      #
#                    Install/Uninstall Extensions                     #
#       For more information please visit https://oneinstack.com      #
#######################################################################

Usage: /root/oneinstack/addons.sh  command ...
  --help, -h                  Show this help message
  --install, -i               Install
  --uninstall, -u             Uninstall
  --composer                  Composer
  --fail2ban                  Fail2ban
  --ngx_lua_waf               Ngx_lua_waf
  --python                    Python3.6

pureftpd_vhost.sh自动模式

如新增账号:yeho 密码:[email protected] 网站根目录:/data/wwwroot,命令如下:

./pureftpd_vhost.sh --useradd --username yeho --password [email protected] -d /data/wwwroot

更多参数参考如下:

[email protected]:~# /root/oneinstack/pureftpd_vhost.sh -h

#######################################################################
#       OneinStack for CentOS/RedHat 6+ Debian 7+ and Ubuntu 12+      #
#                 FTP virtual user account management                 #
#       For more information please visit https://oneinstack.com      #
#######################################################################

Usage: /root/oneinstack/pureftpd_vhost.sh  command ...[parameters]....
  --help, -h                          Show this help message
  --useradd,--add                     Add username
  --usermod                           Modify directory
  --passwd                            Modify password
  --userdel,--delete                  Delete User
  --listalluser,--list                List all User
  --showuser                          List User details
  --username,-u     [ftp username]    Ftp username
  --password,-p     [ftp password]    Ftp password
  --directory,-d,-D [ftp directory]   Ftp home directory