Install Gitlab on Debian 7

GitLab offers git repository management with a whole load of features to help with collaboration through a web interface, such as code reviews, issue tracking, activity feeds, and wikis. It's free (as in beer), and incredibly easy to setup on your own private server or VPS. In this case, we will be using Debian 7.7.




[ View of the Gitlab Dashboard ]

Install

Copy and paste the following script into a file on your Debian server before executing it with bash.

#!/bin/bash
cd /tmp
sudo apt-get update && sudo apt-get dist-upgrade -y
sudo apt-get install openssh-server -y

 # Select 'Internet Site', using sendmail instead also works, exim has problems
echo "Installing postfix so that gitlab can send emails. "
echo "Please select "Interenet Site" at the prompt and press [ENTER] to confirm you read this message"
read IGNORE_ME
sudo apt-get install postfix -y

wget https://downloads-packages.s3.amazonaws.com/debian-7.8/gitlab_7.7.2-omnibus.5.4.2.ci-1_amd64.deb

sudo dpkg -i gitlab_7.7.2-omnibus.5.4.2.ci-1_amd64.deb

Configure Gitlab

I found it necessary to update one of the configuration files manually before I could get the gitlab reconfiguration script to work. Please update the
MY_IP_OR_HOSTNAME
variable in the following line before execute it.
echo "external_url 'http://MY_IP_OR_HOSTNAME'" | sudo tee /etc/gitlab/gitlab.rb

Now run the gitlab configuration script

sudo gitlab-ctl reconfigure
If the hostname you specify does not actually work for navigating to the site in your browser, then email link functionality for adding users will not work

Login

Navigate your browser to the hostname/IP and login using these default credentials

Username: root
Password: 5iveL!fe

Update Password

The very first thing you will be asked to do after logging in, is to change your password.

You will then have to login again using the new password before being taken to the dashboard which looks like the image at the top of this tutorial.

References

No comments:

Post a Comment