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:
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!
- Install the MySQL server and client: $ sudo apt-get install mysql-server mysql-client
- Install php5: $ sudo apt-get install php5-mysql
- Install phpMyAdmin: $ sudo apt-get install phpmyadmin
- $ sudo mkdir /var/www/directoryname
- $ sudo chown yourUserName /var/www/directoryname
- http://localhost
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:
Okay, now you need to give permissions so that you may work freely in your new directory. As follows:
Test your local web server by entering the following into your web browser:
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!