Oneinstack basic use
- Oneinstack
- 1. Features of Oneinstack:
- 2. Oneinstack open source software version
- 3. Deployment and installation of oneinstall
- 3.1 download oneinstall
- 3.2 decompression and installation
- 3.3 operation install.sh
- Official website explanation chart:
- 3.4 installation process diagram:
- 4. Verify access
- 4.1. Visit php test page
- 4.2 visit ocp page
- 4.3. Visit xprober monitoring and detection page
- 4.4. Verify MySQL database password
- 4.5. Verify phpMyAdmin
- 5. Service configuration path
Oneinstack
1. Features of Oneinstack:
Continuous update to support interactive and unattended installation
Source code compilation and installation, most of the source code is the latest stable version, and downloaded from the official website
Multiple database versions are available (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)
Multiple PHP versions are available (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)
Provide Nginx, Tengine, OpenResty and nginx waf functions
Provides multiple versions of Apache (Apache-2.4, Apache-2.2)
Provide multiple versions of Tomcat (Tomcat-9, Tomcat-8, Tomcat-7, Tomcat-6)
Provide multiple JDK versions (JDK-11.0, JDK-1.8, JDK-1.7, JDK-1.6)
Install PHP cache accelerator according to your own requirements, and provide ZendOPcache, xcache, apcu and eAccelerator. And PHP encryption and decryption tools ionCube, ZendGuardLoader
Install Pureftpd and phpMyAdmin according to your own requirements
Install Memcached and Redis according to your own needs
jemalloc optimizes MySQL and Nginx
Provide add virtual host script
Provide upgrade scripts for Nginx/Tengine/OpenResty/Apache, PHP, Redis, Memcached, phpMyAdmin
Provide local backup, remote (rsync), Alibaba cloud OSS, Tencent cloud COS, remake cloud, qiniu cloud, Amazon S3 and Dropbox backup scripts
Provide HHVM installation under CentOS 6 and 7
2. Oneinstack open source software version
LNMP/LAMP website architecture was deployed almost every other period of time. Sometimes nginx mysql php needs to be installed for half an hour, especially the source code compilation and installation is longer. If you don't pay attention to the installation process, the service website will fail to run normally due to the configuration error. Later, I started to write the one click installation deployment script as follows:
This script also used to cost cigarettes, energy, time, ideas, and writing, which wasted too much time in the test. The disadvantage is that it is not flexible to choose the software version. It is also a headache that the instability in different operating systems leads to the failure of final deployment. The tool introduced today is a powerful shell script. The deployment is as follows:
3. Deployment and installation of oneinstall
Recommended to download cloud CDN, including source code http://mirrors.linuxeye.com/oneinstack-full.tar.gz http://mirrors.linuxeye.com/oneinstack-full-beta.tar.gz #beta version Foreign line (Linode Fremont, 10M/s), including source code http://mirrors.linuxeye.com/oneinstack-full.tar.gz Dropbox, including source code https://www.dropbox.com/s/iampc7prd9y7cqf/oneinstack-full.tar.gz sourceforge, including source code http://downloads.sourceforge.net/project/oneinstack/oneinstack-full.tar.gz European line, including source code https://mirrors.dtops.cc/linuxeye/oneinstack-full.tar.gz Do not include source code, it is recommended to download only from foreign hosts http://mirrors.linuxeye.com/oneinstack.tar.gz
3.1 download oneinstall
[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 decompression and installation
[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 operation 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
Official website explanation chart:
3.4 installation process diagram:
After installation, you will be prompted whether to restart the server. Select YES.
4. Verify access
4.1. Visit php test page
Open browser input: http://IP Address/ phpinfo.php The following screen appears
4.2 visit ocp page
Open browser input http://IP Address/ ocp.php The following screen appears:
4.3. Visit xprober monitoring and detection page
Open browser input: http://IP Address/ xprober.php The following screen appears:
4.3.1 verify xprober monitoring and detection
Use ab stress test tool to simulate the number of 2000 concurrent users to send 10000 requests to this server to view the xprober background cpu usage information.
[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. Verify MySQL database password
[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 database password source:
4.5. Verify phpMyAdmin
Open browser input: http://IP Address / phpMyAdmin / the following interface appears:
After login, you can add, delete, modify and query MySQL database.
5. Service configuration path
Nginx conf file path: / usr/local/nginx/conf/nginx.conf
PHP conf file path: / usr/local/php/etc/php-fpm.conf
MySQL conf file path / etc/my.cnf
The root directory path of the web page: / data/wwwroot/default / you can leave the php source page in this directory