该文档可能过时。建议参阅新版文档:https://sspanel3.com/sspanel-uim/
安装 lnmp
wget http://soft.vpser.net/lnmp/lnmp1.7.tar.gz -cO lnmp1.7.tar.gz tar zxf lnmp1.7.tar.gz cd lnmp1.7 ./install.sh lnmp
配置 sspanel
启用一些函数,关闭防跨站
sed -i 's/,system//g' /usr/local/php/etc/php.ini sed -i 's/,proc_open//g' /usr/local/php/etc/php.ini sed -i 's/,proc_get_status//g' /usr/local/php/etc/php.ini sed -i 's/^fastcgi_param PHP_ADMIN_VALUE/#fastcgi_param PHP_ADMIN_VALUE/g' /usr/local/nginx/conf/fastcgi.conf lnmp restart
添加 sspanel 的 nginx 配置
lnmp vhost add
添加 phpmyadmin 的 nginx 配置
lnmp vhost add
配置 phpmyadmin。在网站根目录下执行
wget https://files.phpmyadmin.net/phpMyAdmin/5.0.4/phpMyAdmin-5.0.4-all-languages.zip unzip -q phpMyAdmin-5.0.4-all-languages.zip mv phpMyAdmin-5.0.4-all-languages/* ./ rm -rf phpMyAdmin-5.0.4-all-languages* mkdir tmp chmod 755 -R * chown www -R *
登录 phpmyadmin
- 创建库 sspanel
- 创建 mysql 用户(用于节点通信)
允许 mysql 远程登录
iptables -L -n --line-numbers iptables -D INPUT 6 /etc/init.d/netfilter-persistent save /etc/init.d/netfilter-persistent reload
修改 nginx 配置,目录/usr/local/nginx/conf/vhost
- http 跳转 https
server { listen 80; server_name xxx.com ; return 301 https://$server_name$request_uri; }
- 修改目录
root /home/wwwroot/xxx.com/public;
- 配置伪静态
location / { try_files $uri /index.php$is_args$args; }
- 重启 nginx
lnmp nginx restart
获取面板。在网站根目录下执行
wget https://sspanel3.com/wp-content/uploads/2020/02/ss-panel-v3-mod_Uim-dev.zip unzip ss-panel-v3-mod_Uim-dev.zip mv ss-panel-v3-mod_Uim-dev/* ./ rm -rf ss-panel-v3-mod_Uim-dev rm -rf ss-panel-v3-mod_Uim-dev.zip git config core.filemode false wget https://getcomposer.org/installer -O composer.phar php composer.phar php composer.phar install chmod -R 755 * chown www -R *
2020-03-13更新:ss-panel-v3-mod_Uim项目404了。有需要的下载zip文件解压至相应目录即可。下载该文件
下载 sql 文件到 /root 目录
wget -P /root https://raw.githubusercontent.com/GeekQu/ss-panel-v3-mod_Uim/dev/sql/glzjin_all.sql
登录 mysql,将 glzjin_all.sql 导入库 sspanel
root@debian:~# mysql -uroot -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 110 Server version: 8.0.13 Source distribution Copyright (c) 2000, 2018, 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> use sspanel; Database changed mysql> source /root/glzjin_all.sql;
ctrl+d 退出
进入网站根目录,执行
cp config/.config.example.php config/.config.php
使用 xftp
配合 notepad++
编辑 .config.php
文件。配置正确的 mysql 密码
$_ENV['db_driver'] = 'mysql'; $_ENV['db_host'] = 'localhost'; $_ENV['db_database'] = 'sspanel'; $_ENV['db_username'] = 'root'; $_ENV['db_password'] = 'passwd';
成功访问
在网站跟目录下执行
- 创建管理员
root@debian:/home/wwwroot/xxx.com# php xcat createAdmin add admin/ 创建管理员帐号.....Enter your email/输入管理员邮箱: admin@xxx.com Enter password for: admin@xxx.com / 为 admin@xxx.com 添加密码: xxx Email: admin@xxx.com, Password: xxx! Press [y] to create admin..... 按下[Y]确认来确认创建管理员账户..... Y start create admin accountSuccessful/添加成功!
- 下载 ip 数据库
php xcat initQQWry
设置定时任务
root@debian:/home/wwwroot/xxx.com# crontab -e Select an editor. To change later, run 'select-editor'. 1. /bin/nano <---- easiest 2. /usr/bin/vim.basic 3. /usr/bin/vim.tiny Choose 1-3 [1]: 3 crontab: installing new crontab
定时任务
30 22 * * * php /home/wwwroot/xxx.com/xcat sendDiaryMail 0 0 * * * php -n /home/wwwroot/xxx.com/xcat dailyjob */1 * * * * php /home/wwwroot/xxx.com/xcat checkjob */1 * * * * php /home/wwwroot/xxx.com/xcat syncnode
参考来源
https://blog.anank.ke/w/SSPanel_with_DROP_DATABASE_BT
https://cn.wiki.hybgzs.cn/ss-panel-v3-mod/installation-lnmp1.4
发表回复