宝塔面板安装所有命令#
安装宝塔#
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
|
管理宝塔#
停止
启动
重启
卸载
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
2
3
4
|
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 ACCEP
service iptables save
service iptables restart
|
修改面板端口,如要改成 8881(centos 7 系统)
1
2
3
|
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
1
|
cd /www/server/panel && python tools.py root 123456
|
修改面板密码,如要改成 123456
1
|
cd /www/server/panel && python tools.py panel 123456
|
查看宝塔日志
查看软件安装日志
站点配置文件位置
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 /www/server/data/*.err
|
站点配置文件目录(nginx)
1
|
/www/server/panel/vhost/nginx
|
站点配置文件目录(apache)
1
|
/www/server/panel/vhost/apache
|
站点默认目录
数据库备份目录
站点备份目录
站点日志
Nginx 服务管理#
nginx 安装目录
启动
1
|
/etc/init.d/nginx start
|
停止
重启
1
|
/etc/init.d/nginx restart
|
启载
1
|
/etc/init.d/nginx reload
|
nginx 配置文件
1
|
/www/server/nginx/conf/nginx.conf
|
Apache 服务管理#
apache 安装目录
启动
1
|
/etc/init.d/httpd start
|
停止
重启
1
|
/etc/init.d/httpd restart
|
启载
1
|
/etc/init.d/httpd reload
|
apache 配置文件
1
|
/www/server/apache/conf/httpd.conf
|
MySQL 服务管理#
mysql 安装目录
phpmyadmin 安装目录
数据存储目录
启动
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 配置文件
FTP 服务管理#
ftp 安装目录
启动
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 安装目录
启动(请根据安装 PHP 版本号做更改,例如:/etc/init.d/php-fpm-54 start)
1
|
/etc/init.d/php-fpm-{52|53|54|55|56|70|71} start
|
停止(请根据安装 PHP 版本号做更改,例如:/etc/init.d/php-fpm-54 stop)
1
|
/etc/init.d/php-fpm-{52|53|54|55|56|70|71} stop
|
重启(请根据安装 PHP 版本号做更改,例如:/etc/init.d/php-fpm-54 restart)
1
|
/etc/init.d/php-fpm-{52|53|54|55|56|70|71} restart
|
启载(请根据安装 PHP 版本号做更改,例如:/etc/init.d/php-fpm-54 reload)
1
|
/etc/init.d/php-fpm-{52|53|54|55|56|70|71} reload
|
配置文件(请根据安装 PHP 版本号做更改,例如:/www/server/php/52/etc/php.ini)
1
|
/www/server/php/{52|53|54|55|56|70|71}/etc/php.ini
|
Redis 服务管理#
redis 安装目录
启动
1
|
/etc/init.d/redis start
|
停止
redis 配置文件
1
|
/www/server/redis/redis.conf
|
Memcached 服务管理#
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
|