ちょっと前に、GithubのクローンであるGitLab-6.5をCentOS6.4に導入するという記事を書きましたが、

Omnibus-GitLabというのを使えばもっと簡単にインストール出来るようです。

[browser-shot width=”600″ url=”https://about.gitlab.com/downloads/”]

 

以下の手順は、CentOS6.5のminimal install状態からの手順です。

 

Contents

1. iptables, SELinuxの無効化

$ sudo service iptables stop
$ sudo chkconfig iptables off
$ sudo setenforce 0
$ sudo vi /etc/selinux/config
  # SELINUX=disabled に変更

 

2. 必要なツールのインストール

$ sudo yum -y update
$ sudo yum -y groupinstall 'Development Tools'
$ sudo yum -y install wget which``

 

3. 最新版gitをインストール

CentOS 6.5のgitは1.7なので…

$ sudo yum -y install curl-devel expat-devel gettext-devel openssl-devel zlib-devel perl-ExtUtils-MakeMaker
$ cd /usr/local/src
$ git clone git://github.com/git/git.git
$ cd git-1.9.0/
$ sudo make configure
$ ./configure --prefix=/usr/local --with-curl --with-expat
$ sudo make all
$ sudo make install

configure時に”–with-curl”オプションを付けないと、httpによるgit remote操作で

fatal: Unable to find remote helper for ‘https’
というようなエラーになってしまいます。これはクライアント側のgitでも起こります。

4. gitlabインストール

Omnibus GitLabは簡単にインストールできます。

まずはダウンロード。

$ wget https://downloads-packages.s3.amazonaws.com/centos-6.5/gitlab-7.1.1_omnibus-1.el6.x86_64.rpm
$ sudo yum -y install openssh-server
$ sudo yum -y install postfix
$ sudo rpm -i gitlab-7.1.1_omnibus-1.el6.x86_64.rpm

それから、

$ sudo -e /etc/gitlab/gitlab.rb

アプリケーションの設定をします。gitlab.rbは以下のようにしました。

external_url 'http://ip.of.your.server'

user['git_user_email'] = "gitlab@gitlab.com"

# SMTP
gitlab_rails['smtp_enable'] = true
gitlab_rails['smtp_address'] = "localhost"
gitlab_rails['smtp_domain'] = "gitlab.com"
gitlab_rails['gitlab_email_from'] = "gitlab@gitlab.com"

gitlabのサーバーurlや、新規ユーザー登録時などメールでの通知を行うのでその時の設定とかです。

この設定ファイルを次のコマンドで読み込みます。

$ sudo gitlab-ctl reconfigure
$ sudo gitlab-ctl show-config   // 確認用コマンド
$ sudo lokkit -s http -s ssh

これで完了です。
途中で表示されますが、いつものように
ユーザー: root
パスワード: 5iveL!fe
でログインしましょう。

いままでのインストールの面倒くささからすると、こんなに簡単でいいのかって感じですね。

 

関連記事

fitbitの睡眠スコアを90弱で安定させる良い睡眠を続ける簡単な方法

m1 ipad pro 12.9 2021のusb-cハブはコレがベスト

Time Machine不要!Macを11.2.3にダウングレードして原神をm1 macbook airでプレイする

MH-Z19CとM5StickCで二酸化炭素濃度モニタリング

【神軽量HMD】Avegant Glyph 改造: 瓶詰堂さんのaltglyphを作った

PC、iPad、Android、switchもドックいらず!あまりに万能なusb-cハブが最強だった

コメント

コメントを返信する

メールアドレスが公開されることはありません。 が付いている欄は必須項目です