宝塔面板常用的脚本整理出来,这样下次不用再去搜索。其实我们在做任何事情的时候,记忆力或者不想记,可以记录下来,以便以后使用的时候直接寻找文档。文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
第一、宝塔面板安装文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
Centos安装脚本文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
yum install -y wget && wget -O install.sh http://download.bt.cn/install/install.sh && sh install.sh
Ubuntu/Deepin安装脚本文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
wget -O install.sh http://download.bt.cn/install/install-ubuntu.sh && sudo bash install.sh
Debian安装脚本文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
wget -O install.sh http://download.bt.cn/install/install-ubuntu.sh && bash install.sh
Fedora安装脚本文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
wget -O install.sh http://download.bt.cn/install/install.sh && bash install.sh
第二、宝塔面板管理文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
停止文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
/etc/init.d/bt stop
启动文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
/etc/init.d/bt start
重启文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
/etc/init.d/bt restart
卸载文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
/etc/init.d/bt stop && chkconfig --del bt && rm -f /etc/init.d/bt && rm -rf /www/server/panel
查看当前面板端口文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
cat /www/server/panel/data/port.pl
修改面板端口,如要改成8881(centos 6 系统)文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
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 service iptables save service iptables restart
修改面板端口,如要改成8881(centos 7 系统)文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
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文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
cd /www/server/panel && python tools.pyc root 123456
修改面板密码,如要改成123456文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
cd /www/server/panel && python tools.pyc panel 123456
查看宝塔日志文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
cat /tmp/panelBoot.pl
查看软件安装日志文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
cat /tmp/panelExec.log
站点配置文件位置文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
/www/server/panel/vhost
删除域名绑定面板文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
rm -f /www/server/panel/data/domain.conf
清理登陆限制文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
rm -f /www/server/panel/data/*.login
查看面板授权IP文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
cat /www/server/panel/data/limitip.conf
关闭访问限制文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
rm -f /www/server/panel/data/limitip.conf
查看许可域名文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
cat /www/server/panel/data/domain.conf
关闭面板SSL文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
rm -f /www/server/panel/data/ssl.pl && /etc/init.d/bt restart
查看面板错误日志文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
cat /tmp/panelBoot
查看数据库错误日志文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
cat /www/server/data/*.err
站点配置文件目录(nginx)文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
/www/server/panel/vhost/nginx
站点配置文件目录(apache)文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
/www/server/panel/vhost/apache
站点默认目录文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
/www/wwwroot
数据库备份目录文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
/www/backup/database
站点备份目录文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
/www/backup/site
站点日志文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
/www/wwwlogs
第三、Nginx服务器管理文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
nginx安装目录文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
/www/server/nginx
启动文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
/etc/init.d/nginx start
停止文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
/etc/init.d/nginx stop
重启文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
/etc/init.d/nginx restart
启载文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
/etc/init.d/nginx reload
nginx配置文件文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
/www/server/nginx/conf/nginx.conf
第四、Apache服务管理文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
apache安装目录文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
/www/server/httpd
启动文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
/etc/init.d/httpd start
停止文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
/etc/init.d/httpd stop
重启文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
/etc/init.d/httpd restart
启载文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
/etc/init.d/httpd reload
apache配置文件文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
/www/server/apache/conf/httpd.conf
第五、MySQL数据库管理文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
mysql安装目录文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
/www/server/mysql
phpmyadmin安装目录文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
/www/server/phpmyadmin
数据存储目录文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
/www/server/data
启动文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
/etc/init.d/mysqld start
停止文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
/etc/init.d/mysqld stop
重启文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
/etc/init.d/mysqld restart
启载文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
/etc/init.d/mysqld reload
mysql配置文件文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
/etc/my.cnf
第六、FTP管理文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
ftp安装目录文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
/www/server/pure-ftpd
启动文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
/etc/init.d/pure-ftpd start
停止文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
/etc/init.d/pure-ftpd stop
重启文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
/etc/init.d/pure-ftpd restart
ftp配置文件文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
/www/server/pure-ftpd/etc/pure-ftpd.conf
第七、PHP服务管理文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
php安装目录文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
/www/server/php
启动(请根据安装PHP版本号做更改,例如:/etc/init.d/php-fpm-54 start)文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
/etc/init.d/php-fpm-{52|53|54|55|56|70|71} start
停止(请根据安装PHP版本号做更改,例如:/etc/init.d/php-fpm-54 stop)文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
/etc/init.d/php-fpm-{52|53|54|55|56|70|71} stop
重启(请根据安装PHP版本号做更改,例如:/etc/init.d/php-fpm-54 restart)文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
/etc/init.d/php-fpm-{52|53|54|55|56|70|71} restart
启载(请根据安装PHP版本号做更改,例如:/etc/init.d/php-fpm-54 reload)文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
/etc/init.d/php-fpm-{52|53|54|55|56|70|71} reload
配置文件(请根据安装PHP版本号做更改,例如:/www/server/php/52/etc/php.ini)文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
/www/server/php/{52|53|54|55|56|70|71}/etc/php.ini
第八、Redis服务管理文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
redis安装目录文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
/www/server/redis
启动文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
/etc/init.d/redis start
停止文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
/etc/init.d/redis stop
redis配置文件文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
/www/server/redis/redis.conf
第九、Memcached服务管理文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
memcached安装目录文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
/usr/local/memcached
启动文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
/etc/init.d/memcached start
停止文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
/etc/init.d/memcached stop
重启文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
/etc/init.d/memcached restart
启载文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html
/etc/init.d/memcached reload
这样,有些常用的命令记不住就记录下来,需要的时候直接打开文档。文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wg/6911.html