GitLabのインストール
プライベートリポジトリの管理のためWebベースのツールを探してたところ、GitLabが良さそうだったので試してみた。
こちらの説明でほぼ大丈夫ですが、ubuntu/debian向けに記載されてあり細かい部分で躓いたので作業ログを残しておきます。
OSはCentOSです。
必要なパッケージをインストール
root$ yum install gcc root$ yum install gcc-c++ root$ yum install sqlite-devel root$ yum install readline-devel root$ yum install git root$ yum install python-devel root$ yum install libxml2-devel root$ yum install libxslt-devel root$ yum install openssl-devel root$ yum install make root$ yum install patch root$ easy_install pygments
gitユーザー追加
root$ adduser --shell /bin/sh --home /home/git git root$ passwd -uf git
※このユーザーにはsudoのALL権限を与えました。最終的に /bin/rmだけでいいです。
gitosisのインストール
root$ git clone git://eagain.net/gitosis.git root$ cd gitosis/ root$ sudo python setup.py install git$ ssh-keygen -t rsa //この鍵ペアでgitosisの管理にアクセスする git$ sudo -H -u git gitosis-init < ~/.ssh/id_rsa.pub git$ sudo chmod 755 /home/git/repositories/gitosis-admin.git/hooks/post-update
※gitosisはyumから導入すると勝手にgitosisというユーザーを作成するのでgithubからいれました。
gitconfig設定(しておかないと後々エラーになってはまった)
git$ git config --global user.name "name" git$ git config --global user.email "email"
rvmでrubyのインストール
root$ bash < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer ) root$ rvm pkg install readline root$ rvm pkg install openssl root$ rvm pkg install zlib root$ rvm install 1.9.2 root$ rvm gem update --system root$ rvm gem install bundle root$ rvm gem install linecache19
gitlabのインストール
git$ git clone git://github.com/gitlabhq/gitlabhq.git git$ cd gitlabhq git$ bundle git$ bundle exec rake db:setup RAILS_ENV=production git$ bundle exec rake db:seed_fu RAILS_ENV=production
gitlabの起動・アクアス
git$ cd gitlab git$ vim conf/gitosis.yml 必要に応じて変更 git$ rails s -e production
http://hostname:3000でアクセスできます。
はまった部分
gitユーザーにgitconfigを設定しておかないとブラウザからの操作でエラーになった。
python-develを入れておかないとPygments::Lexeを呼ぶ部分でLib.soが下記エラーをはく
“Could not open library ‘lib.so’: lib.so: cannot open shared object file: No such file or directory”
次はWebrickでなくpassengerで動くよう設定してみます。

コメントはまだありません。