|NO.Z.00021|——————————|NavigationLog|——|宝塔Linux.V7.4.5|
一、概述:
### --- 面板特色功能:
~~~ 一键配置服务器环境(LAMP/LNMP)
~~~ 一键安全重启
~~~ 一键创建管理网站、ftp、数据库
~~~ 一键部署SSL证书
~~~ 一键部署源码(discuz、wordpress、dedecms、z-blog、微擎等等)
~~~ 一键配置(定期备份、数据导入、伪静态、301、SSL、子目录、反向代理、切换PHP版本)
~~~ 一键安装常用PHP扩展(fileinfo、intl、opcache、imap、memcache、apc、redis、ioncube、imagick)
~~~ 数据库一键导入导出
~~~ 系统监控(CPU、内存、磁盘IO、网络IO)
~~~ 防火墙端口放行
~~~ SSH开启与关闭及SSH端口更改
~~~ 禁PING开启或关闭
~~~ 方便高效的文件管理器(上传、下载、压缩、解压、查看、编辑等等)
~~~ 计划任务(定期备份、日志切割、shell脚本)
~~~ 软件管理(一键安装、卸载、版本切换)
~~~ 严格目录和文件权限
~~~ 增加全面防暴破机制
~~~ 增强面板session的安全性
~~~ 增强面板入口验证机制
~~~ 优化宝塔终端
~~~ 优化面板内存释放机制
### --- 硬件环境要求:
~~~ 内存:512M以上,推荐768M以上(纯面板约占60M内存)
~~~ 硬盘:300M以上可硬硬盘空间(纯面板约占20M磁盘空间)
~~~ 系统:Centos7.*:确保是干净的操作系统,没有安装过Apache/nginx/php/mysql/pgsql/gitlab/Java
~~~ 架构:x86_64(主流服务器均是此架构,ARM不完整兼容)
~~~ 部署环境:centos7.6-1810
~~~ 宝塔linux版本:7.4.5
二、安装部署宝塔Linux控制面板:
### --- 部署宝塔linux控制面板:
~~~ # 基于centos7部署宝塔linux控制面板(脚本方式)
[root@localhost ~]# yum install -y wget && wget -O install.sh http://download.bt.cn/install/install_6.0.sh && sh install.sh
~~~ 以上节点无法使用使用备用节点:
[root@localhost ~]# yum install -y wget && wget -O install.sh http://180.101.160.68:5880/install/install_6.0.sh && sh install.sh
success
==================================================================
Congratulations! Installed successfully!
==================================================================
外网面板地址: http://36.27.38.121:8888/50c371ee
内网面板地址: http://192.168.1.61:8888/50c371ee
username: rzqiqhpi
password: e4695cb9
If you cannot access the panel,
release the following panel port [8888] in the security group
若无法访问面板,请检查防火墙/安全组是否有放行面板[8888]端口
==================================================================
Time consumed: 23 Minute!
### --- linux控制面板升级:
[root@localhost ~]# curl http://download.bt.cn/install/update6.sh|bash
### --- 若点击更新没有生效,请尝试重启面板服务:
[root@localhost ~]# bt restart
三、通过IE浏览器访问地址登录bt管理界面

四、宝塔Linux常用命令:
### --- Centos安装脚本
[root@localhost ~]# yum install -y wget && wget -O install.sh http://download.bt.cn/install/install_6.0.sh && sh install.sh
Ubuntu/Deepin安装脚本
[root@localhost ~]# wget -O install.sh http://download.bt.cn/install/install-ubuntu_6.0.sh && sudo bash install.sh
Debian安装脚本
[root@localhost ~]# wget -O install.sh http://download.bt.cn/install/install-ubuntu_6.0.sh && bash install.sh
Fedora安装脚本
[root@localhost ~]# wget -O install.sh http://download.bt.cn/install/install_6.0.sh && bash install.sh
[root@localhost ~]# bt // 查看bt工具箱
[root@localhost ~]# /etc/init.d/bt stop // 停止bt
[root@localhost ~]# /etc/init.d/bt start // 启动bt
[root@localhost ~]# /etc/init.d/bt restart // 重启bt
[root@localhost ~]# /etc/init.d/bt stop && chkconfig --del bt && rm -f /etc/init.d/bt && rm -rf /www/server/panel // 卸载bt
[root@localhost ~]# cat /www/server/panel/data/port.pl // 查看当前面板端口
### --- 修改面板端口号:
~~~ 修改面板端口,如要改成8881(centos 6 系统)
[root@localhost ~]# 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
[root@localhost ~]# service iptables save
[root@localhost ~]# service iptables restart
~~~ 修改面板端口,如要改成8881(centos 7 系统)
[root@localhost ~]# echo '8881' > /www/server/panel/data/port.pl && /etc/init.d/bt restart
[root@localhost ~]# firewall-cmd --permanent --zone=public --add-port=8881/tcp
[root@localhost ~]# firewall-cmd --reload
### --- 强制修改MySQL管理(root)密码,如要改成123456
[root@localhost ~]# cd /www/server/panel && python tools.py root 123456 // 修改面板密码,如要改成123456
### --- 日志及配置文件地址
[root@localhost ~]# cat /tmp/panelBoot.pl // 查看宝塔日志
[root@localhost ~]# cat /tmp/panelExec.log // 查看软件安装日志
[root@localhost ~]# /www/server/panel/vhost // 站点配置文件位置
[root@localhost ~]# rm -f /www/server/panel/data/domain.conf // 删除域名绑定面板
[root@localhost ~]# rm -f /www/server/panel/data/*.login // 清理登陆限制
[root@localhost ~]# cat /www/server/panel/data/limitip.conf // 查看面板授权IP
rm -f /www/server/panel/data/limitip.conf // 关闭访问限制
cat /www/server/panel/data/domain.conf // 查看许可域名
rm -f /www/server/panel/data/ssl.pl && /etc/init.d/bt restart // 关闭面板SSL
cat /tmp/panelBoot // 查看面板错误日志
cat /www/server/data/*.err // 查看数据库错误日志
/www/server/panel/vhost/nginx // 站点配置文件目录(nginx)
/www/server/panel/vhost/apache // 站点配置文件目录(apache)
/www/wwwroot // 站点默认目录
/www/backup/database // 数据库备份目录
/www/backup/site // 站点备份目录
/www/wwwlogs // 站点日志
### --- Nginx服务管理
/www/server/nginx // nginx安装目录
/etc/init.d/nginx start // 启动
/etc/init.d/nginx stop // 停止
/etc/init.d/nginx restart // 重启
/etc/init.d/nginx reload // 启载
/www/server/nginx/conf/nginx.conf // nginx配置文件
### --- Apache服务管理
/www/server/httpd // apache安装目录
/etc/init.d/httpd start // 启动
/etc/init.d/httpd stop // 停止
/etc/init.d/httpd restart // 重启
/etc/init.d/httpd reload // 启载
/www/server/apache/conf/httpd.conf // apache配置文件
### --- MySQL服务管理
/www/server/mysql // mysql安装目录
/www/server/phpmyadmin // phpmyadmin安装目录
/www/server/data // 数据存储目录
/etc/init.d/mysqld start // 启动
/etc/init.d/mysqld stop // 停止
/etc/init.d/mysqld restart // 重启
/etc/init.d/mysqld reload // 启载
/etc/my.cnf // mysql配置文件
### --- FTP服务管理
/www/server/pure-ftpd // ftp安装目录
/etc/init.d/pure-ftpd start // 启动
/etc/init.d/pure-ftpd stop // 停止
/etc/init.d/pure-ftpd restart // 重启
/www/server/pure-ftpd/etc/pure-ftpd.conf // ftp配置文件
### --- PHP服务管理
/www/server/php // php安装目录
/etc/init.d/php-fpm-{52|53|54|55|56|70|71|72|73|74} start // 启动(请根据安装PHP版本号做更改,例如:/etc/init.d/php-fpm-54 start)
/etc/init.d/php-fpm-{52|53|54|55|56|70|71|72|73|74} stop // 停止(请根据安装PHP版本号做更改,例如:/etc/init.d/php-fpm-54 stop)
/etc/init.d/php-fpm-{52|53|54|55|56|70|71|72|73|74} restart // 重启(请根据安装PHP版本号做更改,例如:/etc/init.d/php-fpm-54 restart)
/etc/init.d/php-fpm-{52|53|54|55|56|70|71|72|73|74} reload // 启载(请根据安装PHP版本号做更改,例如:/etc/init.d/php-fpm-54 reload)
/www/server/php/{52|53|54|55|56|70|71|72|73|74}/etc/php.ini // 配置文件(请根据安装PHP版本号做更改,例如:/www/server/php/52/etc/php.ini)
### --- Redis服务管理
/www/server/redis // redis安装目录
/etc/init.d/redis start // 启动
/etc/init.d/redis stop // 停止
/www/server/redis/redis.conf // redis配置文件
### --- Memcached服务管理
/usr/local/memcached // memcached安装目录
/etc/init.d/memcached start // 启动
/etc/init.d/memcached stop // 停止
/etc/init.d/memcached restart // 重启
/etc/init.d/memcached reload // 启载
Walter Savage Landor:strove with none,for none was worth my strife.Nature I loved and, next to Nature, Art:I warm'd both hands before the fire of life.It sinks, and I am ready to depart
——W.S.Landor
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· DeepSeek 开源周回顾「GitHub 热点速览」