08 September 2010

Installing git on a CentOS server with WHM/cPanel

Recently I had the need to install git on a CentOS server. It was not a trivial process by any means but after a lot of googling we finally had a win. The steps I took were:

1. Configure EPEL repository for use by yum:


rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm


2. Install git using yum:

yum install git


However I encountered a dependency problem with perl-Git. It seemed that no matter what I did I could not "find" this package using yum. After a lot of searching I came across the following blog post:
http://www.cmdln.org/2010/05/07/install-git-on-centos-cpanel-server/

Essentially cpanel configures yum to exclude perl updates to protect it's own packages. Thankfully there is a one-time work-around to disable the excludes for a particular repo so the following command worked for my git install:


yum --disableexcludes=main install git


Win!

3 comments:

  1. you save my day ! thanks a lot

    ReplyDelete
  2. Is this risk free? I don't know much of servers and I'm afraid of doing this and provoke cPanel stop working.

    ReplyDelete
  3. Thanks a lot!, you saved my time.

    ReplyDelete