인디노트

How to Install Git 2.19 on CentOS/RHEL 7/6, Fedora 28/27/26 본문

개발 플랫폼 및 언어

How to Install Git 2.19 on CentOS/RHEL 7/6, Fedora 28/27/26

인디개발자 2018. 10. 8. 19:57

Git has released 2.19 version on Oct 05, 2018. Git is a free and open source distributed version control system. It is designed to handle a small to very large projects with speed and efficiency. To read more details and changes about Git 2.18 read release notes. If you are using a Git repository for your development, then you must require a git client on your system and you need to install git client on your workstation system.

install git

This tutorial will help you to install git 2.19 on CentOS/RHEL 7/6 and Fedora 28/27/26/25 operating systems using the source code. For beginners visit Git console on your browser and learn Git uses and command line tips.

Step 1 – Prerequsities

Before installing Git from source code, make sure you have already installed required packages on your system. If not use the following command to install the required packages.

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

Step 2 – Install Git on CentOS & Fedora

Download latest Git source code from kernel git or simply use following command to download Git 2.19.1.

cd /usr/src
wget https://www.kernel.org/pub/software/scm/git/git-2.19.1.tar.gz
tar xzf git-2.19.1.tar.gz

After downloading and extracting Git source code, Use the following command to compile the source code.

cd git-2.19.1
make prefix=/usr/local/git all
make prefix=/usr/local/git install

Step 3 – Setup Environment

After installation of git client. Now you just need to set binary in the system environment. Set the PATH variable with newly installed git binary in /etc/bashrc by executing below command. Also, reload the changes in the current environment.

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

After completing the steps. Let’s use the following command to check the current git version.

git --version

git version 2.19.1

Git has been successfully installed on your system. Next, you can visit our Git tutorialssection to read more about.

반응형
Comments