- 1 Disclaimer
- 2 Prerequisites/Dependencies
- 3 Prepare the Necessary Users
- 4 GitLab
- 5 Web Frontend
- 6 Finish Installing
- 7 Testing
- 8 Omniauth
This guide is a rough port from the official guide and various internet references.
Some of the steps have been consolidated and obviously customized to the standard Gentoo environment.
If something is missing, please make a point of updating this article, with special attention to dependencies please.
If you don’t like long installation guides likes this, you can use unofficial www-apps/gitlabhq ebuild from CVUT Overlay. There’s also a short guide for dummies how to install it and configure your web server.
- dev-lang/python version 2.7.x
- dev-lang/ruby version 1.9.x
Prepare the Necessary Users
Gitlab uses the git user, so add it:
Prepare the Database
Merge mysql if you have not already.
Setup root mysql password.
Turn on mysql.
Set mysql to start upon reboot.
Create the database and user:
Test connecting to the databases with the new user:
Merge postgresql-server, or postgresql-base if you have PostgreSQL on another server.
For PostgreSQL there are different methods of authentification. For a installation on the local machine I prefer using the local account when connecting trough a socket. By default this is enabled.
Create a database and a new user without a password and give him ownership of it. Remember, when connecting trough the socket the shell user is used for authentification, so its name must be gitlab.
The gitlab user will need access to the PostgreSQL socket, so it's required to add him to the postgres group
And a little test, just to be sure everything went fine:
Copy the example database configuration file:
- Edit the new configuration file and add the database credentials just created:
Install Needed Gems
Note that charlock_holmes has a bug on gentoo, so we have to use this workaround:
Initialize Database and Activate Advanced Features
Download and Start the Initscript
At the time of writing, this init script is confirmed to work with Gitlab versions 6, just edit the user and home directory:
Download the official template and activate it:
Use your favorite text editor to change the relevant portions:
go over to the rails page, and fix up passenger...
You need to deviate on the configuration of /etc/apache2/vhosts.d/00_default_vhost.conf file, to adapt DocumentRoot and <Directory> directives to use /home/gitlab/gitlab/public. Thus, add the following virtual host to manage gitlab :
dont forget to
Use your favorite web browser to navigate to the new host you set up
If everything loads properly, the installer has made an admin account for you.
Run this command to get your full diagnostic.
Push, Pull, Clone
Users to push, pull, clone generate ssh-rsa key.
Using the GitLab web page interface, add your user key to your user, & create new repository.
Many commands will show up, they need to be run on your users computer.
The command 'git push -u origin master' will activate the repository created and allow cloning.
clone using the url the web interface gives you. (replace localhost with IP address, or fully qualified domain name)
In the file /home/gitlab/gitlab/config/gitlab.yml there's a section that controls login from remote sites such as Google, Twitter, and GitHub. change enabled: false to enabled: true. then scroll down and remove all ## marks from
and ensure to leave the leading - on the first line.