Installing Git from on CentOS, RHEL & Oracle 6/7/8 Linux
Read Time:2 Minute, 8 Second

Installing Git from on CentOS, RHEL & Oracle 6/7/8 Linux

0 0
0 0


In this guide, we are about to start with how to install Git on Centos, RHEL, Oracle 6/7/8 Linux versions.

Git is a software used for version control. It designed especially for programmers to version control. It supports almost most of all programming codes. Junio C Hamano a Japanese software engineer who developed it, the initial version released long back by 2005 and licenced under GPLv2.

Resolve the Dependencies

Install the required dependencies

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

Download Git Source

Download the latest tar file from If you wish to download an older version you can find the same from below URL.

Let us download the latest version for now.

# cd /usr/local/
# wget
Download Git from the

Extract and Prepare

Once downloaded the tar file extract and navigate to the extracted directory. It’s better to move the extracted content under /usr/local/ to start the compile future.

# tar zxvf git-2.23.0.tar.gz
# cd git-2.23.0/

Compile and Install

Once navigated to the extracted directory start to prepare for installation by running make.

# make prefix=/usr/local/git all
Run make to prepare for installation

Then run install to start the installation.

# make prefix=/usr/local/git install
Install the Git

Define Environment Variable

Set the environment Variable to run git commands from any location. Once done source it.

# echo "export PATH=$PATH:/usr/local/git/bin" >> /etc/bashrc
# source /etc/bashrc

Or exit the session and re-login.

Verify Version

After completing with the installation let us check for the installed version by running

# git --version

We have installed with the latest version from the

[root@corcls3 ~]# git --version
git version 2.23.0
[root@corcls3 ~]#

The above steps are working perfectly on RHEL based operating system versions 6,7 and 8 as well. We have tested and worked perfectly. In case, if you have any issue while compiling or installing kindly let us know through the comment section.


Git used for version control by most of all programmer. Above guide walk through how to setup git from the downloaded source. Subscribe to the newsletter and stay tuned for upcoming articles. Your feedbacks are welcome through below comment section.

About Post Author

Babin Lonston

Overall 14+ Years of experience in the IT field, currently working as a Senior Linux administration with Virtualization & Cloud. Being numismatist for a long time.
0 0 %
0 0 %
0 0 %
0 0 %
0 0 %
0 0 %

Average Rating

5 Star
4 Star
3 Star
2 Star
1 Star

One thought on “Installing Git from on CentOS, RHEL & Oracle 6/7/8 Linux

Leave a Reply

Your email address will not be published.

Previous post Adding exclusion list for Symantec NetBackup client Backup
Next post Granting Access control List (ACL) for a user on a file in Solaris 11

Subscribe To Our Newsletter

Join our mailing list to receive the latest news and updates from our team.

We promise not to spam you, and we don't usually send more than one email a week.

You have Successfully Subscribed!

Exit mobile version