Ubuntu 9.04, Jaunty Jackalope is set for release tomorrow, but I've been running the RC for about a week now. So far, so good! I was surprised that my wireless internet was working without me having to do anything this release. I've resorted to everything from using ndiswrapper to compiling madwifi from source previously, but this time, it just worked. Ubuntu++

However, having internet access is only the start of my setup. Once it's installed, it was time to install everything I need.

The main reason I use Ubuntu over Windows, is that as a developer it's much easier. Two screens is enough for me, so workspaces don't swing my decision like they used to. Infact, I'd go so far as to say that if I didn't code, I'd be using the Windows 7 beta full time.

However, as it stands, I use Ubuntu. To get a working development setup, it takes me a few steps. The first is to install everything I need via apt-get.

sudo apt-get install apache2 php5 mysql-server-5.0 phpmyadmin php5-cli php5-curl

As it's installing it asks a few basic questions, and mysql will prompt you for a root password. Once apt-get has finished doing it's thing, you need to enable phpMyAdmin. Open /etc/apache2/apache2.conf in your text editor of choice as root, and then add the following to the bottom:

# Enable PHPMyAdmin
Include /etc/phpmyadmin/apache.conf

Personally, I prefer running a mySQL terminal by using the following command:

mysql -u root -pPASSWORD

My development environment is then pretty much set up. After this, it's entirely down to preference.

I try and keep my /home/michael folder quite organised, but also wanted to keep my sites in /home, as it usually doesn't get wiped when I reinstall, simply remounted. So:

sudo mkdir /home/sites && sudo chown michael:michael /home/sites

Then, I use a little script I wrote to set up some vhosts with apache, and automatically create the folders in /home/sites. You can find it on github

I then install gPHPEdit as my text editor, as I've not put in the hours to learn how to use vi, and there we have it, my development environment is set up and I can start working on whatever I want. However, there's something else that I usually tweak before I start work. Firefox comes preinstalled, but I add a few extensions to make my life easier. Notably, these are Firebug, Firecookie, FirePHP, FireFTP and the Web Developer Toolbar.

I should mention that FireFTP is only for a few uploads, and that most of my code is managed using svn and deployed using rsync. Rsync comes pre-installed, but SVN needs installing.

sudo apt-get install subversion

After that, it's just a matter of checking out working copies of all my sites, and getting stuck in to current projects.

For reference, I use the following command to deploy sites (In this case, Project X). It ignores all .svn files and my config file, which contains all the database connection information. This allows me to deploy the site, and have it working on the server straight away.

alias xdeploy='rsync -r -v /home/sites/site.dev/ user@example.com:folder --exclude "*.svn*" --exclude "config.php"'

And there you have it, all the commands I use to setup my development environment. This is mainly as a reference, so I can easily recreate the setup I have should I ever lose it, but it also allows you to see how I work. Is there anything I'm missing, or anything I could do better? Let me know in the comments :)

No related posts.