【Git】Bitnamiで簡単にGitLabをインストール
Git Repositoryは色々とサービスがある。 code breakやBitbucket、もちろん王道のGitHub 今回は自前で建てたい&どうせなら使いやすいものがいい。
非公開設定が可能で、MergeRequestやpullRequest、それにコメントが付けられるようなもの。
そうなるとやっぱりGitLabだ。
ただ、ネットで検索してみると結構複雑なインストールが必要になる。 そこまで詳しいわけでもないし、とりあえず使いたい。
過去にRedmineをインストールしたとき色々と四苦八苦し、 結果立ち上がったはいいものの、こんな苦労するものなのかと。 その後、Bitnamiの存在を知り、クリーンアップ後にBitnamiを使ってインストールした時 簡単な応答のみでインストールすることができた。
去年あたりからBitnamiを見ていたらBitnamiでもGitLabがインストールできるとのこと。 練習用にって思いつつそのまま時間が過ぎてしまったので重い腰を上げ(必要に迫られて) インストールをしてみたらなんと簡単で且つ15分もかからずにできてしまった。
今回はその手順を備忘録として記しておく。
まずはBitnamiからダウンロード
# wget https://bitnami.com/redirect/to/39039/bitnami-gitlab-7.1.1-0-linux-x64-installer.run --2014-08-07 13:32:11-- https://bitnami.com/redirect/to/39039/bitnami-gitlab-7.1.1-0-linux-x64-installer.run Resolving bitnami.com... 50.17.235.25 Connecting to bitnami.com|50.17.235.25|:443... connected. ERROR: certificate common name `assets.bitnami.com' doesn't match requested host name `bitnami.com'. To connect to bitnami.com insecurely, use `--no-check-certificate'.
--no-check-certificateをつけろって怒られたので再度
# wget --no-check-certificate https://bitnami.com/redirect/to/39039/bitnami-git
ダウンロードが完了したらchmodでアクセス権を変更
# chmod 775 bitnami-gitlab-7.1.1-0-linux-x64-installer.run
そして実行します。
# ./bitnami-gitlab-7.1.1-0-linux-x64-installer.run
ここからは応答形式になるので、質問に答えながら進みます。 ※簡単にコメントだけ書いておきます。
---------------------------------------------------------------------------- Welcome to the Bitnami Gitlab Stack Setup Wizard. ---------------------------------------------------------------------------- Select the components you want to install; clear the components you do not want to install. Click Next when you are ready to continue. GitLab : Y (Cannot be edited) // 継続的インテグレーション(アプリのテストや自動化) GitLab CI [Y/n] :Y // 上記の選択で正しいか Is the selection above correct? [Y/n]: Y ---------------------------------------------------------------------------- Installation folder Please, choose a folder to install Bitnami Gitlab Stack Select a folder [/opt/gitlab-7.1.1-0]: ---------------------------------------------------------------------------- Create Admin account Bitnami Gitlab Stack admin user creation // アカウントの作成(メールアドレス) Email Address [user@example.com]: xxxxxx@xxxx.xxx // ログインユーザ Login [user]: loginuser // パスワード入力 Password : Please confirm your password : ---------------------------------------------------------------------------- Web Server Port Please enter the port that the bundled Apache Server will listen to by default. // port設定 Apache Web Server Port [80]: 80 Warning: Unable to bind to the given port number. Please select another one. Press [Enter] to continue: ---------------------------------------------------------------------------- Web Server Port Please enter the port that the bundled Apache Server will listen to by default. // portが使用されているため、別のポートを設定 Apache Web Server Port [80]: 8080 ---------------------------------------------------------------------------- Web Server Port Please enter the port that the bundled Apache Server will use for SSL access. // port設定 SSL Port [443]: 443 Warning: Unable to bind to the given port number. Please select another one. Press [Enter] to continue: ---------------------------------------------------------------------------- Web Server Port Please enter the port that the bundled Apache Server will use for SSL access. // portが使用されているため、別のポートを設定 SSL Port [443]: 8043 ---------------------------------------------------------------------------- MySQL Information Please enter your MySQL database information: // port設定 MySQL Server port [3306]: 3303 ---------------------------------------------------------------------------- Hostname that will be used to create internal URLs. If this value is incorrect, you may be unable to access your Gitlab installation from other computers. It is advisable to use a Domain instead of an IP address for compatibility with different browsers. Domain [xxx.xxx.xxx.xxx]: // メールサポートが必要か Do you want to configure mail support? [y/N]: y ---------------------------------------------------------------------------- Configure SMTP Settings This is required so your application can send notifications via email. Default email provider: // 送られてくるメールのSMTP設定 [1] GMail [2] Custom Please choose an option [1] : 1 ---------------------------------------------------------------------------- Configure SMTP Settings This data is stored in the application configuration files and may be visible to others. For this reason, it is recommended that you do not use your personal account credentials. // Gmailを選択したのでメールアドレスを設定 GMail address []: xxxxxxx@gmail.com // Gmailパスワード入力 GMail password : Re-enter : ---------------------------------------------------------------------------- Setup is now ready to begin installing Bitnami Gitlab Stack on your computer. // 続行確認 Do you want to continue? [Y/n]: y ---------------------------------------------------------------------------- Please wait while Setup installs Bitnami Gitlab Stack on your computer. Installing 0% ______________ 50% ______________ 100% ######################################### ---------------------------------------------------------------------------- Setup has finished installing Bitnami Gitlab Stack on your computer. Info: To access the Bitnami Gitlab Stack, go to http://xxx.xxx.xxx.xxx:8080 from your browser. Press [Enter] to continue:
長かったですが、数個の質問に答えるだけで簡単にインストールできちゃいました。
最後のSetup&installsで10分ほどかかりました。 インストールしたサーバが低スペックだったからかも・・・
最後に出てくるhttp://xxx.xxx.xxx.xxx:8080に接続するとGitLabが使用可能になります。
お手軽にできるインストール方法でした。 これでやっとソースのレビューがやりやすくなる・・・
今度はBitnamiでインストールしたGitLabのバージョンアップ方法とか細かい設定があれば書いていこうかな。