This article explains how to install GitLab (A alternative to GitHub) on Ubuntu Server 14.04 LTS.

I have updated this article to phase out my preivous "Install GitLab on Ubuntu 12.04" as GitLab has completly changed the ease of install. I highly recommend installing GitLab using omibus and nginx.

Below I show you how to setup GitLab on a dedicated vps or vm using Ubuntu 14.04.

Prerequisites

This article assumes you have already ran the following:

sudo apt-get update && sudo apt-get upgrade -y
sudo apt-get install openssh-server
sudo apt-get install postfix

The "internet Site" install works best.

I've installed no other software and don't run any other services (such as apache). Running a dedicated GitLab machine will save you time and hassle in the long run.

Install GitLab

Installation of GitLab is really easy now, thanks to the GitLab community. You can view the most recent install instructions on the official gitlab website here: https://about.gitlab.com/downloads/

First open a browser and go to the GitLab CE Download Archives. Find your appropriate package (in my case "Ubuntu 14.04 LTS 64bit"). Right click on the Download link and choose "copy link location".

Next login to the computer you want to host GitLab on (in my case, I ssh into a vm running a fresh install of Ubuntu 14.04). Run the following commands:

wget https://downloads-packages.s3.amazonaws.com/ubuntu-14.04/gitlab_7.1.1-omnibus-1_amd64.deb
sudo dpkg -i gitlab_7.1.1-omnibus-1_amd64.deb

This is where I ran into problems, next you have to configure your hostname, or GitLab will not reconfigure properly.

sudo vi /etc/gitlab/gitlab.rb

Change the variable to your hostname and do not take out the http://

After you have changed the hostname, run the reconfigure script

sudo gitlab-ctl reconfigure

And then to double check everything is running:

sudo gitlab-ctl status

#it should look like this:
run: nginx: (pid 972) 7s; run: log: (pid 971) 7s
run: postgresql: (pid 962) 7s; run: log: (pid 959) 7s
run: redis: (pid 964) 7s; run: log: (pid 963) 7s
run: sidekiq: (pid 967) 7s; run: log: (pid 966) 7s
run: unicorn: (pid 961) 7s; run: log: (pid 960) 7s

You can now access the install from your browser and login to your system with:
username: root
password: 5iveL!fe

If you have any questions or comments I'd love to hear them. At work we only scratch the surface of Gitlab features so I haven't had the chance to really dig in.