宝塔linux面板 命令集锦

本文涉及的产品
云数据库 Redis 版,社区版 2GB
推荐场景:
搭建游戏排行榜
云数据库 RDS MySQL Serverless,0.5-2RCU 50GB
云数据库 RDS MySQL Serverless,价值2615元额度,1个月
简介: 命令大全

1.安装宝塔


Centos 安装脚本


yum install -ywget && 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 && sudobash 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


2.管理宝塔


   停止


/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 --dport8881-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


3.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


4.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


5.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


6.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


7.Redis 服务管理


   redis 安装目录


/www/server/redis


   启动


 

/etc/init.d/redis start


   停止


/etc/init.d/redis stop


   redis 配置文件


/www/server/redis/redis.conf


8.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


相关实践学习
基于Redis实现在线游戏积分排行榜
本场景将介绍如何基于Redis数据库实现在线游戏中的游戏玩家积分排行榜功能。
云数据库 Redis 版使用教程
云数据库Redis版是兼容Redis协议标准的、提供持久化的内存数据库服务,基于高可靠双机热备架构及可无缝扩展的集群架构,满足高读写性能场景及容量需弹性变配的业务需求。 产品详情:https://www.aliyun.com/product/kvstore     ------------------------------------------------------------------------- 阿里云数据库体验:数据库上云实战 开发者云会免费提供一台带自建MySQL的源数据库 ECS 实例和一台目标数据库 RDS实例。跟着指引,您可以一步步实现将ECS自建数据库迁移到目标数据库RDS。 点击下方链接,领取免费ECS&RDS资源,30分钟完成数据库上云实战!https://developer.aliyun.com/adc/scenario/51eefbd1894e42f6bb9acacadd3f9121?spm=a2c6h.13788135.J_3257954370.9.4ba85f24utseFl
相关文章
|
1天前
|
安全 网络协议 Linux
linux必学的60个命令
Linux是一个功能强大的操作系统,提供了许多常用的命令行工具,用于管理文件、目录、进程、网络和系统配置等。以下是Linux必学的60个命令的概览,但请注意,这里可能无法列出所有命令的完整语法和选项,仅作为参考
|
1天前
|
监控 Linux 数据处理
|
1天前
|
编解码 Ubuntu Linux
|
1天前
|
JSON Linux 数据格式
Linux命令发送http
请注意,`curl`命令非常灵活,可以根据您的需求进行多种配置和自定义。您可以查看 `curl`命令的文档以获取更多详细信息。
5 0
|
3天前
|
安全 Linux 测试技术
|
3天前
|
安全 Linux Windows
Linux中Shutdown命令使用介绍
Linux中Shutdown命令使用介绍
10 2
|
4天前
|
缓存 关系型数据库 Linux
Linux目录结构:深入理解与命令创建指南
Linux目录结构:深入理解与命令创建指南
|
9月前
|
安全 关系型数据库 MySQL
Linux学习笔记——Linux基本命令篇(三)
Linux学习笔记——Linux基本命令篇(三)
|
9月前
|
Linux 数据库 数据安全/隐私保护
Linux学习笔记——Linux基本命令篇(二)
Linux学习笔记——Linux基本命令篇(二)
|
9月前
|
Oracle 网络协议 Unix
Linux学习笔记——Linux基本命令篇(一)
Linux学习笔记——Linux基本命令篇(一)