机场搭建

1.安装内核

wget -N --no-check-certificate "https://raw.githubusercontent.com/SailorChina/Lotseverbbr/master/tcp.sh" && chmod +x tcp.sh && ./tcp.sh

2.安装锐速破解版

wget -N --no-check-certificate https://raw.githubusercontent.com/SailorChina/serverspeeder/master/serverspeeder.sh && bash serverspeeder.sh

3.安装ssrpanel前端

新版脚本有以下特性:

商业版面板适用于CentOS 6~7(包括redhat)、Debian 8、Ubuntu 16的64位。
一键搭建sspanel 或 ssrpanel [整合两个面板]
附带管理工具及修改工具
后续版本将添加一机多节点功能、节点一键对接V2ray等更多新功能
经测试在 阿里云, 腾讯云,华为云,京东云,vultr,快云服务器上通过
宝塔对接搭建教程:

请使用宝塔5.9稳定版搭建:

yum install -y wget && wget -O install.sh http://download.bt.cn/install/install.sh && sh install.sh

For sspanel:

1.安装宝塔面面板,PHP版本选择7.1,数据库选择mysql5.6, 其他默认,使用Nginx环境。

2.新建站点,记住域名[请保持目录为域名的状态,如域名为www.baidu.com ,目录务必为www/wwwroot/www.baidu.com ]。

3.新建数据库sspanel,记住数据库用户和密码,(宝塔面板默认数据库名=用户名),如果不是sspanel请自己设置为sspanel。

4.运行对接脚本,选择sspanel for bt,搭建sspanel

5.登录后台测试(默认账号marisn@67cc.cn 密码marisn)

6.若登录无反应,请查看网站目录/config/.config.php配置文件中的数据库配置是否正确

7.设置监控,打开xshell运行crontab -e,此处使用的是vi命令(不会的请百度),设置以下代码,
请将其中的/data/wwwroot/default更改为你的网站目录

0 0 * * * php -n /data/wwwroot/default/xcat dailyjob
*/1 * * * * php /data/wwwroot/default/xcat checkjob
*/1 * * * * php /data/wwwroot/default/xcat syncnode
30 22 * * * php /data/wwwroot/default/xcat sendDiaryMail

For ssrpanel:

1.安装宝塔面面板,PHP版本选择7.1,数据库选择mysql5.6, 其他默认,使用Nginx环境。

2.新建站点,记住域名[请保持目录为域名的状态,如域名为www.baidu.com,目录务必为www/wwwroot/www.baidu.com]。

3.新建数据库ssrpanel,记住数据库用户和密码,(宝塔面板默认数据库名=用户名),如果不是ssrpanel请自己设置为ssrpanel。

4.运行对接脚本,选择ssrpanel for bt,搭建ssrpanel

5.登录后台测试(默认账号admin 密码123456)

6.若登录无反应,请查看网站目录/.env配置文件中的数据库配置是否正确

7.设置监控,打开xshell运行crontab -e,此处使用的是vi命令(不会的请百度),设置以下代码,
请将其中的/data/wwwroot/default更改为你的网站目录

* * * * * php /data/wwwroot/default/artisan schedule:run >> /dev/null 2>&1
  • sspanel一键安装(免费稳定包)

    wget --no-check-certificate https://raw.githubusercontent.com/SailorChina/ssrpanel-master/master/stable-script.sh&&chmod +x stable-script.sh&&bash stable-script.sh
  • sspanel一键安装(测试版)

    wget --no-check-certificate https://raw.githubusercontent.com/SailorChina/ssrpanel-master/master/dev-script.sh&&chmod +x dev-script.sh&&bash dev-script.sh
  • sspanel和ssrpanel一键安装(十一付费)

    yum -y install wget && wget -N --no-check-certificate https://raw.githubusercontent.com/marisn2017/Commercial-version/master/script.sh && chmod +x script.sh && ./script.sh
  • ssrpanel一键安装

yum install screen wget -y &&screen -S ssrpanel
wget --no-check-certificate https://raw.githubusercontent.com/marisn2017/ssrpanel/master/stable-script.sh&&chmod +x stable-script.sh&&bash stable-script.sh

4.后端对接

  • sspanel(API对接)
wget -N --no-check-certificate https://raw.githubusercontent.com/SailorChina/SS-PANEL-API/master/node.sh && chmod +x node.sh  && ./node.sh

wget -N --no-check-certificate https://raw.githubusercontent.com/SailorChina/ss-panel-v3-mod_Uim-master/master/node.sh && chmod +x node.sh && ./node.sh
  1. 加了个简易守护程序和开机自启 如果是centos7,应该稳定不断的(每5分钟监控,也可能掉线五分钟)
  • ssrpanel(API对接)
yum install screen wget -y &&screen -S ssrpanel
wget --no-check-certificate https://raw.githubusercontent.com/marisn2017/ssrpanel/master/stable-script.sh&&chmod +x stable-script.sh&&bash stable-script.sh

其他

出现500错误
理论上操作到上面那些步骤完了应该是可以正常访问网站了,如果网站出现500错误,请看WIKI,很有可能是fastcgi的错误

请看WIKI:https://github.com/ssrpanel/ssrpanel/wiki/%E5%87%BA%E7%8E%B0-open_basedir%E9%94%99%E8%AF%AF

修改完记得重启NGINX和PHP-FPM

重启NGINX和PHP-FPM

service nginx restart
service php-fpm restart

定时任务(发邮件、流量统计、自动任务全部需要用到)【脚本已经自动添加】

crontab加入如下命令(请自行修改ssrpanel路径):
(表示每分钟都执行定时任务,具体什么任务什么时候执行程序里已经定义了,请不要乱改,否则流量统计数据可能出错)

* * * * * php /home/wwwroot/default/artisan schedule:run >> /dev/null 2>&1

邮件配置
SMTP:

编辑 .env 文件,修改 MAIL_ 开头的配置
Mailgun:

编辑 .env 文件
将 MAIL_DRIVER 值改为 mailgun

然后编辑 config/services.php

请自行配置如下内容

'mailgun' => [
'domain' => 'mailgun发件域名',
'secret' => 'mailgun上申请到的secret',
],

发邮件失败处理:

如果使用了逗比的ban_iptables.sh来防止用户发垃圾邮件
可能会导致出现 Connection could not be established with host smtp.exmail.qq.com [Connection timed out #110] 这样的错误
因为smtp发邮件必须用到25,26,465,587这四个端口,逗比的一键脚本会将这些端口一并封禁
可以编辑iptables,注释掉以下这段(前面加个#号就可以),然后保存并重启iptables

#-A OUTPUT -p tcp -m multiport --dports 25,26,465,587 -m state --state NEW,ESTABLISHED -j REJECT --reject-with icmp-port-unreachable

英文版

修改 .env 的 APP_LOCALE 值为 en
语言包位于 resources/lang 下,可自行更改

单端口多用户(推荐)

编辑节点的 user-config.json 文件:
vim user-config.json

将 “additional_ports” : {}, 改为以下内容:

"additional_ports" : {
"80": {
"passwd": "统一认证密码", // 例如 SSRP4ne1,推荐不要出现除大小写字母数字以外的任何字符
"method": "统一认证加密方式", // 例如 aes-128-ctr
"protocol": "统一认证协议", // 可选值:orgin、verify_deflate、auth_sha1_v4、auth_aes128_md5(推荐)、auth_aes128_sha1(推荐)、auth_chain_a(强烈推荐)
"protocol_param": "#",
"obfs": "tls1.2_ticket_auth", // 可选值:plain、http_simple(该值下客户端可用http_post)、random_head、tls1.2_ticket_auth(强烈推荐)
"obfs_param": ""
},
"443": {
"passwd": "统一认证密码",
"method": "统一认证加密方式",
"protocol": "统一认证协议",
"protocol_param": "#",
"obfs": "tls1.2_ticket_auth",
"obfs_param": ""
}
}

保存,然后重启SSR服务。
客户端设置:

远程端口:80
密码:password
加密方式:aes-128-ctr
协议:auth_aes128_md5
混淆插件:tls1.2_ticket_auth
协议参数:1026:@123 (SSR端口:SSR密码)



远程端口:443
密码:password
加密方式:aes-128-ctr
协议:auth_aes128_sha1
混淆插件:tls1.2_ticket_auth
协议参数:1026:SSRP4ne1 (SSR端口:SSR密码)

经实测,节点后端使用auth_sha1_v4_compatible,可以兼容auth_chain_a
注意:如果想强制所有账号都走80、443这样自定义的端口的话,记得把 user-config.json 中的 additional_ports_only 设置为 true
警告:经实测单端口下如果用锐速没有效果,很可能是VPS供应商限制了这两个端口
提示:配置单端口最好先看下这个WIKI,防止才踩坑:https://github.com/ssrpanel/ssrpanel/wiki/%E5%8D%95%E7%AB%AF%E5%8F%A3%E5%A4%9A%E7%94%A8%E6%88%B7%E7%9A%84%E5%9D%91

  • 校时
    如果架构是“面板机-数据库机-多节点机”,请务必保持各个服务器之间的时间一致,否则会产生:节点的在线数不准确、产生最后使用时间异常、单端口多用户功能失效等。
    推荐统一使用CST时间并安装校时服务:
vim /etc/sysconfig/clock 把值改为 Asia/Shanghai
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

重启一下服务器,然后:

yum install ntp
ntpdate cn.pool.ntp.org
文章作者: 毓头吃芋头
文章链接: http://sailorchina.coding.me/2019/03/23/机场搭建/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 毓头的折腾事
微信名片
比特币打赏
微信打赏
支付宝打赏