当前位置: 首页>>技术问答>>正文


如何删除LAMP堆栈以便重新开始?

, , ,

问题描述

我想从我的网络服务器开始,我想重新安装所有LAMP包,我该怎么做?

最佳解决办法

sudo apt-get purge mysql-server apache2 php5

这将删除”big-boy”包,它应该处理大多数情况。

您可以在documentation中找到此信息,特别是this section,了解如何重新开始:

To remove the LAMP stack remove the following packages:

Note: This assumes you have no other programs that require any of these packages. You might wish to simulate this removal first, and only remove the packages that don’t cause removal of something desired.

sudo apt-get remove apache2 apache2-mpm-prefork apache2-utils apache2.2-common libapache2-mod-php5 libapr1 libaprutil1 libdbd-mysql-perl libdbi-perl libmysqlclient15off libnet-daemon-perl libplrpc-perl libpq5 mysql-client-5.0 mysql-common mysql-server mysql-server-5.0 php5-common php5-mysql

To also remove the debconf data, use the purge option when removing. To get rid of any configurations you may have made to apache, manually remove the /etc/apache2 directory once the packages have been removed.

不要使用tasksel来删除包,可能会发生不好的事情,这包含在此bug report中。

其余的文档介绍了如何重新安装apache以及重新启动所需的所有内容。

次佳解决办法

删除LAMP

sudo apt-get purge libapache2-mod-auth-mysql phpmyadmin
sudo apt-get purge mysql-server mysql-server-5.1 mysql-server-core-5.1
sudo apt-get purge apache2 apache2-mpm-prefork apache2-utils apache2.2-bin apache2.2-common libapache2-mod-php5
sudo apt-get autoremove

安装LAMP

运行tasksel选择LAMP服务器。

要完全管理您的灯泡服务器数据库,请安装phpmyadmin

sudo apt-get install phpmyadmin

第三种解决办法

sudo apt-get purge apache2 php5-cli apache2-mpm-prefork apache2-utils apache2.2-common \
     libapache2-mod-php5 libapr1 libaprutil1 libdbd-mysql-perl libdbi-perl \
     libnet-daemon-perl libplrpc-perl libpq5 mysql-client mysql-common mysql-server \
     php5-common php5-mysql phpmyadmin \
&& sudo apt-get autoremove

参考资料

本文由Ubuntu问答整理, 博文地址: https://ubuntuqa.com/article/1931.html,未经允许,请勿转载。