GitLab - yusukew62/docs GitHub Wiki
公式サイトをもとに構築
事前準備
# yum install curl openssh-server openssh-clients postfix cronie
# service postfix start
# chkconfig postfix oniptablesの設定
# cd /etc/sysconfig/
# cp -p iptables iptables.org設定差異
# diff -wu iptables.org iptables
--- iptables.org 2017-05-27 11:27:42.617999964 +0900
+++ iptables 2017-05-27 11:57:12.134559439 +0900
@@ -8,6 +8,7 @@
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
+-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMITiptablesの再起動
# service iptables restartGitLabのインストール
# curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
# yum install gitlab-ce
# gitlab-ctl reconfigureWebブラウザからアクセス
http://<IPアドレス>/
gitlab.rgの修正
# cd /etc/gitlab
# cp -p gitlab.rb gitlab.rb.org
# vi gitlab.rb設定差異
# diff -wu gitlab.rb.org gitlab.rb
--- gitlab.rb.org 2017-05-27 11:48:21.287559646 +0900
+++ gitlab.rb 2017-05-27 12:02:20.125560058 +0900
@@ -10,7 +10,7 @@
##! URL on which GitLab will be reachable.
##! For more details on configuring external_url see:
##! https://docs.gitlab.com/omnibus/settings/configuration.html#configuring-the-external-url-for-gitlab
-external_url 'http://gitlab.example.com'
+external_url 'http://192.168.1.26/gitlab'
## Legend
##! The following notations at the beginning of each line may be used to設定反映
# gitlab-ctl reconfigure
# gitlab-ctl restartWebブラウザからアクセス
http://<IPアドレス>/gitlab/