Sunday, March 20, 2011

Git server on CentOS 5.5

This post is adapted from:

A. Yum Repositories:

You will need EPEL repository:

rpm -Uivh

B. Getting git installed:

1. Install Git and XinetD daemon:
yum -y install \
git \

All your repositories are under [/var/lib/git].

To change that just follow these instructions (I rather not change it):

1.1. Changing Git root dir
MY_GIT_ROOT_DIR=>where will all git projects be<
mkdir -p ${MY_GIT_ROOT_DIR}
chmod 755 ${MY_GIT_ROOT_DIR}
chown root:root ${MY_GIT_ROOT_DIR}

1.2. Adjust the daemon xinetd setup to use the new directory: /etc/xinetd.d/git
server_args = --base-path=>where will all git projects be< ...

2. Put XinetD to run:

service xinetd restart
chkconfig --level 345 xinetd on

3. Creating a project:

After that you just need to follow the instructions given on the link below: