Wednesday, November 21, 2012

Install GIT on CentOS/RedHat



first need to login as root and need to install dependencies

yum -y install zlib-devel openssl-devel cpio expat-devel gettext-devel

now

 cd /usr/local/src

download the source of git using :
wget http://git-core.googlecode.com/files/git-1.7.9.tar.gz

extact file :
tar xvzf git-1.7.9.tar.gz

now into source direcotry

cd git-1.7.9

now configure a makefile using below command
./configure

compile the code using below command
make

now start installation using below
make install

after completion of installation make one directory which you want to make a git repository

for eg.
mkdir /opt/test
cd /opt/test
git init

if all will be done properly and git has been installed properly you will get message like below

Initialized empty Git repository in /opt/test/.test/
install git,git on cent os,git on redhat,redhat,cent os,install git on redhat