Install LAMP server and phpmyadmin on Ubuntu

February 7, 2017 - Linux, php

Install Lamp server

sudo apt-get install lamp-server^ 

http://localhost/ or

Restart server

sudo /etc/init.d/apache2 restart

Install phpmyadmin

More info on installation:

sudo apt-get install myadmin
sudo vi /etc/apache2/apache2.conf

Add to the end of a file

Include /etc/phpmyadmin/apache.conf

### Access phpmyadmin
http://localhost/phpmyadmin/ or
U: root P: toor
U: phpmyadmin P: toor

If 404 is displayed, run

sudo dpkg-reconfigure -plow phpmyadmin

Change max file upload size

vi /etc/php/7.0/apache2/php.ini


post_max_size      // number displayed next to file upload field

or optionally

post_max_size = 800M 
upload_max_filesize = 800M 
max_execution_time = 5000 
max_input_time = 5000 
memory_limit = 1000M 


Upload a large sql file to the database

Use command line

 mysql -u root -p -h localhost < /home/maja/Desktop/www24ur.sql

Restart apache

systemctl restart apache2