安装教程
- 安装宝塔面板
- 安装Bty程序
安装宝塔面板
Centos安装脚本
yum install -y wget && wget -O install.sh http://download.bt.cn/install/install_6.0.sh && sh install.sh d17295534
Ubuntu/Deepin安装脚本
wget -O install.sh http://download.bt.cn/install/install-ubuntu_6.0.sh && sudo bash install.sh d17295534
Debian安装脚本
wget -O install.sh http://download.bt.cn/install/install-ubuntu_6.0.sh && bash install.sh d17295534
Fedora安装脚本
wget -O install.sh http://download.bt.cn/install/install_6.0.sh && bash install.sh d17295534
升级脚本
wget -O update.sh http://download.bt.cn/install/update.sh && sh update.sh
宝塔面板中安装Bty(3.7)
- 上传源码并解压到网站根目录
- 将运行目录设置为/public
- 选择Thinkphp伪静态规则
- PHP版本7.2(强制7.2+,版本过低会导致Bty程序不能正常运行)
- 访问/install.php填写完整信息进行安装
宝塔面板中安装Bty(非3.7)
上传源码并解压到网站根目录
上传并导入数据库文件 import.sql
修改路径文件application/database.php中数据库信息
// 服务器地址 'hostname' => '', // 数据库名 'database' => '', // 用户名 'username' => '', // 密码 'password' => '',
将运行目录设置为/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.2+,版本过低会导致Bty程序不能正常运行)
初始后台路径/admin
账号 admin 密码 admin000
一键部署安装
Bty支持宝塔一键部署安装,如需部署请按照如下教程进行部署
- 按照图片中的进行填写参数
- 然后上传Bty项目包
- 填写站点信息后安装即可
kangle面板安装Bty
- 上传源码
- 解压到根目录wwwroot中
- 绑定域名到目录wwwroot/public下
- 访问域名进行在线安装
- 安装完成后修改路径文件 / wwwroot / public / .htaccess
<IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L] </IfModule>
其他安装方法
百度一下:Thinkphp5在你主机环境的安装教程即可。
Ps:不要忘记手动导入数据库,修改数据库连接信息
文档更新时间: 2019-11-04 03:10 作者:Youngxj