CentOS6.xにGitLabをインストールしてみた

外部でソースのやり取りをする必要があったので、さくらのVPS(CentOS6)にGitLabをインストールしてみた。

(1)まずは必要なアプリケーションの導入


yum install -y curl openssh-server openssh-clients postfix cronie

(2)GitLabのインストール


curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
yum install gitlab-ce

(3)GitLabの初期設定


vi /etc/gitlab/gitlab.rb

追加した設定は以下のもの

external_url 'http://ore.lsv.jp:81/git'
gitlab_rails['time_zone'] = 'Asia/Tokyo'
gitlab_rails['manage_backup_path'] = true
gitlab_rails['backup_path'] = "/backup/gitlab"
gitlab_rails['backup_archive_permissions'] = 0644
gitlab_rails['backup_keep_time'] = 604800
unicorn['worker_timeout'] = 600
unicorn['worker_processes'] = 1
unicorn['listen'] = '127.0.0.1'
unicorn['port'] = 8088
nginx['listen_port'] = 81
nginx['listen_https'] = false
postgresql['shared_buffers'] = "128MB"
postgresql['work_mem'] = "8MB"
postgresql['effective_cache_size'] = "32MB"

(4)GitLabのビルド

gitlab-ctl reconfigure

・・・

Running handlers:
Running handlers complete
Chef Client finished, 424/603 resources updated in 03 minutes 41 seconds
gitlab Reconfigured

となったところで、完了です。

起動しているかステータスを確認するには、

gitlab-ctl status

とします。また、再起動する場合には、

gitlab-ctl restart

で再起動が可能です。

(5)GitLabへのログイン

external_urlで指定したurlにアクセスします。

初回ログインIDはrootです。パスワードは画面で新規登録します。

 

次回はGitLabにユーザやプロジェクト作成してみたいと思います。

コメントを残す

メールアドレスが公開されることはありません。

CAPTCHA