A clean one-click method to uninstall the Pagoda Panel WEB operating environment

888u

Last update at :2024-02-12,Edit by888u

Nowadays, many mainland Chinese users use the Pagoda panel to build websites. If your VPS does not want to build a website, you need to uninstall the Pagoda. Most VPS merchants can directly reinstall the new system at the back, but some merchants VPS does not support system reinstallation. For example, KT needs to issue a work order to reinstall the system. So is there any way to completely uninstall the pagoda? Today I will share with you a script that can be executed directly in the VPS to uninstall the Pagoda Panel. The script is as follows: After saving it as an sh file, you can execute it directly, sh file name.sh

#!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin export PATH Remove_Bt(){ if [ ! -f "/etc/init.d/bt" ] || [ ! -d "/www/server/panel" ]; then echo -e "This server does not have Pagoda installed!" echo -e "This server does not install bt-panel" exit; fi /etc/init.d/bt stop if [ -f "/usr/sbin/chkconfig" ];then chkconfig --del bt elif [ -f "/usr/sbin/update-rc.d" ];then /usr/sbin/update-rc.d fi rm -rf /www/server/panel rm -f /etc/init.d/bt echo -e "Pagoda panel has been uninstalled successfully" echo -e "bt-panel uninstall success" } Remove_Service(){ servicePath="/www/server" for service in nginx httpd mysqld pure-ftpd tomcat redis memcached php-fpm-52 php-fpm-53 php-fpm-54 php-fpm-55 php-fpm-56 php-fpm-70 php-fpm-71 do if [ -f "/etc/init.d/${service}" ]; then /etc/init.d/${service} stop if [ -f "/usr/sbin/chkconfig" ];then chkconfig --del ${service} elif [ -f "/usr/sbin/update-rc.d" ];then update-rc.d -f ${service} remove fi if [ "${service}" = "mysqld" ]; then rm -rf ${servicePath}/mysql rm -f /etc/my.cnf elif [ "${service}" = "httpd" ]; then rm -rf ${servicePath}/apache elif [ "${service}" = "memcached" ]; then rm -rf /usr/local/memcached elif [ "${service}" = "nginx" ] || [ "${service}" = "redis" ] || [ "${service}" = "tomcat" ] || [ "${service}" = "pure-ftpd" ] ; then rm -rf ${servicePath}/${service} fi rm -f /etc/init.d/${service} echo -e ${service} "\033[32mclean\033[0m" fi done if [ -d "${servicePath}/php" ]; then rm -rf ${servicePath}/php fi if [ -d "${servicePath}/nvm" ]; then rm -rf ${servicePath}/nvm fi if [ -d "${servicePath}/phpmyadmin" ]; then rm -rf ${servicePath}/phpmyadmin fi if [ -f /opt/gitlab/embedded/service/gitlab-rails/Gemfile ];then gitlab-ctl stop yum remove gitlab-ce -y rm -rf /opt/gitlab rm -rf /var/opt/gitlab rm -rf /etc/gitlab rm -rf /www/server/panel/plugin/gitlab fi } Remove_Rpm(){ echo -e "Query installed rpm packages.." echo -e "Find installed packages" for lib in libiconv-1.14 libmcrypt-2.5.8 mcrypt-2.6.8 mhash-0.9.9.9 bt-mysql bt-httpd bt-mariadb bt-php-5.2 bt-php-5.3 bt-php-5.4 bt-php-5.5 bt-php-5.6 bt-php-7.0 bt-php-7.1 do rpm -qa |grep ${lib} > ${lib}.pl libRpm=`cat ${lib}.pl` if [ "${libRpm}" != "" ]; then rpm -e ${libRpm} --nodeps > /dev/null 2>&1 echo -e ${lib} "\033[32mclean\033[0m" fi rm -f ${lib}.pl done echo -e "cleanup completed" echo -e "Clean over" } Remove_Data(){ rm -rf /www/server/data rm -rf /www/wwwlogs rm -rf /www/wwwroot } echo "================================================ =" #echo -e "What you want to do?(Default:1)" echo "1) Uninstall Pagoda" echo "2) Uninstall Pagoda and operating environment" #echo "3) Uninstall the Pagoda and operating environment and clear all site-related data" read -p "Please select the operation you want to perform (1-2 default: 1): " action; echo "================================================ =" case $action in '1') Remove_Bt ;; '2') Remove_Service if [ -f "/usr/bin/yum" ] & [ -f "/usr/bin/rpm" ]; then Remove_Rpm fi Remove_Bt ;; *) Remove_Bt ;; esac rm -f bt-uninstall.sh

The effect is as follows: Okay, now you have uninstalled the Pagoda Panel, but the best way is to reinstall the system, which is the cleanest.

Original text: https://www.laozuo.org/13544.html

Recommended site searches: free php space, US attack-proof server, US unlimited content host, overseas host rental, cloud server vps, Ministry of Information Industry registration, IP query, Chinese international domain name, Ministry of Industry and Information Technology registration system, domain name information query,

A clean one-click method to uninstall the Pagoda Panel WEB operating environment

All copyrights belong to 888u unless special state
取消
微信二维码
微信二维码
支付宝二维码