ss-panel-v3-mod_Uim-ImYrS个人修改版安装教程
仅适用于此:https://github.com/ChenSee/ss-panel-v3-mod_Uim-alipay-wxpay/tree/ImYrS
解决问题可以联系:@ImYrS23(我是菜鸡不保证解决!小问题有空的话免费解决,复杂的有偿解决)
Part 1 宝塔全新安装
step 1. 基础设置
请安装php7.1版本
然后在宝塔面板中找到php,点击设置。
在禁用函数一栏找到 system, proc_open, proc_get_status 去除它
在性能调整中,把 PHP 运行模式设置为 静态
在配置修改中 把 display_errors = 改为 Off 后保存
step 2. 获取源码
1 2 3 4 5 6 7 | cd /你的网站目录 例:cd /www/wwwroot/你的网站目录 git clone -b ImYrS https://github.com/ChenSee/ss-panel-v3-mod_Uim-alipay-wxpay.git tmp && mv tmp/.git . && rm -rf tmp && git reset --hard chown -R root:root * chmod -R 755 * chown -R www:www storage php composer.phar install cp config/.config.php.example config/.config.php |
step 3. 修改网站设置
进入宝塔要修改的网站设置页面,在网站目录中,关闭 防跨站攻击。
修改运行目录为/public
在伪静态页面添加如下内容:
1 2 3 | location / { try_files $uri $uri/ /index.php$is_args$args; } |
step 4. 导入数据库
新建一个数据库,导入/sql/glzjin_all.sql
step 5. 编辑config文件
编辑/config/.config.php文件
step 6. 从下方Part 2 的Step 4继续操作
Part 2 从Uim版升级
step 1. 数据库不改变,备份后清除所有文件。重新安装:
1 2 3 4 5 6 7 | cd /你的网站目录 例:cd /www/wwwroot/你的网站目录 git clone -b ImYrS https://github.com/ChenSee/ss-panel-v3-mod_Uim-alipay-wxpay.git tmp && mv tmp/.git . && rm -rf tmp && git reset --hard chown -R root:root * chmod -R 755 * chown -R www:www storage php composer.phar install cp config/.config.php.example config/.config.php |
step 2. 重新填写/config/.config.php文件
可以对照备份下来的旧config文件来填写,但是不能直接复制粘贴!有一些改动的。
step 3. 给user表添加pary字段
1 2 3 | mysql -u root -p // 这里需要输入数据库root密码 use name; // 选择数据库,name改为你的数据库名称 ALTER TABLE `user` ADD `pary` INT NOT NULL AFTER `telegram_id`; |
step 4. 设置查水表bot信息
编辑/public/config.php 把数据库信息和bot信息填写进去,数据库端口默认3306。
需要新建一个bot,跟原本的bot是分开的
1 2 3 4 | 白名单中填写可以使用查水表bot的用户的username(就是@xxx)那个。 例如: @ABC 和 @XYZ 可以使用此bot,那么填写如下: $config['white_list'] = 'ABC,XYZ,ImYrS23,WooMai'; 希望你留着ImYrS23,WooMai不要删除 |
然后访问(需要科学上网):
1 2 3 4 5 6 | http://api.telegram.org/bot$token/setwebhook?url=https://example.com/webhook.php?key=$key https://example.com改为你的域名。 $token改为你的bot的token $key改为你在config中设置的key(第一项)。 出现Webhook was set等字样即为设置成功 |
使用方法:
1 | !info - 查询该用户在网站的帐号基础信息,使用 !info all 可以查询完整信息 |
step 5. 卡片式商店使用
本版本卡片式商店目的在于:整理同一等级的不同套餐,如VIP1 – 月付,VIP1 – 年付。
商品名称按以下格式:group – name
例如:
1 2 3 4 | VIP1 - Month VIP1 - Year VIP2 - Month VIP2 - Year |
这样子group相同的会被整理在一个卡片里。
step 6. 获取必要文件
1 2 3 4 5 6 7 8 9 10 | 升级的用户请执行: php xcat initQQWry //下载IP解析库 php xcat initdownload //下载ssr程式 新安装的用户请执行: php xcat createAdmin //创建管理员 php xcat syncusers //同步用户 php xcat initQQWry //下载IP解析库 php xcat resetTraffic //重置流量 php xcat initdownload //下载ssr程式 |
step 7. 按需要删改或添加crontab任务
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | 必要: 30 22 * * * php /网站目录/xcat sendDiaryMail 0 0 * * * php -n /网站目录/xcat dailyjob */1 * * * * php /网站目录/xcat checkjob */1 * * * * php /网站目录/xcat syncnode 如果需要自动备份,可模仿以下两例,自行添加一条 例1:每20分钟备份1次(若间隔大于60分钟,看例2): */20 * * * * php -n /网站目录/xcat backup 例2:每20小时备份1次(若间隔大于24小时,自行Google): 0 */20 * * * php /path/to/your/cron.php 如果需要财务报表,可选添加以下三条 5 0 * * * php -n /网站目录/xcat sendFinanceMail_day 6 0 * * 0 php -n /网站目录/xcat sendFinanceMail_week 7 0 1 * * php -n /网站目录/xcat sendFinanceMail_month 如果需要检测被墙,添加以下一条 */1 * * * * php -n /网站目录/xcat detectGFW 如果要用到radius,需要添加下面这三条 */1 * * * * php /网站目录/xcat synclogin */1 * * * * php /网站目录/xcat syncvpn */1 * * * * php -n /网站目录/xcat syncnas |