現在有很多網友都在使用寶塔主機管理系統、對一些不懂 linux 操作的朋友來說,是一個很好的管理系統、
但是有些朋友重啓服務器以後,有可能造成一些服務無法重啓。今天我們蒐集下關於寶塔面板的命令集錦
安裝寶塔
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 stop
- 啓動
- /etc/init.d/bt start
- 重啓
- /etc/init.d/bt restart
- 卸載
- /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
- 修改面板端口,如要改成 8881(centos 6 系統)
- 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
- 修改面板端口,如要改成 8881(centos 7 系統)
- 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
- 查看寶塔日誌
- cat /tmp/panelBoot.pl
- 查看軟件安裝日誌
- 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 /tmp/panelBoot
- 查看數據庫錯誤日誌
- 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
Nginx 服務管理
- nginx 安裝目錄
- /www/server/nginx
- 啓動
- /etc/init.d/nginx start
- 停止
- /etc/init.d/nginx stop
- 重啓
- /etc/init.d/nginx restart
- 啓載
- /etc/init.d/nginx reload
- nginx 配置文件
- /www/server/nginx/conf/nginx.conf
- Apache 服務管理
- apache 安裝目錄
- /www/server/httpd
- 啓動
- /etc/init.d/httpd start
- 停止
- /etc/init.d/httpd stop
- 重啓
- /etc/init.d/httpd restart
- 啓載
- /etc/init.d/httpd reload
- apache 配置文件
- /www/server/apache/conf/httpd.conf
MySQL 服務管理
- mysql 安裝目錄
- /www/server/mysql
- phpmyadmin 安裝目錄
- /www/server/phpmyadmin
- 數據存儲目錄
- /www/server/data
- 啓動
- /etc/init.d/mysqld start
- 停止
- /etc/init.d/mysqld stop
- 重啓
- /etc/init.d/mysqld restart
- 啓載
- /etc/init.d/mysqld reload
- mysql 配置文件
- /etc/my.cnf
FTP 服務管理
- ftp 安裝目錄
- /www/server/pure-ftpd
- 啓動
- /etc/init.d/pure-ftpd start
- 停止
- /etc/init.d/pure-ftpd stop
- 重啓
- /etc/init.d/pure-ftpd restart
- ftp 配置文件
- /www/server/pure-ftpd/etc/pure-ftpd.conf
PHP 服務管理
- php 安裝目錄
- /www/server/php
- 啓動(請根據安裝 PHP 版本號做更改,例如:/etc/init.d/php-fpm-54 start)
- /etc/init.d/php-fpm-{52|53|54|55|56|70|71} start
- 停止(請根據安裝 PHP 版本號做更改,例如:/etc/init.d/php-fpm-54 stop)
- /etc/init.d/php-fpm-{52|53|54|55|56|70|71} stop
- 重啓(請根據安裝 PHP 版本號做更改,例如:/etc/init.d/php-fpm-54 restart)
- /etc/init.d/php-fpm-{52|53|54|55|56|70|71} restart
- 啓載(請根據安裝 PHP 版本號做更改,例如:/etc/init.d/php-fpm-54 reload)
- /etc/init.d/php-fpm-{52|53|54|55|56|70|71} reload
- 配置文件(請根據安裝 PHP 版本號做更改,例如:/www/server/php/52/etc/php.ini)
- /www/server/php/{52|53|54|55|56|70|71}/etc/php.ini
Redis 服務管理
- redis 安裝目錄
- /www/server/redis
- 啓動
- /etc/init.d/redis start
- 停止
- /etc/init.d/redis stop
- redis 配置文件
- /www/server/redis/redis.conf
Memcached 服務管理
- memcached 安裝目錄
- /usr/local/memcached
- 啓動
- /etc/init.d/memcached start
- 停止
- /etc/init.d/memcached stop
- 重啓
- /etc/init.d/memcached restart
- 啓載
- /etc/init.d/memcached reload
如有不全、歡迎投稿。