Control center
Congratulations, OneinStack installed successfully!
Linux+Nginx/Tengine+MySQL/MariaDB/Percona+PHP+Pureftpd+phpMyAdmin+redis+memcached+jemalloc.
Tools
prober phpinfo phpMyAdmin OpcacheSteps
Dns analysis
Add virtual host
Create website
- Add virtual host: ./vhost.sh
- Del virtual host: ./vhost.sh --del
- Manage FTP account: ./pureftpd_vhost.sh
Deploy website
Online running
- phpMyAdmin
- Manage FTP account: ./pureftpd_vhost.sh
- Backup: ./backup_setup.sh
How to add a virtual host?
[root@WeiLiu ~]# sudo /root/oneinstack/vhost.sh ####################################################################### # LNMP for CentOS/RedHat 7+ Debian 9+ and Ubuntu 16+ # ####################################################################### What Are You Doing? 1. Use HTTP Only 2. Use your own SSL Certificate and Key 3. Use Let's Encrypt to Create SSL Certificate and Key q. Exit Please input the correct option: 3 Please input domain(example: www.example.com): demo.linuxeye.com domain=demo.linuxeye.com Please input the directory for the domain:demo.linuxeye.com : (Default directory: /data/wwwroot/demo.linuxeye.com): Virtual Host Directory=/data/wwwroot/demo.linuxeye.com Create Virtul Host directory...... set permissions of Virtual Host directory...... Do you want to add more domain name? [y/n]: y Type domainname or IP(example: example.com other.example.com): demo2.linuxeye.com domain list=demo2.linuxeye.com Do you want to redirect from demo2.linuxeye.com to demo.linuxeye.com? [y/n]: y Do you want to redirect all HTTP requests to HTTPS? [y/n]: y Please select domain cert key length. Enter one of 2048, 3072, 4096, 8192 will issue a RSA cert. Enter one of ec-256, ec-384, ec-521 will issue a ECC cert. Please enter your cert key length (default 2048): 2048 Please enter your email: [email protected] [Sun Oct 30 04:27:06 PM CST 2022] Create account key ok. [Sun Oct 30 04:27:06 PM CST 2022] No EAB credentials found for ZeroSSL, let's get one [Sun Oct 30 04:27:13 PM CST 2022] Registering account: https://acme.zerossl.com/v2/DV90 [Sun Oct 30 04:27:15 PM CST 2022] Could not get nonce, let's try again. [Sun Oct 30 04:27:39 PM CST 2022] Registered [Sun Oct 30 04:27:39 PM CST 2022] ACCOUNT_THUMBPRINT='LMG4Elq-AFm-IH17QAk3yjmp-8TNoxi__gWTIIT1tzY' .... [Sun Oct 30 04:28:20 PM CST 2022] Cert success. nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful Do you want to add hotlink protection? [y/n]: n Allow Rewrite rule? [y/n]: y Please input the rewrite of programme : wordpress,opencart,magento2,drupal,joomla,codeigniter,laravel thinkphp,pathinfo,discuz,typecho,ecshop,nextcloud,zblog,whmcs rewrite was exist. (Default rewrite: other): wordpress You choose rewrite=wordpress Allow Nginx/Tengine/OpenResty access_log? [y/n]: y You access log file=/data/wwwlogs/demo.linuxeye.com_nginx.log nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful Reload Nginx...... ####################################################################### # LNMP for CentOS/RedHat 7+ Debian 9+ and Ubuntu 16+ # ####################################################################### Your domain: demo.linuxeye.com Virtualhost conf: /usr/local/nginx/conf/vhost/demo.linuxeye.com.conf Directory of: /data/wwwroot/demo.linuxeye.com Rewrite rule: /usr/local/nginx/conf/rewrite/wordpress.conf Let's Encrypt SSL Certificate:/usr/local/nginx/conf/ssl/demo.linuxeye.com.crt SSL Private Key: /usr/local/nginx/conf/ssl/demo.linuxeye.com.key
How to delete a virtual host?
[root@WeiLiu ~]# sudo /root/oneinstack/vhost.sh --del ####################################################################### # LNMP for CentOS/RedHat 7+ Debian 9+ and Ubuntu 16+ # ####################################################################### Virtualhost list: demo1.linuxeye.com demo.linuxeye.com www.linuxeye.com Please input a domain you want to delete: demo.linuxeye.com Do you want to delete Virtul Host directory? [y/n]: y Press Ctrl+c to cancel or Press any key to continue... Domain: demo.linuxeye.com has been deleted.
FTP Client
FileZilla: Download address
How to add FTP virtual user?
[root@WeiLiu ~]# sudo /root/oneinstack/pureftpd_vhost.sh ####################################################################### # LNMP for CentOS/RedHat 7+ Debian 9+ and Ubuntu 16+ # # FTP virtual user account management # ####################################################################### What Are You Doing? 1. UserAdd #Tip: Add Ftp account 2. UserMod #Tip: Change the webroot directory permissions of an Ftp account 3. UserPasswd #Tip: Change a ftp password 4. UserDel #Tip: Delete a ftp account 5. ListAllUser #Tip: List all Ftp accounts 6. ShowUser #Tip: Display a Ftp account details q. Exit #Tip: Quit Please input the correct option: 1 Please input a username: ftpuser Please input the password: UArUDjLZ12HD Please input the directory(Default directory: /data/wwwroot): #Tip: ftpuser webroot directory, it is recommended to default, you can directly press Enter. Password: Enter it again: ##################################### [ftpuser] create successful! You user name is : ftpuser You Password is : UArUDjLZ12HD You directory is : /data/wwwroot
Database
How to backup?
[root@WeiLiu ~]# sudo /root/oneinstack/backup_setup.sh #Backup Set Parameters ####################################################################### # LNMP for CentOS/RedHat 7+ Debian 9+ and Ubuntu 16+ # # Setup the backup parameters # ####################################################################### Please select your backup destination: 1. Localhost 2. Remote host 3. Aliyun OSS 4. Qcloud COS 5. UPYUN 6. QINIU 7. Amazon S3 8. Dropbox Please input numbers:(Default 1 press Enter) 1 Please select your backup content: 1. Only Database 2. Only Website 3. Database and Website Please input a number:(Default 1 press Enter) 1 Please enter the directory for save the backup file: (Default directory: /data/backup): Please enter a valid backup number of days: (Default days: 5): 10 Please enter one or more name for database, separate multiple database names with commas: (Default database: linuxeye,weiliu) weiliu,linuxeye You have to backup the content: Database: weiliu,linuxeye
sudo /root/oneinstack/backup.sh #Perform the backup immediately sudo echo '0 1 * * * sudo /root/oneinstack/backup.sh > /dev/null 2>&1' >> /var/spool/cron/root #Setup scheduled tasks to automatically schedule backup, Set up a daily backup at 1am
How to manage service?
Nginx/Tengine/OpenResty:
systemctl {start|stop|status|restart|reload} nginx
MySQL/MariaDB/Percona:
systemctl {start|stop|restart|reload|status} mysqld
PostgreSQL:
systemctl {start|stop|restart|status} postgresql
MongoDB:
systemctl {start|stop|status|restart|reload} mongod
PHP:
systemctl {start|stop|restart|reload|status} php-fpm
Apache:
systemctl {start|restart|stop} httpd
Tomcat:
systemctl {start|stop|status|restart} tomcat
Pure-Ftpd:
systemctl {start|stop|restart|status} pureftpd
Redis:
systemctl {start|stop|status|restart|reload} redis-server
Memcached:
systemctl {start|stop|status|restart|reload} memcached
How to upgrade?
[root@WeiLiu ~]# sudo /root/oneinstack/upgrade.sh -h ####################################################################### # LNMP for CentOS/RedHat 7+ Debian 9+ and Ubuntu 16+ # # Upgrade Software versions for OneinStack # ####################################################################### 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 [root@WeiLiu ~]# sudo /root/oneinstack/upgrade.sh ####################################################################### # LNMP for CentOS/RedHat 7+ Debian 9+ and Ubuntu 16+ # # Upgrade Software versions for OneinStack # ####################################################################### What Are You Doing? 1. Upgrade Nginx/Tengine/OpenResty 2. Upgrade Apache 3. Upgrade Tomcat 4. Upgrade MySQL/MariaDB/Percona 5. Upgrade PHP 6. Upgrade Redis 7. Upgrade Memcached 8. Upgrade phpMyAdmin 9. Upgrade OneinStack latest 10. Upgrade acme.sh latest q. Exit Please input the correct option: q
How to uninstall?
[root@WeiLiu ~]# sudo /root/oneinstack/uninstall.sh -h ####################################################################### # LNMP for CentOS/RedHat 7+ Debian 9+ and Ubuntu 16+ # # Uninstall # ####################################################################### 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 --postgresql Uninstall PostgreSQL --mongodb Uninstall MongoDB --php Uninstall PHP (PATH: /usr/local/php) --mphp_ver [53~81] Uninstall another PHP version (PATH: /usr/local/php${mphp_ver}) --allphp Uninstall all PHP --phpcache Uninstall PHP opcode cache --php_extensions [ext name] Uninstall PHP extensions, include zendguardloader,ioncube, sourceguardian,imagick,gmagick,fileinfo,imap,ldap,calendar,phalcon, yaf,yar,redis,memcached,memcache,mongodb,swoole,xdebug --pureftpd Uninstall PureFtpd --redis Uninstall Redis-server --memcached Uninstall Memcached-server --phpmyadmin Uninstall phpMyAdmin --nodejs Uninstall Nodejs (PATH: /usr/local/node) [root@WeiLiu ~]# sudo /root/oneinstack/uninstall.sh ####################################################################### # LNMP for CentOS/RedHat 7+ Debian 9+ and Ubuntu 16+ # # Uninstall # ####################################################################### What Are You Doing? 0. Uninstall All 1. Uninstall Nginx/Tengine/OpenResty/Apache/Tomcat 2. Uninstall MySQL/MariaDB/Percona 3. Uninstall PostgreSQL 4. Uninstall MongoDB 5. Uninstall all PHP 6. Uninstall PHP opcode cache 7. Uninstall PHP extensions 8. Uninstall PureFtpd 9. Uninstall Redis 10. Uninstall Memcached 11. Uninstall phpMyAdmin 12. Uninstall Nodejs (PATH: /usr/local/node) q. Exit Please input the correct option: q
You must specify port numbers (for TCP):
- ssh: 22
- http: 80
- https: 443
- ftp: 21, 20000~30000
Telegram Group: t.me/oneinstack