How to install latest version of git on CentOS release 6.8 (Final)?

Install latest version of git on CentOS release 6.8 -

Step 1. Install Dependencies - 
yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel gcc perl-ExtUtils

Step 2. Get the latest version of git to your server -
cd /usr/src
wget https://www.kernel.org/pub/software/scm/git/git-2.10.0.tar.gz

Step 3. Extract the zip folder -  tar -xvzf git-2.10.0.tar.gz

Step 4. Compile the code -
cd git-2.10.0
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

Step5. Check git version - git --version

 

Was this answer helpful?

 Print this Article

Also Read

How to perform LAMP installation on CentOS?

LAMP stands for Linux, Apache, MySQL, and PHP. It is nothing but Linux operating system with...

Basic exim commands

1. REMOVE MAILS BY ID - /usr/sbin/exim -v -Mrm (MAIL ID HERE) 2. LIST QUEUED MAILS -...

Daily Useful Linux Commands

Finding the username from provided hosting service name - /script/whoowns domain_name Finding...

Disk Usage Useful Command

Note - You can replace /home with correct '/' drive on your server. 1. Checking the disk usage -...

How to backup and restore large MySQL databases using mysqldump?

1. Backup database:#mysqldump -u username -p[username_password] databasename >...