强大的一键部署网站架构工具Oneinstack

Oneinstack

1、Oneinstack的特性:


持续不断更新,支持交互、无人值守安装
源码编译安装,大多数源码是最新stable版,并从官方网址下载
提供多个数据库版本(MySQL-8.0, MySQL-5.7, MySQL-5.6, MySQL-5.5, MariaDB-10.4,MariaDB-10.3,MariaDB-10.2,MariaDB-5.5,Percona-8.0, Percona-5.7, Percona-5.6, Percona-5.5,AliSQL-5.6,PostgreSQL, MongoDB)
提供多个PHP版本(PHP-7.4,PHP-7.3,PHP-7.2,PHP-7.1,PHP-7.0,PHP-5.6, PHP-5.5,PHP-5.4,PHP-5.3)
提供Nginx、Tengine、OpenResty和nginx waf功能
提供多个Apache版本(Apache-2.4,Apache-2.2)
提供多个Tomcat版本(Tomcat-9,Tomcat-8,Tomcat-7,Tomcat-6)
提供多个JDK版本(JDK-11.0,JDK-1.8,JDK-1.7,JDK-1.6)
根据自己需求安装PHP缓存加速器,提供ZendOPcache、xcache、apcu、eAccelerator。及php加解密工具ionCube、ZendGuardLoader
根据自己需求安装Pureftpd、phpMyAdmin
根据自己需求安装Memcached、Redis
jemalloc优化MySQL、Nginx
提供添加虚拟主机脚本
提供Nginx/Tengine/OpenResty/Apache、PHP、Redis、Memcached、phpMyAdmin升级脚本
提供本地备、远程(rsync)、阿里云OSS、腾讯云COS、又拍云、七牛云、亚马逊S3和Dropbox备份脚本
提供CentOS 6、7下HHVM安装

2、Oneinstack开源软件版本


在这里插入图片描述
在之前几乎隔一段时间部署LNMP/LAMP网站架构,有时候nginx mysql php需要装半个小时,尤其是源码编译安装更加长久,在安装的过程中稍有不留意就会配错导致服务网站无法正常运行。 后来自己慢慢开始写一键安装部署脚本如下:
在这里插入图片描述
这个脚本也是曾经费烟,费精力,费时间,加上思路构想,加上编写,在测试一共下来浪费了太多的时间,缺点是还不能灵活性的选择软件版本。放在不同的操作系统中出现不稳定现象导致最后部署失败的局面也真是让人头疼。 今天介绍的这个工具是一个强大的shell脚本。 部署如下:

3、Oneinstack的部署安装


推荐又拍云CDN下载,包含源码
http://mirrors.linuxeye.com/oneinstack-full.tar.gz
http://mirrors.linuxeye.com/oneinstack-full-beta.tar.gz #beta版本


国外线路(Linode Fremont,10M/s),包含源码
http://mirrors.linuxeye.com/oneinstack-full.tar.gz


Dropbox,包含源码
https://www.dropbox.com/s/iampc7prd9y7cqf/oneinstack-full.tar.gz


sourceforge,包含源码
http://downloads.sourceforge.net/project/oneinstack/oneinstack-full.tar.gz


欧洲线路,包含源码
https://mirrors.dtops.cc/linuxeye/oneinstack-full.tar.gz


不包含源码,建议仅国外主机下载
http://mirrors.linuxeye.com/oneinstack.tar.gz

3.1、下载oneinstack

[root@yankerp ~]# wget http://mirrors.linuxeye.com/oneinstack-full.tar.gz
--2020-06-07 09:34:44--  http://mirrors.linuxeye.com/oneinstack-full.tar.gz
Resolving mirrors.linuxeye.com (mirrors.linuxeye.com)... 223.85.20.154, 183.236.31.250, 2409:8c54:b000:704:4cb3:fbff:fe07:e72d, ...
Connecting to mirrors.linuxeye.com (mirrors.linuxeye.com)|223.85.20.154|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 325082415 (310M) [application/octet-stream]
Saving to: ‘oneinstack-full.tar.gz’

100%[=============================================================================================================================================>] 325,082,415 2.27MB/s   in 3m 50s 

2020-06-07 09:38:35 (1.35 MB/s) - ‘oneinstack-full.tar.gz’ saved [325082415/325082415]

3.2、解压安装

[root@yankerp ~]# tar zxf oneinstack-full.tar.gz 
[root@yankerp ~]# cd  oneinstack
[root@yankerp oneinstack]# ll
total 264
-rwxr-xr-x. 1 root root  5865 May 30 23:31 addons.sh
-rwxr-xr-x. 1 root root 24795 May 30 23:31 backup_setup.sh
-rwxr-xr-x. 1 root root 11347 May 30 23:31 backup.sh
drwxr-xr-x. 2 root root  4096 May 30 23:31 config
drwxr-xr-x. 2 root root  4096 May 30 23:31 include
drwxr-xr-x. 2 root root  4096 May 30 23:31 init.d
-rwxr-xr-x. 1 root root 50927 May 30 23:31 install.sh
-rw-r--r--. 1 root root 11358 May 30 23:31 LICENSE
-rw-r--r--. 1 root root  2569 May 30 23:31 options.conf
-rwxr-xr-x. 1 root root  7760 May 30 23:31 pureftpd_vhost.sh
-rw-r--r--. 1 root root  4936 May 30 23:31 README.md
-rwxr-xr-x. 1 root root  4938 May 30 23:31 reset_db_root_password.sh
drwxr-xr-x. 2 root root  4096 May 30 23:31 src
drwxr-xr-x. 2 root root  4096 May 30 23:31 tools
-rwxr-xr-x. 1 root root 30445 May 30 23:31 uninstall.sh
-rwxr-xr-x. 1 root root  5782 May 30 23:31 upgrade.sh
-rw-r--r--. 1 root root  2044 May 30 23:31 versions.txt
-rwxr-xr-x. 1 root root 53382 May 30 23:31 vhost.sh
[root@yankerp oneinstack]# 

3.3、运行install.sh

Please input SSH port(Default: 22): 

Do you want to enable iptables? [y/n]: n

Do you want to install Web server? [y/n]: y

Please select Nginx server:
	1. Install Nginx
	2. Install Tengine
	3. Install OpenResty
	4. Do not install
Please input a number:(Default 1 press Enter) 1

Please select Apache server:
	1. Install Apache-2.4
	2. Install Apache-2.2
	3. Do not install
Please input a number:(Default 3 press Enter) 3

Please select tomcat server:
	1. Install Tomcat-9
	2. Install Tomcat-8
	3. Install Tomcat-7
	4. Install Tomcat-6
	5. Do not install
Please input a number:(Default 5 press Enter) 5

Do you want to install Database? [y/n]: y

Please select a version of the Database:
	 1. Install MySQL-8.0
	 2. Install MySQL-5.7
	 3. Install MySQL-5.6
	 4. Install MySQL-5.5
	 5. Install MariaDB-10.4
	 6. Install MariaDB-10.3
	 7. Install MariaDB-10.2
	 8. Install MariaDB-5.5
	 9. Install Percona-8.0
	10. Install Percona-5.7
	11. Install Percona-5.6
	12. Install Percona-5.5
	13. Install AliSQL-5.6
	14. Install PostgreSQL
	15. Install MongoDB
Please input a number:(Default 2 press Enter) 2
Please input the root password of MySQL(default: 5vVS1ruk): pwd123

Please choose installation of the database:
	1. Install database from binary package.
	2. Install database from source package.
Please input a number:(Default 1 press Enter) 1

Do you want to install PHP? [y/n]: y

Please select a version of the PHP:
	1. Install php-5.3
	2. Install php-5.4
	3. Install php-5.5
	4. Install php-5.6
	5. Install php-7.0
	6. Install php-7.1
	7. Install php-7.2
	8. Install php-7.3
	9. Install php-7.4
Please input a number:(Default 7 press Enter) 5

Do you want to install opcode cache of the PHP? [y/n]: y
Please select a opcode cache of the PHP:
	1. Install Zend OPcache
	3. Install APCU
Please input a number:(Default 1 press Enter) 1

Please select PHP extensions:
	 0. Do not install
	 1. Install zendguardloader(PHP<=5.6)
	 2. Install ioncube
	 3. Install sourceguardian(PHP<=7.2)
	 4. Install imagick
	 5. Install gmagick
	 6. Install fileinfo
	 7. Install imap
	 8. Install ldap
	 9. Install phalcon(PHP>=5.5)
	10. Install yaf(PHP>=7.0)
	11. Install redis
	12. Install memcached
	13. Install memcache
	14. Install mongodb
	15. Install swoole
	16. Install xdebug(PHP>=5.5)
Please input numbers:(Default '4 11 12' press Enter) 0

Do you want to install Pure-FTPd? [y/n]: n

Do you want to install phpMyAdmin? [y/n]: y

Do you want to install redis-server? [y/n]: n

Do you want to install memcached-server? [y/n]: n

Do you want to install HHVM? [y/n]: n

官网解释图:

在这里插入图片描述

3.4、安装过程图:

在这里插入图片描述
安装完成后,会提示是否重新启动服务器,选 YES即可。

4、验证访问

4.1、访问php测试页

打开浏览器输入:http://IP地址/phpinfo.php出现以下界面
在这里插入图片描述

4.2、访问ocp页面

打开浏览器输入http://IP地址/ocp.php出现以下界面:
在这里插入图片描述

4.3、访问xprober监控检测页面

打开浏览器输入:http://IP地址/xprober.php出现以下界面:
在这里插入图片描述

4.3.1、验证xprober监控检测

使用ab压力测试工具,模拟2000个并发用户数对此服务器发送10000个请求,查看xprober后台cpu占用信息。

[root@yankerp ~]# ab -n 10000 -c 2000 192.168.31.196/xprober.php
This is ApacheBench, Version 2.3 <$Revision: 1430300 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 192.168.31.196 (be patient)
Completed 1000 requests
Completed 2000 requests
Completed 3000 requests
Completed 4000 requests
Completed 5000 requests
Completed 6000 requests
Completed 7000 requests
Completed 8000 requests
Completed 9000 requests

在这里插入图片描述

4.4、验证MySQL数据库密码

[root@yankerp ~]# mysql -uroot -ppwd123
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.7.30-log MySQL Community Server (GPL)

Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MySQL [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| sys                |
+--------------------+
4 rows in set (0.21 sec)

在这里插入图片描述
MySQL数据库密码来源:
在这里插入图片描述

4.5、验证phpMyAdmin

打开浏览器输入:http://IP地址/phpMyAdmin/出现以下界面:
在这里插入图片描述
登录成功后即可对MySQL数据库进行增删改查操作。
在这里插入图片描述

5、服务配置路径


Nginx conf文件路径:/usr/local/nginx/conf/nginx.conf
PHP conf 文件路径:/usr/local/php/etc/php-fpm.conf
MySQL conf 文件路径:/etc/my.cnf
网页根目录路径:/data/wwwroot/default/ 有php源码网页可以丢在此目录下

猜你喜欢

转载自blog.csdn.net/qq_39591494/article/details/106594674