宝塔Linux面板命令大全

作者 : 七界传说 发布时间: 2020-03-30 文章热度:3.18K 共5044个字,阅读需13分钟。

目 录

宝塔Linux面板命令大全-七界传说丨关注分享网络、硬件、维护、游戏、主题、虚拟化、软件分享!

前言

从建站之初使用的就是宝塔面板。这种可视化的操作界面给我这样的“小白”带来了极大的方便,让不懂代码的我也可以拥有自己的一个小站。网上偶然闲逛,发现了这些代码命令合集,想到以后可能会用的到,特地收藏转发。这些命令含从安装、管理、Nginx、Apache、MySQL、FTP、PHP、Redis、Memcached,留档以备后续使用

一、安装宝塔

1、Linux面板5.9(稳定版)安装命令

Centos安装命令:

1
yum install -y wget && wget -O install.sh http://download.bt.cn/install/install.sh && sh install.sh

Ubuntu/Deepin安装命令:

1
wget -O install.sh http://download.bt.cn/install/install-ubuntu.sh && sudo bash install.sh

Debian安装命令:

1
wget -O install.sh http://download.bt.cn/install/install-ubuntu.sh && bash install.sh

Fedora安装命令:

1
wget -O install.sh http://download.bt.cn/install/install.sh && bash install.sh

2、Linux面板 6.0.x 版本安装命令

Centos安装命令:

1
yum install -y wget && wget -O install.sh http://download.bt.cn/install/install_6.0.sh && sh install.sh

Ubuntu/Deepin安装命令:

1
wget -O install.sh http://download.bt.cn/install/install-ubuntu_6.0.sh && sudo bash install.sh

Debian安装命令:

1
wget -O install.sh http://download.bt.cn/install/install-ubuntu_6.0.sh && bash install.sh

Fedora安装命令:

1
wget -O install.sh http://download.bt.cn/install/install_6.0.sh && bash install.sh

 

二、管理宝塔

停止

1
/etc/init.d/bt stop

启动

1
/etc/init.d/bt start

重启

1
/etc/init.d/bt restart

卸载

1
/etc/init.d/bt stop && chkconfig --del bt && rm -f /etc/init.d/bt && rm -rf /www/server/panel

查看当前面板端口

1
cat /www/server/panel/data/port.pl

修改面板端口,如要改成8881(centos 6 系统)

1
echo '8881' > /www/server/panel/data/port.pl && /etc/init.d/bt restart

修改面板端口,如要改成8881(centos 7 系统)

1
echo '8881' > /www/server/panel/data/port.pl && /etc/init.d/bt restart

强制修改MySQL管理(root)密码,如要改成123456

1
cd /www/server/panel && python tools.py root 123456

修改面板密码,如要改成123456

1
cd /www/server/panel && python tools.py panel 123456

查看宝塔日志

1
cat /tmp/panelBoot.pl

查看软件安装日志

1
cat /tmp/panelExec.log

站点配置文件位置

1
/www/server/panel/vhost

删除域名绑定面板

1
rm -f /www/server/panel/data/domain.conf

清理登陆限制

1
rm -f /www/server/panel/data/*.login

查看面板授权IP

1
cat /www/server/panel/data/limitip.conf

关闭访问限制

1
rm -f /www/server/panel/data/limitip.conf

查看许可域名

1
cat /www/server/panel/data/domain.conf

关闭面板SSL

1
rm -f /www/server/panel/data/ssl.pl && /etc/init.d/bt restart

查看面板错误日志

1
cat /tmp/panelBoot

查看数据库错误日志

1
cat /www/server/data/*.err

站点配置文件目录(nginx)

1
/www/server/panel/vhost/nginx

站点配置文件目录(apache)

1
/www/server/panel/vhost/apache

站点默认目录

1
/www/wwwroot

数据库备份目录

1
/www/backup/database

站点备份目录

1
/www/backup/site

站点日志

1
/www/wwwlogs

三、Nginx服务管理

nginx安装目录

1
/www/server/nginx

启动

1
/etc/init.d/nginx start

停止

1
/etc/init.d/nginx stop

重启

1
/etc/init.d/nginx restart

启载

1
/etc/init.d/nginx reload

nginx配置文件

1
/www/server/nginx/conf/nginx.conf

四、Apache服务管理

apache安装目录

1
/www/server/httpd

启动

1
/etc/init.d/httpd start

停止

1
/etc/init.d/httpd stop

重启

1
/etc/init.d/httpd restart

启载

1
/etc/init.d/httpd reload

apache配置文件

1
/www/server/apache/conf/httpd.conf

五、MySQL服务管理

mysql安装目录

1
/www/server/mysql

phpmyadmin安装目录

1
/www/server/phpmyadmin

数据存储目录

1
/www/server/data

启动

1
/etc/init.d/mysqld start

停止

1
/etc/init.d/mysqld stop

重启

1
/etc/init.d/mysqld restart

启载

1
/etc/init.d/mysqld reload

mysql配置文件

1
/etc/my.cnf

六、FTP服务管理

ftp安装目录

1
/www/server/pure-ftpd

启动

1
/etc/init.d/pure-ftpd start

停止

1
/etc/init.d/pure-ftpd stop

重启

1
/etc/init.d/pure-ftpd restart

ftp配置文件

1
/www/server/pure-ftpd/etc/pure-ftpd.conf

七、PHP服务管理

php安装目录

1
/www/server/php

启动

1
2
(请根据安装PHP版本号做更改,例如:/etc/init.d/php-fpm-54 start)
/etc/init.d/php-fpm-{52|53|54|55|56|70|71} start

停止

1
2
(请根据安装PHP版本号做更改,例如:/etc/init.d/php-fpm-54 stop)
/etc/init.d/php-fpm-{52|53|54|55|56|70|71} stop

重启

1
2
(请根据安装PHP版本号做更改,例如:/etc/init.d/php-fpm-54 restart)
/etc/init.d/php-fpm-{52|53|54|55|56|70|71} restart

启载

1
2
(请根据安装PHP版本号做更改,例如:/etc/init.d/php-fpm-54 reload)
/etc/init.d/php-fpm-{52|53|54|55|56|70|71} reload

配置文件

1
2
(请根据安装PHP版本号做更改,例如:/www/server/php/52/etc/php.ini)
/www/server/php/{52|53|54|55|56|70|71}/etc/php.ini

八、Redis服务管理

redis安装目录

1
/www/server/redis

启动

1
/etc/init.d/redis start

停止

1
/etc/init.d/redis stop

redis配置文件

1
/www/server/redis/redis.conf

九、Memcached服务管理

memcached安装目录

1
/usr/local/memcached

启动

1
/etc/init.d/memcached start

停止

1
/etc/init.d/memcached stop

重启

1
/etc/init.d/memcached restart

启载

1
/etc/init.d/memcached reload

 

常见问题FAQ

免费下载或者VIP会员专享资源能否直接商用?
本站所有资源版权均属于原作者所有,这里所提供资源均只能用于参考学习用,请勿直接商用。若由于商用引起版权纠纷,一切责任均由使用者承担。更多说明请参考 VIP介绍。
版权声明:原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 、作者信息和本声明。否则将追究法律责任。

发表评论

22
+2262天安全运行
主题分享
0
+0篇本周更新
更新我快乐

VIP免费下载全站资源

立即了解

本站支持IPv6访问 本站支持SSL安全访问

站点地图