Navigation

Categories

Search



How to install MySQL, php5 and phpMyAdmin on Ubuntu

A good place to start a website is on your own personal computer. So why not set up a local host on our own Ubuntu box and get moving? Open up the terminal and follow these three steps:


  1. Install the MySQL server and client: $ sudo apt-get install mysql-server mysql-client

  2. Install php5: $ sudo apt-get install php5-mysql

  3. Install phpMyAdmin: $ sudo apt-get install phpmyadmin


  4. Okay, now you''ll need to create a directory where you can build websites within the server directory and give it permissions. Follow these steps:

  5. $ sudo mkdir /var/www/directoryname


  6. Okay, now you need to give permissions so that you may work freely in your new directory. As follows:

  7. $ sudo chown yourUserName /var/www/directoryname



  8. Test your local web server by entering the following into your web browser:

  9. http://localhost


You should now see in large bold font, "It works!". Now you are ready to create websites from scratch, or perhaps you'd like to install a content management system into your newly born directory! Have fun!


posted at 07:50:16 on 02/08/10 by john - Category: Ubuntu