Making your own webdev environment on Ubuntu desktop

These machines aren't all fun fun fun, sometimes you have to use them for some more serious work. In this post I'm going to tell you how to make your own php/mysql web development environment on your own Ubuntu desktop. Once you've done this you won't need to keep uploading files to your server just to check if something works.

Firstly I'd like to point to the post that originally helped me do this at

Now, time to open up our trusty terminal. It is possible to do this through synaptics, but its quicker to do it like this:

First thing is to install mysql for databases on our machine. Copy this bit of code into your terminal:
sudo apt-get install mysql-server
Next we need apache2 as our webserver. Here is the code:
sudo apt-get install apache2
Then we need to get php:
sudo apt-get install php5
There are our three basic components. Now we need to hook them together:
sudo apt-get install libapache2-mod-php5
sudo apt-get install php5-mysql
Now that's just grand. We've now got all the elements that we need to serve files to the net. The thing is, we're only doing this so we can work on stuff at home, in which case what we're really looking for is an easier way to do so. What we need to do is have a public_html folder in our user directory. Perhaps now would be a good time to do that. The next step is making that work on the webserver we've just installed. Run this snip of code:
sudo a2enmod userdir
Then restart apache:
sudo /etc/init.d/apache2 force-reload
You should now be able to reach your home folder via http://localhost/~yourusername/

Finally we want to be able to administer our mysql databases. Though there are many good tools for doing this I still go back to the web based phpMyAdmin. Apart from the fact that it's highly automated (which suits me just fine) it's also a very common program to find on your paid hosting, so would also be very familiar when you go live. For the quick and dirty way of getting it up and running, download phpMyAdmin and extract to your public_html folder. Personally I rename it to something a little easier. Then rename the file within from to and within that file put something in the blowfish_secret field. Then all you have to do is navigate your browser to something like http://localhost/~yourusername/phpMyAdmin

Labels: , , , , , ,

posted by SkinOfStars @ 11:36 pm,


At January 09, 2008 12:50 pm, Blogger tony flaig bignews said...

Sorry to see you losing your connection to this area.

Lost me on this one see prior comment

At January 19, 2008 8:39 pm, Blogger SkinOfStars said...

Yeah, its a shame to be going, and I'm sorry the blog doesn't talk about the arse end of Kent anymore but I'm not really around in Thanet and I hated feeling like I was writing letters home, which stopped me posting for some time.

I know my current approach (extra lashings of homegrown-tech) isn't going to gain me many readers, but if I'm going to keep blogging then I'm going to talk about things I'm interested in, which I guess is the point.


Post a Comment

Links to this post:

Create a Link

<< Home