[[Gitlab]]

*gitlabの簡単インストール [#s2f171f1]
特にまっさら(WebとかDBが動いていない場合)であれば下記手順のみでOK
 # curl -O https://downloads-packages.s3.amazonaws.com/centos-6.6/gitlab-7.5.1_omnibus.5.2.0.ci-1.el6.x86_64.rpm
 # yum localinstall gitlab-7.5.1_omnibus.5.2.0.ci-1.el6.x86_64.rpm
 # cd /etc/gitlab/
 # cp -p gitlab.rb gitlab.rb.org
 - external_url  'gitlab.hoge.com'
 + external_url = 'gitlab.hoge.com'
 
 # gitlab-ctl reconfigure
 # gitlab-ctl start
 

 
*Apacheと共存する場合 [#y377b933]
 既存Apacheはnginxの別ポートへリダイレクトする設定にし、nginxの受付ポートを変更します。
 
 [Apacheの設定:VirtualHost運用]
 # cd /etc/httpd/conf.d/
 # vi gitlab.hoge.com.conf
 <VirtualHost *:80>
  ServerName gitlab.hoge.com
  ProxyPass / http://localhost:8888/
 </VirtualHost>
 # service httpd configtest
 # service httpd graceful
 
 [gitlabの設定]
 # cd /opt/gitlab/embedded/cookbooks/gitlab/templates/default
 # cp -p nginx-gitlab-http.conf.erb nginx-gitlab-http.conf.erb.org
 # vi nginx-gitlab-http.conf.erb
 server {
 <% @listen_addresses.each do |listen_address| %>
 -  listen <%= listen_address %>:<%= @port %>;
 +  listen <%= listen_address %>:8888;
 <% end %>
 # gitlab-ctl reconfigure
 # gitlab-ctl start
 
*リポジトリの保存先変更 [#h425c3b6]
LVMとか切りたい場合とか、S3?とか使いたい場合
 # mkdir /var/opt/git-data
 # mkdir /var/opt/git-data/gitlab-satellites
 # mkdir /var/opt/git-data/repositorie
 # vi /etc/gitlab/gitrab.rb
 + # git-dataの場所を変更する場合
 + gitlab_shell['git_data_directory'] = '/var/opt/git-data'
 + gitlab_rails['satellites_path'] = '/var/opt/git-data/gitlab-satellites'
 + gitlab_rails['gitlab_shell_repos_path'] = '/var/opt/git-data/repositories'
 # gitlab-ctl reconfigure
 # gitlab-ctl restart

*MySQLへの切替え(作成中)下記ファイルを変更しただけではうまくいかない。 [#l2316872]
 mysql> create database データベース;
 mysql> grant all privileges on データベース.* to ユーザー名@localhost identified by 'パスワード';
 mysql> flush privileges;
 # cd /var/opt/gitlab/gitlab-rails/etc/
 # cp -p database.yml database.yml.org

 
*ログインしてとりあえずパスワード変更 [#y33589e0]
 デフォルトユーザー:root
 デフォルトパスワード:5iveL!fe

参考URL:http://d.hatena.ne.jp/toritori0318/20140523/1400863038

トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS