Last Update : Dec 2009

Setting up a development machine on Ubuntu (9.04 Jaunty and 9.10 Karmic)

These steps will guide you on setting up an Ubuntu machine as a development machine. These are (loosely) tested with 9.04 and 9.10. I personally use Kubuntu flavor.
Here is what I use the machine for...

  • Ruby on Rails development
  • PHP development
  • Java development
  • Photo management

All these commands are executed in TERMINAL

Basic Setup

# make sure every thing is update
sudo apt-get update
sudo apt-get upgrade


# this will install adobe-flash, sun-jre
# http://packages.ubuntu.com/jaunty/ubuntu-restricted-extras
# 
#if you are using KUBUNTU
    sudo apt-get install -y kubuntu-restricted-extras 
#if you are using UBUNTU
    sudo apt-get install -y ubuntu-restricted-extras 
sudo apt-get install -y firefox
sudo apt-get install -y vim-gtk
sudo apt-get install -y synaptic

Development Stuff

# will install compilers (gcc and dev libraries)
sudo apt-get install -y build-essential
sudo apt-get install -y pkg-config

Apache

sudo apt-get install -y apache2
sudo apt-get install -y apache2-prefork-dev

Mysql & PHP

sudo apt-get install -y mysql-server  #will install mysql server and client
sudo apt-get install -y php5    php5-cli     php5-mysql
sudo apt-get install -y phpmyadmin

Ruby on Rails

sudo apt-get install -y ruby-full  rubygems  # will install dev libraries

# now we need modify PATH in ~/.bashrc
# edit the file ~/.bashrc with your favorite editor and add the following line 
# at the end of file
export PATH=/var/lib/gems/1.8/bin:$PATH

# run bash  again
bash
# this will create a new shell with new env variables

# Now install a few gems
## mysql
sudo apt-get install -y libmysqlclient-dev
sudo gem install --no-rdoc --no-ri mysql

sudo gem install --no-rdoc --no-ri rails
sudo gem install --no-rdoc --no-ri hpricot
sudo gem install --no-rdoc --no-ri json
sudo gem install --no-rdoc --no-ri capistrano

sudo apt-get install -y sqlite3    libsqlite3-ruby  libsqlite3-dev 
sudo gem install --no-rdoc --no-ri sqlite3

sudo apt-get install -y libxml2-dev
sudo gem install --no-rdoc --no-ri libxml-ruby


# installing RMagick
# thanks to : http://swik.net/Ruby/Code+Snippets:+ruby/Installing+RMagick+on+Ubuntu+9.10+(Karmic+Koala)/db597
sudo apt-get install -y imagemagick   
sudo apt-get install -y librmagick-ruby
sudo apt-get install -y libmagickwand-dev

sudo gem install --no-rdoc --no-ri rmagick

# ok time for testing
# Open an irb session and try the following 

irb
require 'RMagick' 
#=> true 

require 'rvg/rvg' 
#=> true 

include Magick 
#=> Object 



# Now lets get some documentation.  The typical 'frames' version is so 
# 1990s...I like the ajaxified documentation at RailBrains.  
# I download these to my local machine and run it locally
rails : railsbrain.com
ruby : rubybrain.com

Version Control : SVN & GIT

sudo apt-get install -y subversion
sudo apt-get install -y git-core    git-gui

Java

sudo apt-get install -y sun-java6-jdk
sudo apt-get install -y sun-java6-plugin sun-java6-fonts

# 
# ubuntu has multiple java versions
java -version
# will tell you what version of java you are using
sudo update-alternatives --config java
# and follow prompts
# https://help.ubuntu.com/community/Java

Popular Java IDEs : netbeans and  eclipse
# I usually download them from their respective projects sites and install them  
# in my home dir (e.g: /home/sujee/apps/eclipse )
# this way, their auto-updaters will work just fine fetching the new
# releases.  If you install using apt-get you need to be running the IDEs
# as ROOT user for updates to work (not recommended)
# but if you want to install them anyway, here is how
sudo apt-get install -y netbeans
sudo apt-get install -y eclipse

Also....

Web Site Management

sudo apt-get install -y sitecopy
sudo apt-get install -y unison   unison-gtk

Photo Management

sudo apt-get install -y kphotoalbum
sudo apt-get install -y jhead
sudo apt-get install -y gimp
sudo apt-get install -y gqview





** Comment on this article **