Gitlab

Draft page

Voici un petit guide pour installer Gitlab sous Debian avec le serveur web Nginx et le serveur ruby Thin.
J'ai également choisi d'installer Gitlab dans une sous url, du type : www.monsite.fr/gitlab/

Prérequis

  • Serveur web Nginx avec le user www-data
  • Serveur de base de données Mysql
  • Debian 8 Jessie

Installation

sudo apt-get install curl openssh-server ca-certificates
curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash
sudo apt-get install gitlab-ce

Configuration

sudo groupadd gitlab-www
sudo usermod -G gitlab-www www-data

sudo vi /etc/gitlab/gitlab.rb

# nginx['enable'] = true en nginx['enable'] = false Ajouter ci_nginx['enable'] = false

web_server['external_users'] = ['www-data']

Configuration DB Mysql Edit /etc/gitlab/gitlab.rb for mysql database

# Disable the built-in Postgres postgresql['enable'] = false

# Fill in the values for database.yml gitlab_rails['db_adapter'] = 'mysql2' gitlab_rails['db_encoding'] = 'utf8' gitlab_rails['db_host'] = '127.0.0.1' gitlab_rails['db_port'] = '3306' gitlab_rails['db_username'] = 'gitlab_user' gitlab_rails['db_password'] = 'password' gitlab_rails['db_database'] = “gitlab”

apt-get install libmysqlclient-dev gitlab-ctl reconfigure

cd /opt/gitlab/embedded/bin/ ./gem install -i /opt/gitlab/embedded/service/gem/ruby/2.1.0 mysql2 -v0.3.16

(You can ignore the error or run gem install with –no-ri or update rdoc) Edit file /opt/gitlab/embedded/service/gitlab-rails/.bundle/config and change mysql to postgres.

BUNDLE_WITHOUT: development:test:postgres

Run gitlab-rake gitlab:setup

Moving Data By default, omnibus-gitlab stores Git repository data under /var/opt/gitlab/git-data: repositories are stored in /var/opt/gitlab/git-data/repositories, and satellites in /var/opt/gitlab/git-data/gitlab-satellites. You can change the location of the git-data parent directory by adding the following line to /etc/gitlab/gitlab.rb.

git_data_dir “/mnt/nas/git-data”

Voir aussi

Références

  • Partager le signet (social bookmarking)
  • Partager "Gitlab" sur del.icio.us
  • Partager "Gitlab" sur Digg
  • Partager "Gitlab" sur blogmarks
  • Partager "Gitlab" sur Google
  • Partager "Gitlab" sur Facebook
  • Partager "Gitlab" sur Twitter