In this tutorial we will show you how to install and configuration of Git on your CentOS server. For those of you who didn’t know, Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
1First let’s start by ensuring your system is up-to-date.
- yum clean all
- yum -y update
2Installing Git. "Method 1 — Install Git with Yum" Run the following commands in for installation Git via yum:yuminstall git "Method 2 — Install Git from SourceBefore" installing Git from source code, make sure you have already installed required packages on your system:Once the dependencies have been installed then we need to find out and download the latest version of Git software, At the moment of writing this article it is version 2.10.0:
- yum groupinstall "Development Tools"
- yum install gettext-devel openssl-devel perl-CPAN perl-devel zlib-devel
- wget https://github.com/git/git/archive/v2.10.0.tar.gz tar xvf v2.10.0.tar.gz
3After downloading and extracting Git source code, Use following command to compile source code:
- cd git* make configure /configure --prefix=/usr/local make install
4To check current version installed of Git use following command:
- [[email protected] ~]# git --version git version 2.10.0
- Congratulation’s! You have successfully installed Git. Thanks for using this tutorial for installing Git in CentOS systems. For additional help or useful information,we recommend you to check the official Git web site.