控制中心
祝贺您,镜像环境安装成功!
Linux+Nginx+MySQL+PHP+Pureftpd+phpMyAdmin+redis+memcached+jemalloc.
在线文档(请收藏): 《LNMP环境镜像使用手册》
主机工具
探针 phpinfo phpMyAdmin Opcache基本使用步骤
域名解析
新建虚拟主机
部署网站
如何添加虚拟主机?
[root@WeiLiu ~]# sudo /root/oneinstack/vhost.sh ####################################################################### # OneinStack for CentOS/RedHat 7+ Debian 9+ and Ubuntu 16+ # # For more information please visit https://oneinstack.com # ####################################################################### What Are You Doing? 1. Use HTTP Only #注解: 1. 仅配置http 2. Use your own SSL Certificate and Key #注解: 2. 自己购买ssl替换,自动配置http、https 3. Use Let's Encrypt to Create SSL Certificate and Key #注解: 3. Let's 免费证书,自动配置http、https q. Exit #注解: 4. 退出 Please input the correct option: 3 Please input domain(example: www.example.com): demo.oneinstack.com #注解: 添加的虚拟主机域名 domain=demo.oneinstack.com Please input the directory for the domain:demo.oneinstack.com : (Default directory: /data/wwwroot/demo.oneinstack.com): #注解: 网站根目录(绝对路径) Virtual Host Directory=/data/wwwroot/demo.oneinstack.com Create Virtul Host directory...... set permissions of Virtual Host directory...... Do you want to add more domain name? [y/n]: y #注解: 是否添加更多域名或IP访问同一个网站根目录 Type domainname or IP(example: example.com other.example.com): demo2.oneinstack.com #注解: 输入域名或IP(添加多个以空格隔开) domain list=demo2.oneinstack.com Do you want to redirect from demo2.oneinstack.com to demo.oneinstack.com? [y/n]: y #注解: 是否设置301跳转,浏览器访问demo2.oneinstack.com时,强制跳转至demo.oneinstack.com Do you want to redirect all HTTP requests to HTTPS? [y/n]: y #注解: 是否设置http强制跳转至https协议 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: lj2007331@mail.com #注解: 输入邮箱 [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 #注解: 显示为内置为伪静态规则(可手工输入名字),文件位置:/usr/local/nginx/conf/rewrite/wordpress.conf You choose rewrite=wordpress Allow Nginx/Tengine/OpenResty access_log? [y/n]: y #注解: 是否记录访问日志 You access log file=/data/wwwlogs/demo.oneinstack.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...... ####################################################################### # OneinStack for CentOS/RedHat 7+ Debian 9+ and Ubuntu 16+ # # For more information please visit https://oneinstack.com # ####################################################################### Your domain: demo.oneinstack.com Virtualhost conf: /usr/local/nginx/conf/vhost/demo.oneinstack.com.conf Directory of: /data/wwwroot/demo.oneinstack.com Rewrite rule: /usr/local/nginx/conf/rewrite/wordpress.conf Let's Encrypt SSL Certificate:/usr/local/nginx/conf/ssl/demo.oneinstack.com.crt SSL Private Key: /usr/local/nginx/conf/ssl/demo.oneinstack.com.key
如何删除虚拟主机?
[root@WeiLiu ~]# sudo /root/oneinstack/vhost.sh --del ####################################################################### # OneinStack for CentOS/RedHat 7+ Debian 9+ and Ubuntu 16+ # # For more information please visit https://oneinstack.com # ####################################################################### Virtualhost list: #注解: 已经绑定域名 demo1.oneinstack.com demo.oneinstack.com www.linuxeye.com Please input a domain you want to delete: demo.oneinstack.com #注解: 删除demo.oneinstack.com域名虚拟主机 Do you want to delete Virtul Host directory? [y/n]: y #注解: 是否删除网站根目录,注意备份 Press Ctrl+c to cancel or Press any key to continue... #注解: 按Ctrl+c取消,人已经继续执行 Domain: demo.oneinstack.com has been deleted.
FTP客户端推荐
FileZilla: 下载地址
如何管理FTP账号?
[root@WeiLiu ~]# sudo /root/oneinstack/pureftpd_vhost.sh ####################################################################### # OneinStack for CentOS/RedHat 7+ Debian 9+ and Ubuntu 16+ # # FTP virtual user account management # # For more information please visit https://oneinstack.com # ####################################################################### What Are You Doing? 1. UserAdd #注解: 添加Ftp账号 2. UserMod #注解: 更改某个Ftp账号根目录权限 3. UserPasswd #注解: 更改某个Ftp密码 4. UserDel #注解: 删除某个Ftp账号 5. ListAllUser #注解: 列出所有Ftp账号 6. ShowUser #注解: 显示某个Ftp账号详情 q. Exit #注解: 退出(字母q) Please input the correct option: 1 Please input a username: ftpuser Please input the password: UArUDjLZ12HD Please input the directory(Default directory: /data/wwwroot): #注解: ftpuser用户根目录,建议默认,可直接回车 Password: Enter it again: ##################################### [ftpuser] create successful! You user name is : ftpuser You Password is : UArUDjLZ12HD You directory is : /data/wwwroot
数据库
如何备份?
[root@WeiLiu ~]# sudo /root/oneinstack/backup_setup.sh #设置备份参数 ####################################################################### # OneinStack for CentOS/RedHat 7+ Debian 9+ and Ubuntu 16+ # # Setup the backup parameters # # For more information please visit https://oneinstack.com # ####################################################################### Please select your backup destination: 1. Localhost #解析: 1. 本地备份 2. Remote host #解析: 2. 远程备份(ssh) 3. Aliyun OSS #解析: 3. 阿里云OSS备份 4. Qcloud COS #解析: 4. 腾讯云COS备份 5. UPYUN #解析: 5. 又拍云备份 6. QINIU #解析: 6. 七牛云备份 7. Amazon S3 #解析: 7. 亚马孙S3备份 8. Dropbox #解析: 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,oneinstack) oneinstack,linuxeye #解析: 备份数据库,以逗号隔开 You have to backup the content: Database: oneinstack,linuxeye
sudo /root/oneinstack/backup.sh #立即备份
sudo echo '0 1 * * * sudo /root/oneinstack/backup.sh > /dev/null 2>&1' >> /var/spool/cron/root #设置计划任务自动定时备份, 设置每天凌晨一点备份
如何管理服务?
Nginx:
systemctl {start|stop|status|restart|reload} nginx
MySQL:
systemctl {start|stop|restart|status} mysqld
PHP:
systemctl {start|stop|restart|reload|status} php-fpm
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
如何更新版本?
[root@WeiLiu ~]# /root/oneinstack/upgrade.sh ####################################################################### # OneinStack for CentOS/RedHat 7+ Debian 9+ and Ubuntu 16+ # # Upgrade Software versions for OneinStack # # For more information please visit https://oneinstack.com # ####################################################################### 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:
如何卸载?
[root@WeiLiu ~]# /root/oneinstack/uninstall.sh #注意备份 ####################################################################### # OneinStack for CentOS/RedHat 7+ Debian 9+ and Ubuntu 16+ # # Uninstall OneinStack # # For more information please visit https://oneinstack.com # ####################################################################### 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:
云主机安全组必须打开如下端口:
- ssh: 22
- http: 80
- https: 443
- ftp: 21, 20000~30000
PayPal: lj2007331@gmail.com ; 支付宝:lj2007331@gmail.com , 手机客户端扫描二维码捐赠:
QQ群: 465976122