宝塔面板 - 便捷、高效和安全的服务器站点运维面板
安装面板
- CentOS安装脚本
yum install ‐y wget && wget ‐O install.sh http://download.bt.cn/install/install.sh && sh install.sh
- Ubuntu/Deepin安装脚本
wget ‐O install.sh http://download.bt.cn/install/install‐ubuntu.sh && sudo bash install.sh
- Debian 安装脚本
wget ‐O install.sh http://download.bt.cn/install/install‐ubuntu.sh && bash install.sh
- Fedora 安装脚本
wget ‐O install.sh http://download.bt.cn/install/install.sh && bash install.sh
管理面板
- 启动
/etc/init.d/bt start
- 重启
/etc/init.d/bt restart
- 停止
/etc/init.d/bt stop
- 卸载
/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
- 修改面板端口
- CentOS 6 下修改成 8881 端口
echo '8881' > /www/server/panel/data/port.pl && /etc/init.d/bt restart
iptables ‐I INPUT ‐p tcp ‐m state ‐‐state NEW ‐m tcp ‐‐dport 8881 ‐j ACCEPT
service iptables save
service iptables restart
- CentOS 7 下修改成 8881 端口
echo '8881' > /www/server/panel/data/port.pl && /etc/init.d/bt restart
firewall‐cmd ‐‐permanent ‐‐zone=public ‐‐add‐port=8881/tcp
firewall‐cmd ‐‐reload
- 强制修改 MySQL 管理(root)密码,如要改成 123456
cd /www/server/panel && python tools.pyc root 123456
- 修改面板密码,如要改成123456
cd /www/server/panel && python tools.pyc panel 123456
- 删除域名绑定面板
rm ‐f /www/server/panel/data/domain.conf
- 清理面板登录限制
rm ‐f /www/server/panel/data/*.login
- 关闭访问限制
rm ‐f /www/server/panel/data/limitip.conf
- 关闭面板SSL
rm ‐f /www/server/panel/data/ssl.pl && /etc/init.d/bt restart
- 相关文件位置
- 站点配置文件位置:/www/server/panel/vhost
- nginx站点配置文件位置:/www/server/panel/vhost/nginx
- apache站点配置文件位置:/www/server/panel/vhost/apache
- 站点默认目录:/www/wwwroot
- 数据库备份目录:/www/backup/database
- 站点备份目录:/www/backup/site
- 面板授权IP位置:/www/server/panel/data/limitip.conf
- 许可域名位置:/www/server/panel/data/domain.conf
- 面板日志位置:/tmp/panelBoot.pl
- 软件安装日志位置:/tmp/panelExec.log
- 数据库错误日志位置:/www/server/data/*.err
- 错误日志位置:/tmp/panelBoot
- 站点日志位置:/www/wwwlogs
Nginx 服务管理
- 安装目录:/www/server/nginx
- 启动
/etc/init.d/nginx start
- 重启
/etc/init.d/nginx restart
- 停止
/etc/init.d/nginx stop
- 重新载入配置文件
/etc/init.d/nginx reload
- 配置文件目录位置:/www/server/nginx/conf/nginx.conf
Apache 服务管理
- 安装目录:/www/server/httpd
- 启动
/etc/init.d/httpd start
- 重启
/etc/init.d/httpd restart
- 停止
/etc/init.d/httpd stop
- 重新载入配置文件
/etc/init.d/httpd reload
- 配置文件目录位置:/www/server/apache/conf/httpd.conf
MySQL 服务管理
- 安装位置:/www/server/mysql
- phpmyadmin安装目录:/www/server/phpmyadmin
- 数据库存放目录:/www/server/data
- 启动
/etc/init.d/mysqld start
- 重启
/etc/init.d/mysqld restart
- 停止
/etc/init.d/mysqld stop
- 重新载入配置文件
/etc/init.d/mysqld reload
- 配置文件位置:/etc/my.cnf
FTP 服务管理
- 安装目录:/www/server/pure‐ftpd
- 启动
/etc/init.d/pure‐ftpd start
- 重启
/etc/init.d/pure‐ftpd restart
- 停止
/etc/init.d/pure‐ftpd stop
- 配置文件位置:/www/server/pure‐ftpd/etc/pure‐ftpd.conf
PHP 服务管理
- 安装目录:/www/server/php
- 启动
/etc/init.d/php‐fpm‐{52|53|54|55|56|70|71} start
- 重启
/etc/init.d/php‐fpm‐{52|53|54|55|56|70|71} restart
- 停止
/etc/init.d/php‐fpm‐{52|53|54|55|56|70|71} stop
- 重新载入配置文件
/etc/init.d/php‐fpm‐{52|53|54|55|56|70|71} reload
- 配置文件位置:/www/server/php/{52|53|54|55|56|70|71}/etc/php.ini
Redis 服务管理
- 安装目录:/www/server/redis
- 启动
/etc/init.d/redis start
- 停止
/etc/init.d/redis stop
- 配置文件位置:/www/server/redis/redis.conf
Memcached 服务管理
- 安装目录:/usr/local/memcached
- 启动
/etc/init.d/memcached start
- 重启
/etc/init.d/memcached restart
- 停止
/etc/init.d/memcached stop
- 重新载入配置文件
/etc/init.d/memcached reload