安装宝塔
Centos安装脚本
yum install -y wget && 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 && sudo bash 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
管理宝塔
停止 /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 --dport 8881 -j ACCEPTservice iptables save service iptables restart 修改面板端口,如要改成8881(centos 7 系统) echo '8881' > /<a href="https://www.xp8.net/tag/www" title="查看更多关于www的文章" target="_blank">www</a>/<a href="https://www.xp8.net/tag/server" title="查看更多关于server的文章" target="_blank">server</a>/panel/data/port.pl && /<a href="https://www.xp8.net/tag/etc" title="查看更多关于etc的文章" target="_blank">etc</a> /init.d/bt restart firewall-cmd --permanent --zone=public --add-port=8881/tcp firewall-cmd --reload 强制修改MySQL管理(root)密码,如要改成123456cd /<a href="https://www.xp8.net/tag/www" title="查看更多关于www的文章" target="_blank">www</a>/<a href="https://www.xp8.net/tag/server" title="查看更多关于server的文章" target="_blank">server</a>/panel && python tools.pyc root 123456 修改面板密码,如要改成123456 cd /<a href="https://www.xp8.net/tag/www" title="查看更多关于www的文章" target="_blank">www</a>/<a href="https://www.xp8.net/tag/server" title="查看更多关于server的文章" target="_blank">server</a>/panel && python tools.pyc panel 123456 查看宝塔日志 cat /tmp/panelBoot.pl 查看软件安装日志 cat /tmp/panelExec.log 站点<a href="https://www.xp8.net/tag/%e9%85%8d%e7%bd%ae%e6%96%87%e4%bb%b6" title="查看更多关于配置文件的文章" target="_blank">配置文件</a>位置/<a href="https://www.xp8.net/tag/www" title="查看更多关于www的文章" target="_blank">www</a>/<a href="https://www.xp8.net/tag/server" title="查看更多关于server的文章" target="_blank">server</a>/panel/vhost 删除域名绑定面板 rm -f /<a href="https://www.xp8.net/tag/www" title="查看更多关于www的文章" target="_blank">www</a>/<a href="https://www.xp8.net/tag/server" title="查看更多关于server的文章" target="_blank">server</a>/panel/data/domain.conf 清理登陆限制rm -f /<a href="https://www.xp8.net/tag/www" title="查看更多关于www的文章" target="_blank">www</a>/<a href="https://www.xp8.net/tag/server" title="查看更多关于server的文章" target="_blank">server</a>/panel/data/*.login 查看面板授权IPcat /www/server/panel/data/limitip.conf 关闭访问限制rm -f /www/server/panel/data/limitip.conf 查看许可域名cat /www/server/panel/data/domain.conf 关闭面板SSLrm -f /www/server/panel/data/ssl.pl && /<a href="https://www.xp8.net/tag/etc" title="查看更多关于etc的文章" target="_blank">etc</a>/init.d/bt restart查看面板错误日志cat /tmp/panelBoot查看数据库错误日志cat /www/server/data/*.err站点<a href="https://www.xp8.net/tag/%e9%85%8d%e7%bd%ae%e6%96%87%e4%bb%b6" title="查看更多关于配置文件的文章" target="_blank">配置文件</a>目录(nginx)/www/server/panel/vhost/nginx站点<a href="https://www.xp8.net/tag/%e9%85%8d%e7%bd%ae%e6%96%87%e4%bb%b6" title="查看更多关于配置文件的文章" target="_blank"> 配置文件</a>目录(apache)/www/server/panel/vhost/apache 站点默认目录/www/wwwroot 数据库备份目录/www/backup/database 站点备份目录/www/backup/site 站点日志/www/wwwlogs
Nginx服务管理
nginx安装目录/www/server/nginx启动/<a href="https://www.xp8.net/tag/etc" title="查看更多关于etc的文章" target="_blank">etc</a>/init.d/nginx start停止/<a href="https://www.xp8.net/tag/etc" title="查看更多关于etc的文章" target="_blank">etc</a>/init.d/nginx stop重启/<a href="https://www.xp8.net/tag/etc" title="查看更多关于etc的文章" target="_blank">etc</a>/init.d/nginx restart启载/<a href="https://www.xp8.net/tag/etc" title="查看更多关于etc的文章" target="_blank">etc</a>/init.d/nginx reloadnginx<a href="https://www.xp8.net/tag/%e9%85%8d%e7%bd%ae%e6%96%87%e4%bb%b6" title="查看更多关于配置文件的文章" target="_blank">配置文件</a>/www/server/nginx/conf/nginx.confApache服务管理apache安装目录/www/server/httpd启动/etc/init.d/httpd start停止/etc/init.d/httpd stop重启/etc/init.d/httpd restart启载/etc/init.d/httpd reloadapache<a href="https://www.xp8.net/tag/%e9%85%8d%e7%bd%ae%e6%96%87%e4%bb%b6" title="查看更多关于配置文件的文章" target="_blank">配置文件</a>/www/server/apache/conf/httpd.conf
MySQL服务管理
mysql安装目录/www/server/mysqlphpmyadmin安装目录/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 reloadmysql<a href="https://www.xp8.net/tag/%e9%85%8d%e7%bd%ae%e6%96%87%e4%bb%b6" title="查看更多关于配置文件的文章" target="_blank">配置文件</a>/etc/my.cnf
FTP服务管理
ftp安装目录/www/server/pure-ftpd启动/etc/init.d/pure-ftpd start停止/etc/init.d/pure-ftpd stop重启/etc/init.d/pure-ftpd restartftp配置文件/www/server/pure-ftpd/etc/pure-ftpd.conf
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
Redis服务管理
redis安装目录/www/server/redis启动/etc/init.d/redis start停止/etc/init.d/redis stopredis配置文件/www/server/redis/redis.conf
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