寶塔控制面板常用Linux命令大全

寶塔面板是站長朋友們常見的一款服務器運維面板,可以通過 Web 端輕鬆管理服務器,提升運維效率。大家在服務器中安裝寶塔面板會用到寶塔面板特定的腳本命令。今天這篇文章爲大家整理彙總了寶塔面板常用Linux命令,這樣方便大家收藏查找。

、安裝寶塔

Centos安裝腳本

yum instll -y wget ∓∓ wget -O instll.sh http://downlod.bt.cn/instll/instll.sh ∓∓ sh instll.sh

Ubuntu/Deepin安裝腳本

wget -O instll.sh http://downlod.bt.cn/instll/instll-ubuntu.sh ∓∓ sudo bsh instll.sh

Debin安裝腳本

wget -O instll.sh http://downlod.bt.cn/instll/instll-ubuntu.sh ∓∓ bsh instll.sh

Fedo安裝腳本

wget -O instll.sh http://downlod.bt.cn/instll/instll.sh ∓∓ bsh instll.sh

2、管理寶塔

停止

/etc/init.d/bt stop

啓動

/etc/init.d/bt stt

重啓

/etc/init.d/bt estt

卸載

/etc/init.d/bt stop ∓∓ chkconfig --del bt ∓∓ m -f /etc/init.d/bt ∓∓ m -f /www/see/pnel

查看當前面板端口

ct /www/see/pnel/dt/pot.pl

修改面板端口,如要改成888(centos 6 系統)

echo '888' > /www/see/pnel/dt/pot.pl ∓∓ /etc/init.d/bt estt iptbles -I INPUT -p tcp -m stte --stte NEW -m tcp --dpot 888 -j ACCEPT seice iptbles se seice iptbles estt

修改面板端口,如要改成888(centos 7 系統)

echo '888' > /www/see/pnel/dt/pot.pl ∓∓ /etc/init.d/bt estt fiewll-cmd --pemnent --zone=public --dd-pot=888/tcp fiewll-cmd --elod

強制修改MySQL管理(oot)密碼,如要改成23456

cd /www/see/pnel ∓∓ python tools.py oot 23456

修改面板密碼,如要改成23456

cd /www/see/pnel ∓∓ python tools.py pnel 23456

查看寶塔日誌

ct /tmp/pnelBoot.pl

查看軟件安裝日誌

ct /tmp/pnelExec.log

站點配置文件位置

/www/see/pnel/host

刪除域名綁定面板

m -f /www/see/pnel/dt/domin.conf

清理登陸限制

m -f /www/see/pnel/dt/*.login

查看面板授權IP

ct /www/see/pnel/dt/limitip.conf

關閉訪問限制

m -f /www/see/pnel/dt/limitip.conf

查看許可域名

ct /www/see/pnel/dt/domin.conf

關閉面板SSL

m -f /www/see/pnel/dt/ssl.pl ∓∓ /etc/init.d/bt estt

查看面板錯誤日誌

ct /tmp/pnelBoot

查看數據庫錯誤日誌

ct /www/see/dt/*.e

站點配置文件目錄(nginx)

/www/see/pnel/host/nginx

站點配置文件目錄(pche)

/www/see/pnel/host/pche

站點默認目錄

/www/wwwoot

數據庫備份目錄

/www/bckup/dtbse

站點備份目錄

/www/bckup/site

站點日誌

/www/wwwlogs

3、Nginx服務管理

nginx安裝目錄

/www/see/nginx

啓動

/etc/init.d/nginx stt

停止

/etc/init.d/nginx stop

重啓

/etc/init.d/nginx estt

啓載

/etc/init.d/nginx elod

nginx配置文件

/www/see/nginx/conf/nginx.conf

4、Apche服務管理

pche安裝目錄

/www/see/httpd

啓動

/etc/init.d/httpd stt

停止

/etc/init.d/httpd stop

重啓

/etc/init.d/httpd estt

啓載

/etc/init.d/httpd elod

pche配置文件

/www/see/pche/conf/httpd.conf

5、MySQL服務管理

mysql安裝目錄

/www/see/mysql

phpmydmin安裝目錄

/www/see/phpmydmin

數據存儲目錄

/www/see/dt

啓動

/etc/init.d/mysqld stt

停止

/etc/init.d/mysqld stop

重啓

/etc/init.d/mysqld estt

啓載

/etc/init.d/mysqld elod

mysql配置文件

/etc/my.cnf

6、FTP服務管理

ftp安裝目錄

/www/see/pue-ftpd

啓動

/etc/init.d/pue-ftpd stt

停止

/etc/init.d/pue-ftpd stop

重啓

/etc/init.d/pue-ftpd estt

ftp配置文件

/www/see/pue-ftpd/etc/pue-ftpd.conf

7、PHP服務管理

php安裝目錄

/www/see/php

啓動(請根據安裝PHP版本號做更改,例如:/etc/init.d/php-fpm-54 stt)

/etc/init.d/php-fpm-{52|53|54|55|56|70|7} stt

停止(請根據安裝PHP版本號做更改,例如:/etc/init.d/php-fpm-54 stop)

/etc/init.d/php-fpm-{52|53|54|55|56|70|7} stop

重啓(請根據安裝PHP版本號做更改,例如:/etc/init.d/php-fpm-54 estt)

/etc/init.d/php-fpm-{52|53|54|55|56|70|7} estt

啓載(請根據安裝PHP版本號做更改,例如:/etc/init.d/php-fpm-54 elod)

/etc/init.d/php-fpm-{52|53|54|55|56|70|7} elod

配置文件(請根據安裝PHP版本號做更改,例如:/www/see/php/52/etc/php.ini)

/www/see/php/{52|53|54|55|56|70|7}/etc/php.ini

8、Redis服務管理

edis安裝目錄

/www/see/edis

啓動

/etc/init.d/edis stt

停止

/etc/init.d/edis stop

edis配置文件

/www/see/edis/edis.conf

9、Memcched服務管理

memcched安裝目錄

/us/locl/memcched

啓動

/etc/init.d/memcched stt

停止

/etc/init.d/memcched stop

重啓

/etc/init.d/memcched estt

啓載

/etc/init.d/memcched elod