From 3ce5672523322174c34906f6a44e80447f09ae83 Mon Sep 17 00:00:00 2001 From: fadmin Date: Tue, 9 Jun 2026 03:44:03 -0400 Subject: [PATCH] Delete directory '#!' --- #!/bin/uninstall-LAMP-phpMyAdmin-PHP82.sh | 50 ----------------------- 1 file changed, 50 deletions(-) delete mode 100644 #!/bin/uninstall-LAMP-phpMyAdmin-PHP82.sh diff --git a/#!/bin/uninstall-LAMP-phpMyAdmin-PHP82.sh b/#!/bin/uninstall-LAMP-phpMyAdmin-PHP82.sh deleted file mode 100644 index c57ad58..0000000 --- a/#!/bin/uninstall-LAMP-phpMyAdmin-PHP82.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/bash - -# Check for root privileges -if [[ $EUID -ne 0 ]]; then - echo "This script must be run as root (use sudo)" - exit 1 -fi - -echo "--- Starting LAMP Stack Uninstallation ---" - -# 1. Stop and Disable Services -echo "Stopping Apache and MariaDB..." -sudo systemctl stop httpd mariadb 2>/dev/null -sudo systemctl disable httpd mariadb 2>/dev/null - -# 2. Remove Packages -echo "Removing Apache, MariaDB, PHP 8.2, and phpMyAdmin..." -sudo dnf remove -y httpd mariadb-server php php-* phpmyadmin remi-release - -# 3. Clean up PHP Module Streams -echo "Resetting PHP module streams..." -sudo dnf module reset php -y - -# 4. Delete Configuration Files and Data -# WARNING: This deletes your databases and website files! -read -p "Do you want to delete all Web files and Databases? (y/n): " CONFIRM -if [[ $CONFIRM == [yY] ]]; then - echo "Deleting /var/www/ and /var/lib/mysql/..." - sudo rm -rf /var/www/* - sudo rm -rf /var/lib/mysql - sudo rm -rf /etc/httpd - sudo rm -rf /etc/php.d - sudo rm -rf /etc/phpmyadmin - echo "Files deleted." -else - echo "Skipping file deletion. Configs and Data remain in /etc/ and /var/." -fi - -# 5. Reset Firewall Rules (Optional) -echo "Removing HTTP/HTTPS firewall rules..." -sudo firewall-cmd --permanent --remove-service={http,https} -sudo firewall-cmd --reload - -# 6. Clean DNF Cache -sudo dnf clean all - -echo "------------------------------------------------" -echo "Uninstallation Complete!" -echo "The LAMP stack and PHP 8.2 have been removed." -echo "------------------------------------------------"