ゲームジャム等でBitbacketやGitHubを使うと料金が随時かかるためGitLab環境を構築する。
プラン | さくらVPS 1G |
---|---|
サーバーOS | CentOS7 |
環境 | OSX (MacBookPro) |
GitLabのページからOSにあったものを選択すると使用するコマンドが表示
https://about.gitlab.com/downloads/
1. Install and configure the necessary dependencies
sudo yum install curl policycoreutils openssh-server openssh-clients
sudo systemctl enable sshd
sudo systemctl start sshd
sudo yum install postfix
sudo systemctl enable postfix
sudo systemctl start postfix
sudo firewall-cmd --permanent --add-service=http
sudo systemctl reload firewalld
2. Add the GitLab package server and install the package
必要なパッケージはこちらから
curl -LJO https://packages.gitlab.com/gitlab/gitlab-ce/packages/el/7/gitlab-ce-9.3.3-ce.0.el7.x86_64.rpm/download
rpm -i gitlab-ce-9.3.3-ce.0.el7.x86_64.rpm
契約メモリ1GBだと反応が重いので設定修正
# sudo vim /etc/gitlab/gitlab.rb
/etc/gitlab/gitlab.rb
unicorn["worker_processes"] = 1
postgresql["shared_buffers"] = "128MB"
※これの変更は必要なかった external_url 'http://XXXXXXXX.vs.sakura.ne.jp'
3. Configure and start GitLab
# sudo gitlab-ctl reconfigure
表示確認
IPアドレスまたはホスト名(~.sakura.ne.jp)で表示確認
その他未設定項目
・セキュリティ関連
・ログ出力関連