Tuesday, August 13, 2019

GIT Installation

Required packages before installation

Install the prerequisite packages and remove the any current Git installation.


yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel -y
yum install gcc perl-ExtUtils-MakeMaker -y
yum remove git -y

Download the latest Git installation from kernel.org and unpack it.

cd /usr/src
wget https://www.kernel.org/pub/software/scm/git/git-2.x.x.tar.gz
tar xzf git-2.2.2.tar.gz
Install it.

cd git-2.2.2
make prefix=/usr/local/git all
make prefix=/usr/local/git install
echo "export PATH=$PATH:/usr/local/git/bin" >> /etc/bashrc
source /etc/bashrc
Test it, by checking the version.

git --version


No comments:

Post a Comment