Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Apparently my server is running CentOS 4.8 with Cpanel

uname -a
2.6.9-023stab048.6-enterprise #1 SMP  MSK 2008 i686 i686 i386 GNU/Linux

cat /etc/redhat-release
CentOS release 4.8 (Final)

I'd prefer to install it as a service but I cannot seem to install "yum git-daemon" there is no package available for CentOS 4.8 (when I try to include another repos for it I get too many dependency failures)

So what's the easiest way to just start it? Typically this is how I do it from CLI

git daemon --detach --user=git --group=git

Thanks for any help!

share|improve this question

4 Answers 4

Either copy over the /etc/init.d/ssh file to /etc/init.d/git, and change the ssh commands to git, or find an existing init script for git and install it.

Here's an example: http://robescriva.com/2009/01/13/git-daemon-init-scripts-on-centos-52

Then do this:

chkconfig add git

For more info, see the man page for chkconfig(8).

share|improve this answer

The URL mentioned in dmarti's response has changed. The working link is: http://robescriva.com/blog/2009/01/13/git-daemon-init-scripts-on-centos-52/

The script seems to work ok with CentOS 6.2. Two changes were needed:

  • entered the correct base-path
  • provided the fully qualified path for the git-daemon as /usr/libexec/git-core/git-daemon was not in PATH
share|improve this answer

I've seen that script and another but they are based on Centos5 which has the proper yum repos for git-daemon and that package can make and install only under 5.x

So their script fails on my centos4 and I get this:

service git-daemon start
Starting git-daemon: execvp: No such file or directory

because git-daemon doesn't exist

But your idea to start with the ssh script is excellent, I didn't know which one I could mimic and that's a good one.

share|improve this answer

A hopefully helpful note to others in the future who are trying to install git and/or git-daemon on a Centos 4 or 5 server that is running cpanel

cpanel is preventing these backages from installing via yum because perl* is specifically excluded from any yum updates

temporarily remove perl* from /etc/yum.conf then you can install then put perl* back in there

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.