Getting Started with Ubuntu

Posted 21 August 2006 under , , , ,

This past weekend, I finally took the plunge and installed Ubuntu Linux on my PC. Installation couldn’t have been simpler — you honestly don’t need to have a tech background to get this up and running; just download and burn a disc image, boot from the CD, and Ubuntu does the rest. It recognized all of my hardware automatically, which is more than Windows can claim (everytime I do a fresh install of XP, I forget that it doesn’t know about my network card, so I have to open the case, figure out the card make/model, download the drivers to a friend’s computer and then transfer them over to mine).

Configuring Ubuntu

Through a ton of trial and error and double-digit fresh installs, I’ve developed a procedure for getting Ubuntu configured in six easy steps. Obviously, this is tailored to my specific needs, but I’m not doing anything too wild here.

1. Open up /etc/apt/sources.list and uncomment the two lines that look like this:

deb http://us.archive.ubuntu.com/ubuntu/ dapper universe
deb-src http://us.archive.ubuntu.com/ubuntu/ dapper universe

APT is Ubuntu’s package management utility, and by uncommenting those two lines, you give it access to software not supported by the Ubuntu team. It’s where the fun stuff lives, though :)

2. To alert APT to all the new packages you’ve just given it access to, run the following:

sudo apt-get update

3. Now the big kahuna …

sudo apt-get install ssh mysql-server apache2 php5 libapache2-mod-auth-mysql php5-mysql phpmyadmin netatalk ruby irb rails synergy

Here’s where APT shows its strength. By executing this one command, it installs, configures and deploys (deep breath) SSH, the Apache webserver, MySQL, PHP (with phpMyAdmin), Ruby on Rails, and two lesser-known, but still very cool pieces of software: Netatalk and Synergy.

Netatalk allows you to use Apple’s “connect to server” feature so that you can use the Linux box as a drive on a Mac. Synergy lets you use one mouse/keyboard to control multiple computers, regardless of OS. I can drag the mouse to the right side of my laptop screen, and it goes over to the Linux box.

4. These last three steps are pretty technology-specific. In order to get PHP and MySQL working together, open /etc/php5/apache2/php.ini and uncomment this line:

extension=mysql.iso

This will give PHP access to the MySQL libraries, and PHP without MySQL is like a party without beer … you could, but what’s the point?

5. After changing the php.ini file in step #4, Apache will need to be restarted:

sudo apache2ctl restart

6. This last step is just for Ruby on Rails. For whatever reason, Ubuntu puts the mysql.sock file in a different place than most Linux distros, confusing Rails. In order to point it to the correct place, create the following symlink:

ln -s /var/run/mysqld/mysqld.sock /tmp/mysql.sock

And that’s it. Pretty straightforward, huh?

Some good resources

There’s a ton of information about Ubuntu on the web. Here are a few sites that really stood out for me:

I know I’ve glossed over a lot of details here, so if you have any questions or thoughts, please do let me know through comments or the contact form.


About Me

I’m the Development Director at Viget in Durham, North Carolina. I’m also an avid reader, traveler, cyclist, musician, coffee fiend, and friend of birds.