Recently I had to install Gitorious on a CentOS machine. Instructions on how to do this are in a document inside the gitorious code base, but since I needed something repeatable and reliable, I’ve turned to my tool of choice – Puppet.
So I’ve created a Puppet recipe which installs Gitorious behind a Phusion Passenger/Apache setup. You can get it on GitHub, here. The steps you must follow to use this recipe are:
- Install the base OS. I’ve tested it on a bare-bones machine, installed via the CentOS-NetInstall iso disk. I then just picked the Base packages and started the install.
- Add the Epel repository in order to get rubygems working. There are other ways of doing this (from source, other 3rd party repos) but this is the way I did it.
- Install rubygems:
yum -y install rubygems git
- Install puppet from gem repos:
gem install --no-ri --no-rdoc facter puppet
- Clone the repo into /etc/puppet:
git clone git://github.com/civascu/puppet_recipes.git /etc/puppet
- Go into modules/gitorious/manifests/init.pp and change the value of $mail_server to match the SMTP server you want.
- Run the standalone puppet tool to apply the recipe on the local machine
That’s it. Just point your browser to http://yourserver/ and you should be greeted by the Gitorious page.
Be aware though, that if you do not set a fully qualified domain name (e.g. server.domain) you won’t be able to login or perform other actions that require a valid session in Firefox.