вторник, 30 июля 2013 г.

Удаление LAMP server из Ubuntu 12.04

Actually, I'm only going to show how to remove AMP, since I assume you want to keep the GNU/Linux part of your installation. It would be nice if the removal could be done with a single command like:
sudo apt-get remove lamp-server

DO NOT DO THAT!!
That command appears to remove most, if not all, of your Ubuntu Desktop system. So instead, let's work backwards to remove the AMP part.
Remove phpMyAdmin

The phpMyAdmin installation was the last part of my LAMP installation tutorial, so we'll remove that first. From the command line:
sudo apt-get purge libapache2-mod-auth-mysql phpmyadmin

You'll be presented with a screen asking if you want to deconfigure the database for phpMyAdmin.


Removing phpMyAdmin

Go ahead and select Yes and hit <Enter>.
You'll be asked next if you want to purge the database for phpMyAdmin.


Purge phpMyAdmin Database

Again, select Yes and hit <Enter>.

The next screen is a little confusing. It prompts for the database administrator password, but it gives the impression that it's installing a new database.


Enter phpMyAdmin Password

Enter the correct password, (you created the password when you installed phpMyAdmin), select Ok and hit <Enter>. The phpMyAdmin removal should now complete.
Remove MySQL

Now let's see if we can remove MySQL. First we'll see what packages are installed relative to MySQL. Go to your terminal and enter:
dpkg -l | grep ^ii | grep mysql-server | awk -F' ' '{ print $2 }'

My system gives this list of packages.
mysql-server
mysql-server-5.1
mysql-server-core-5.1
php5-mysql

So let's get rid of those.
sudo apt-get purge mysql-server mysql-server-5.1 mysql-server-core-5.1

You have successfully removed MySQL Server from your system.
Remove Apache

First, we'll use a similar command like in the previous step to check what Apache packages are installed.
dpkg -l | grep ^ii | grep apache2 | awk -F' ' '{ print $2 }'

My results look like this:
apache2
apache2-mpm-prefork
apache2-utils
apache2.2-bin
apache2.2-common
libapache2-mod-php5

So let's remove those.
sudo apt-get purge apache2 apache2-mpm-prefork apache2-utils apache2.2-bin apache2.2-common libapache2-mod-php5

Apache should be gone from your system.
Cleaning up

There may be a few stray packages left on your system that you no longer need. Get rid of them with:
sudo apt-get autoremove

Взято отсюда: http://www.24may.kharkov.ua/page174.html

Комментариев нет:

Отправить комментарий