Skip to content

Instantly share code, notes, and snippets.

@olsonjeffery
Created June 14, 2011 15:19
Show Gist options
  • Save olsonjeffery/1025112 to your computer and use it in GitHub Desktop.
Save olsonjeffery/1025112 to your computer and use it in GitHub Desktop.
A crash-course in building out a badass ubuntu dev vm

Setting up a 64-bit ubuntu vm

VM creation and OS install

  1. Create a virtualbox 64bit ubuntu VM.. whatever you need (1024MB RAM and 1 proc work fine for me)
  2. Install Ubuntu Natty 11.04 Desktop amd64

Setup environment

  1. sudo apt-get update && sudo sudo apt-get upgrade .. make sure all updates are installed.
  2. sudo apt-get install git-core git-gui gitk curl build-essential autoconf automake bison screen openssl libreadline6 libreadline6-dev zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev uuid-dev vim-gnome vim-nox exuberant-ctags libnspr4-dev mercurial libasound2-dev libcurl4-openssl-dev libnotify-dev libxt-dev libiw-dev mesa-common-dev autoconf2.13 yasm libmozjs-dev cmake-gui codeblocks-dbg codeblocks-contrib codeblocks doxygen
  3. sudo apt-get build-dep libsfml
  4. mkdir ~/src ~/bin ~/lib ~/include ~/libexec ~/doc ~/share
  5. add PATH=$PATH:/home/YOURUSERNAME/bin to the end of your ~/.bashrc
  6. Install node, npm and coffee
  7. cd src && git clone git://github.com/joyent/node.git
  8. cd node .. do a git checkout on the latest stable tag
  9. ./configure --prefix=/home/YOURUSERNAME && make && make install
  10. curl http://npmjs.org/install.sh | sh
  11. npm install --global coffee-script
  12. install rvm and use ree
  13. bash < <(curl -s https://rvm.beginrescueend.com/install/rvm)
  14. echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*' >> ~/.bashrc && source ~/.bashrc
  15. run rvm notes and follow the instructions to install needed packages for MRI on ubuntu (should all be included in Base System Setup step 1 above, but you never know).
  16. rvm install ree && rvm use --default ree
  17. Do ruby -v to ensure the right version is in use. Should be used globally for sessions by this user from now on.
  18. git config --global core.autocrlf false && git config --global user.name "Your Name" && git config --global user.email your@name.com
  19. curl https://raw.github.com/carlhuda/janus/master/bootstrap.sh -o - | sh

.screenrc

Here's one to get you started

hardstatus alwayslastline
hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{=kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B}%Y-%m-%d %{W}%c %{g}]'

# Default screens
screen -t top top
screen -t src
screen -t src2
screen -t repl bash --rcfile ~/.customrc

Add host shared folder

  1. In VM window, in Devices menu, select "Install Guest Additions" (Host+D)
  2. sudo mkdir /mnt/cdrom && sudo mount /dev/cdrom /mnt/cdrom && sudo /mnt/cdrom/VBoxLinuxAdditions.run
  3. Add shared folder to wherever on your host and name it 'hostdir'
  4. cd ~ && mkdir host
  5. sudo vim /etc/fstab and add: hostdir /home/jeff/host vboxsf defaults,rw,uid=1000,gid=100,dmode=1755 0 0 to the end of the file. Save and quit.
  6. reboot the vm, ensure there's no error messages (esp. concerning mounting the share folder)

Set up window environment

First, create an ~/.xsession file and fill it with:

gnome-settings-daemon &
nm-applet &
gnome-power-manager &
gnome-volume-manager &
synapse -s &
exec awesome
  1. chmod +x ~/.xsession 2 ln -sf /home/YOURUSERNAME/.xsession ~/.xinitrc
  2. sudo apt-get install awesome
  3. Install synapse via sudo add-apt-repository ppa:synapse-core/ppa && sudo apt-get update && sudo apt-get install synapse
  4. Log out and select 'user defined session' and log in
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment