I wanted to install Gitlab 5.3 on a fresh Ubuntu 12. The tricky part is you need to have a version of git beyond the local apt version. You also want ruby 1.9.3 and only that version. I used mysql for a database but you could use postgres. These are my notes from doing it.
Install git from source (option 2) by following
This matters because gitlab will check which version of git you are using at the VERY end.
sudo apt-get install ruby1.9.1 ruby1.9.1-dev sudo apt-get install mysql-server sudo apt-get install libmysqlclient-dev sudo apt-get install redis-server sudo apt-get install libxslt-dev libxml2-dev sudo apt-get install libicu-dev sudo gem install nokogiri -v '1.5.9'
Follow the dirctions on https://github.com/gitlabhq/gitlabhq/blob/master/doc/install/installation.md
but make sure to exclude ‘git-core’ in this snippet:
sudo apt-get install -y build-essential zlib1g-dev libyaml-dev libssl-dev libgdbm-dev libreadline-dev libncurses5-dev libffi-dev curl openssh-server redis-server checkinstall libxml2-dev libxslt-dev libcurl4-openssl-dev libicu-dev
This should make a working gitlab server.