document/文档/linux/宝塔面板.md
2025-05-18 15:14:53 +08:00

64 lines
2.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 安装(https://www.bt.cn/new/download.html)
```sh
wget -O install.sh https://download.bt.cn/install/install_lts.sh && sudo bash install.sh ed8484bec
```
[命令](https://www.bt.cn/new/btcode.html)
```sh
# 堡塔命令行工具箱
bt
# 停止面板服务
/etc/init.d/bt stop
# 启动面板服务
/etc/init.d/bt start
# 重启面板服务
/etc/init.d/bt restart
# 修复面板
/etc/init.d/bt 16
# 卸载面板服务
/etc/init.d/bt stop && chkconfig --del bt && rm -f /etc/init.d/bt && rm -rf /www/server/panel
# 查看当前面板端口
cat /www/server/panel/data/port.pl
# 修改面板端口如要改成8881centos 6 系统)
echo '8881' > /www/server/panel/data/port.pl && /etc/init.d/bt restart
#修改面板端口如要改成8881centos 7 系统)
echo '8881' > /www/server/panel/data/port.pl && /etc/init.d/bt restart
# 强制修改MySQL管理(root)密码如要改成123456
cd /www/server/panel && btpython tools.py root 123456
# 修改面板密码如要改成123456
cd /www/server/panel && btpython tools.py panel 123456
# 查看宝塔日志
cat /www/server/panel/logs/error.log
# 查看软件安装日志
cat /tmp/panelExec.log
# 站点配置文件位置
/www/server/panel/vhost
# 删除域名绑定面板
rm -f /www/server/panel/data/domain.conf
# 清理登陆限制
rm -f /www/server/panel/data/*.login
# 查看面板授权IP
cat /www/server/panel/data/limitip.conf
# 关闭访问限制
rm -f /www/server/panel/data/limitip.conf
# 查看许可域名
cat /www/server/panel/data/domain.conf
# 关闭面板SSL
rm -f /www/server/panel/data/ssl.pl && /etc/init.d/bt restart
# 查看面板错误日志
cat /www/server/panel/logs/error.log
# 查看数据库错误日志
cat /www/server/data/*.err
# 站点配置文件目录(nginx)
/www/server/panel/vhost/nginx
# 站点配置文件目录(apache)
/www/server/panel/vhost/apache
# 站点默认目录
/www/wwwroot
# 数据库备份目录
/www/backup/database
# 站点备份目录
/www/backup/site
# 站点日志
/www/wwwlogs
```