This is a guide if you already have Ubuntu Desktop installed on your computer and an active Internet connection.  It will get you a quick, working, LAMP stack setup with phpmyadmin.  LAMP is Linux, Apache, MYSQL and PHP.

Breaking News - click here!

1. Get to the Ubuntu Desktop.  I used an Ubuntu live USB for this process (Ubuntu 12.04 LTS).

2. Open terminal.  To open terminal click on DASH HOME in the top left corner, then type in terminal.  The first search result that appears with a dash and greater than sign is terminal.

3.  You will have problems installing phpmyadmin.  To fix this now go to SETTINGS -> UPDATES AVAILABLE.  Then choose settings again.  This will take you to a window that says SOFTWARE SOURCES at the top.  Here, go to the UBUNTU SOFTWARE tab at the top.  Tick the box for COMMUNITY-MAINTAINED FREE AND OPEN-SOURCE SOFTWARE (universe).  This is where phpmyadmin hides.  Now click close and it automatically saves.

4. Now let’s install the main LAMP server.  Type the commands in the following order in terminal.

  • sudo apt-get update
  • sudo apt-get install lamp-server^
  • Say yes or choose the default option to anything unless I tell you not to.  It will ask you to set a password for MYSQL.  Type a password you like in the box and hit enter to move on.
  • LAMP is now installed.

5. Now we need to test it, and install PHP myadmin.

TESTING YOUR LAMP SERVER INSTALL WORKS

Open the browser, it’s usually Firefox.  Type in http://localhost.  It should say “It works!”.  Excellent, you have now installed the LAMP server correctly.  Now type into terminal:

  • sudo nano /var/www/test.php
  • This will bring up a typing area.  In here type:
  • <?php phpinfo(); ?>
  • Now hold control and press X.  say yes, and hit enter to save (called write out).
  • In Firefox again, enter the address http://localhost/test.php
  • You should see a page of PHP info stuff.  If you don’t check you typed the things into test.php correctly.  Don’t forget the little semi colon thing at the end of phpinfo()

Restart the server at this point to keep things fresh.  Type:

  • sudo service apache2 restart

 

Installing PHPMYADMIN

If you get an error installing phpmyadmin using this process then go back and tick the box for the universe updates like I told you at the start of this article.  The error will say “unable to locate phpmyadmin”.

Type the following into terminal:

  • sudo apt-get update
  • It’s always a good idea to update your repos using the above command.  I know we did it before, and it’s not really necessary, but it doesn’t hurt to type it again and get practise!
  • sudo apt-get install phpmyadmin
  • This is where you might get the error and need to activate the universe repos.  Else, it will just work.
  • Choose the options like so:
  • apache2 NOT lightpd
  • YES to configure database for phpmyadmin with dbconfig-common
  • And then two password boxes, one for a new phpmyadmin password, one for your MYSQL password.

Now you will hit problem number 2.  If you go to http://localhost/phpmyadmin it will show nothing, or an error.  If you check the /var/www/ folder on Ubuntu it does not contain phpmyadmin.  This is part of the mess that is installing phpmyadmin.  Don’t worry, we’ll fix it!

In Terminal type the following:

  • sudo nano /etc/apache2.conf

Scroll/press down arrow until you are at the very bottom of the file.  Then type in:

  • Include /etc/phpmyadmin/apache.conf
  • Make sure you have the i in include capital.  Now Save and close that file by holding Control and pressing X, then yes and enter.
  • sudo service apache2 restart

This will restart apache2 and is the final step in setting up your sweet new LAMP server.  To see PHPMYADMIN installed go to http://localhost/phpmyadmin.  You’ll need the Username and password.  Default Username is root.  Password is whatever you set your password to.

We’re finished.  You could complete these steps in under a 2 minutes with a fast Internet connection.  Remember me when you’ve made your millions and leave a comment if this helped!

Leave a Reply

Your email address will not be published.


5 + = 7

Set your Twitter account name in your settings to use the TwitterBar Section.