2

I am attempting to install LAMP server so I can work on PHP and MySQL databases locally on Ubuntu 16.04LTS.

I got through a lot of the installation and then decided I wanted to start again (see below as to why). How can I remove everything associated with LAMP server that I have just installed and start again?

I went through the following steps when installing:

sudo apt-get install tasksel

and then

sudo tasksel install lamp-server

Upon going though these steps it asked me for a mysql password, which I (probably shouldn't have) left blank.

I then installed phpmyadmin, again leaving the password blank for root.

After installation of phpmyadmin I then had to use

sudo gedit /etc/apache2/apache2.conf

And add this line:

Include /etc/phpmyadmin/apache.conf

Attempting to login to phpmyadmin threw up an error about removing the 'allownopasswords' or setting similar to that to allow me to enter with no pass.

At this point I decided to completely reinstall and use a password.

So I attempting to remove the packages I had used using some commands found here: How do I remove the LAMP stack so I can start over? & How do I remove the LAMP stack so I can start over?

I then reinstalled lamp-server, this time it showed no password entry and then I installed phpmyadmin.

Now when I goto localhost/phpmyadmin it just displays the config file, as if PHP is not installed.

I assume I am now missing some vital parts of the server.

I want to completely start afresh and install LAMP from scratch, how can I do this?

It would also be useful to know what the different passwords are for mySQL that it requests on installation, is it just 1 root user and password?

Thanks,

Thomas
  • 6,223
bigdaveygeorge
  • 461
  • 1
  • 7
  • 21

1 Answers1

1

My preference is using apt/apt-get rather than tasksel.

Many times seems to fail for me + disallow simple customizations.

Destroying an entire LAMP Stack install can be a bit tricky.

You'll use apt-get purge $package to removed code + all config files.

Then use dpkg -l | grep $package to verify you've actually removed all traces of related packages.

Installing Apache-2.4.28 + PHP-5.6 covers how I install full lamp stacks for my hosting clients. Just change all occurrences of 5.6 to 7.1 to install latest PHP code.

David Favor
  • 196
  • 5