LoginSignup
1
0

More than 5 years have passed since last update.

Redmineが動いているサーバーにgitLabをインストールする

Last updated at Posted at 2017-09-29

環境

CentOS 6.7
Redmine 3.2.0 (稼働中)
GitLab Community Edition 9.5.5

やりたいこと

redmineが稼働しているサーバーに、同ドメインでポートを分けてgitLabを動かしたい。こんなかんじに↓
http://redmine.sample/
http://redmine.sample:8000/

redmineはApacheで動いているけど、gitLabはNginxで動くみたい。

gitLabの公式ページに従ってインストール

gitLab公式ページ: https://about.gitlab.com/installation/#centos-6

なにも考えずに書かれてるとおりコマンドを打つ

$ sudo yum install -y curl openssh-server cronie
$ sudo lokkit -s http -s ssh
$ sudo yum install postfix
$ sudo service postfix start
$ sudo chkconfig postfix on
$ curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.rpm.sh | sudo bash
$ sudo yum -y install gitlab-ee
$ sudo gitlab-ctl reconfigure

Redmineにアクセスできなくなった

「このサイトにアクセスできません」…:rolling_eyes:

とりあえずファイアウォールを停止してみたら見れた。
$ sudo /etc/rc.d/init.d/iptables stop

どうやら、2番目のコマンド $ sudo lokkit -s http -s ssh がiptablesを書き換えてしまう模様。
redmineのポートを復活させなければ…
(コマンドは意味を理解してから打とうね自分)

Redmineを復活させる

/etc/httpd/conf.d/redmine.conf を見たらポート443で動いていたので443を許可する

$ sudo vi /etc/sysconfig/iptables
-A INPUT -m state --state NEW -m tcp -p tcp --dport 443 -j ACCEPT を追記

再起動
$ sudo /etc/rc.d/init.d/iptables restart

復活しました:v:

gitLabの設定

URLの設定

/etc/gitlab/gitlab.rb
external_url 'http://redmine.sample:8000/'

reconfigure
$ sudo gitlab-ctl reconfigure

これだけでgitLabにアクセスできました!:v:

※ 最初、sudoを付けずに gitlab-ctl reconfigure して、あれ~表示されない…ってしばらくやって無駄な時間を過ごしました。
/var/opt に書き込み権限がなくてもろもろのファイルが生成されなかったようです。…:rolling_eyes:

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0