安装教程
- 安装宝塔面板
- 安装Bty程序
- 计划任务(监控)
1) 安装宝塔面板
1. 官方命令
进入官网
2. Centos安装脚本
yum install -y wget && wget -O install.sh http://download.bt.cn/install/install_6.0.sh && sh install.sh d17295534
3. Ubuntu/Deepin安装脚本
wget -O install.sh http://download.bt.cn/install/install-ubuntu_6.0.sh && sudo bash install.sh d17295534
4. Debian安装脚本
wget -O install.sh http://download.bt.cn/install/install-ubuntu_6.0.sh && bash install.sh d17295534
5. Fedora安装脚本
wget -O install.sh http://download.bt.cn/install/install_6.0.sh && bash install.sh d17295534
6. 升级脚本
wget -O update.sh http://download.bt.cn/install/update.sh && sh update.sh
2) 安装Bty程序
宝塔面板中安装Bty
- 上传源码并解压到网站根目录
- 将运行目录设置为/public

- 选择Thinkphp伪静态规则
Apache
<IfModule mod_rewrite.c>
Options +FollowSymlinks -Multiviews
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?/$1 [QSA,PT,L]
</IfModule>
Nginx
location / {
if (!-e $request_filename){
rewrite ^(.*)$ /index.php?s=$1 last; break;
}
}
IIS
<rewrite>
<rules>
<rule name="OrgPage" stopProcessing="true">
<match url="^(.*)$" />
<conditions logicalGrouping="MatchAll">
<add input="{HTTP_HOST}" pattern="^(.*)$" />
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="index.php/{R:1}" />
</rule>
</rules>
</rewrite>
- PHP版本7.2,暂不支持7.4(强制7.2+,版本过低会导致Bty程序不能正常运行)
- 访问域名填写完整信息进行安装

一键部署安装(版本号≥5.0.0-beta.2.7+20200626)
Bty支持宝塔一键部署安装,如需部署请按照如下教程进行部署

- 按照图片中的进行填写参数
- 然后上传Bty项目包
- 访问/install.php在线安装,填写站点信息后安装即可
kangle面板安装Bty
其他安装方法
百度一下:Thinkphp5在你主机环境的安装教程即可。
Ps:不要忘记手动导入数据库,修改数据库连接信息
3) 计划任务(监控)
教程:《计划任务监控如何部署及使用》
监控接口(1分钟):http://xxxxx.com/api/queue/index?token=xxxxxxxxxxxxxxx
token请通过常规管理-系统配置中计划任务密钥进行设置(第一次升级出来需要手动保存一次才能生效)
执行间隔时间已固定好,不会过多耗费资源。
日志:可以看到最近10条的执行记录,方便进行任务状态查看,如有大批量失败,请自行处理,防止占用资源。
常见问题.FAQ