Install Gitorious on CentOS 5

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:

  1. 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.
  2. 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.
  3. Install rubygems: yum -y install rubygems git
  4. Install puppet from gem repos: gem install --no-ri --no-rdoc facter puppet
  5. Clone the repo into /etc/puppet:
    sudo -i
    git clone git:// /etc/puppet
  6. Go into modules/gitorious/manifests/init.pp and change the value of $mail_server to match the SMTP server you want.
  7. Run the standalone puppet tool to apply the recipe on the local machine puppet /etc/puppet/manifests/site.pp

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.

Preview handlers

I’m using Office 2007 for some time now and the ability to preview the content of some files without actually opening them in the dedicated editor is quite nice. It’s a pity that the number of supported file types is so small. A good thing is that they everyone can create such a preview handler, because the API is publicly available and documented on MSDN. So I looked around the net today for some handlers that would allow me to preview zip archives and some other common file types – like .as or .mxml. One of the interesting resources I’ve stumbled onto is a blog post that links to a msdn article and also to download the handlers demoed. Get at it here. Another pack of handlers for some of the programming language files is here.

Oh, and these handlers work for Windows Vista too, so if you have the preview pane opened, it will load a quick preview of the file in there.

An update plugin to update the host

I hate updating wordpress. It takes time and I need to be (slightly) carefull of what I do – I’ve already set up stuff once, I’d really hate to have to do it all over again. So I started for an automatic tool that would do this for me and would run within the confines of a go daddy hosted account.

Fortunatelly someone else had the same problem, and so I’ve found the Instant Upgrade plugin (google search for it). It only took me 5 minutes to set up (partly thanks to FileZilla’s recursive permission changer) and then I’ve simply activated and clicked a large button. In about 5 minutes it was all over and I’m up-to-date with my wordpress. And if it weren’t for that annoying text poping up that I need to upgrade I wouldn’t have done it.

Setting up subversion on Windows

svn logoToday I had something to test that required a svn repository. Since my home repository wasn’t answering my calls (well, pings actually) I decided to do a quick install of the svn server on my Windows XP box. From what I remembered it should have been simple enough.

After restarting all the process at one point, because I hadn’t paid attention to the warning about Apache 2.2, I found my Apache 2.0 refused to load the dav_svn module and couldn’t figure out why. A quick search on Google revealed the cause, but it still was annoying. Continue reading

How the mac messed my morning

Weird title, but true. Today I planned to make my life easier when working with files from my home. For this I want to install a Lamp server using Ubuntu’s Server edition. Since I had a mac handy, I burnt the iso downloaded from the ubuntu site with the Disk utility app. And proceeded to install.

Now, I’m not saying that the Disk utility program is a bad app, just that in this case it put a lot of corrupted files onto the disk, and thus the installation failed. Now, the machine I plan on using is pretty old, and its cd drive has a reputable age also, so I tried it for a few times, thinking that the drive was at fault. Since it kept refusing to work, I moved back to my laptops, moved the iso to my windows machine and burnt it using it’s built-in software. Now the install went flawlessly.

That’s the rant for today.

P.S. On how I’ve set up my server, in a different post.