Wednesday, 18 July 2012

INSTALL GIT ON CENTOS CPANEL SERVER

I have a love/hate rela­tion­ship with cpanel. On one hand it makes low end host­ing a breeze, on the other its a huge pita if you want to do any­thing “out­side the box”. Per­haps it’s not such a pain if you work with cpanel fre­quently. But I find cpanel ben­e­fi­cial because it aids in tasks that I don’t do fre­quently, and can offload many of those tasks to less tech­ni­cal people.

I was recently set­ting up a cpanel instance for some­one and had the need to install git for ver­sion con­trol. I con­fig­ured the epel repos­i­tory for use as usual and went to yum install git only to be met with a nasty error.

git-1.5.5.6-2.el5.i386 from epel has depsolving problems
--> Missing Dependency: perl(Error) is needed by package
git-1.5.5.6-2.el5.i386 (epel)
git-1.5.5.6-2.el5.i386 from epel has depsolving problems
--> Missing Dependency: perl-Git = 1.5.5.6-2.el5 is needed by package
git-1.5.5.6-2.el5.i386 (epel)
git-1.5.5.6-2.el5.i386 from epel has depsolving problems
--> Missing Dependency: perl(Git) is needed by package
git-1.5.5.6-2.el5.i386 (epel)
Error: Missing Dependency: perl(Git) is needed by package
git-1.5.5.6-2.el5.i386 (epel)
Error: Missing Dependency: perl(Error) is needed by package
git-1.5.5.6-2.el5.i386 (epel)
Error: Missing Dependency: perl-Git = 1.5.5.6-2.el5 is needed by package
git-1.5.5.6-2.el5.i386 (epel)


I was pretty sur­prised as I have installed git with­out issue before on Cen­tOS boxes before. A bit of dig­ging showed that installing cpanel actu­ally made some mod­i­fi­ca­tions to my /etc/yum.conf.
exclude=apache* bind-chroot courier* dove­cot* exim* httpd* mod_ssl* mysql* nsd* perl* php* proftpd* pure-ftpd* ruby* spa­mas­sas­sin* squirrelmail*

So cpanel has blocked all perl pack­ages from being installed or updated because they don’t want updates to break or con­flict with their pack­ages. Thank­fully yum pro­vides a nice one time workaround for this kind of situation.
–disableexcludes=[repo]
dis­able exclude from main, for a repo or for
everything

So one com­mand later and I now have git installed.



 yum --disableexcludes=main install git


No comments:

Post a Comment