Difference between revisions of "Install Git Specific Version in Linux CentOS"
Jump to navigation
Jump to search
m (Gejor moved page Install Git in Linux CentOS to Install Git Specific Version in Linux CentOS without leaving a redirect) |
|||
Line 6: | Line 6: | ||
[root@gejoreuy ~]# yum install gcc perl-ExtUtils-MakeMaker | [root@gejoreuy ~]# yum install gcc perl-ExtUtils-MakeMaker | ||
− | Install Git ( | + | Install Git (As example, we install git version 2.25.0, we can change the version with our needs). |
[root@gejoreuy ~]# cd /root/Downloads | [root@gejoreuy ~]# cd /root/Downloads |
Revision as of 10:01, 12 September 2020
Step by Step
Prerequisites.
[root@gejoreuy ~]# yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel [root@gejoreuy ~]# yum install gcc perl-ExtUtils-MakeMaker
Install Git (As example, we install git version 2.25.0, we can change the version with our needs).
[root@gejoreuy ~]# cd /root/Downloads [root@gejoreuy Downloads]# wget https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.25.0.tar.gz [root@gejoreuy Downloads]# tar xzf git-2.25.0.tar.gz
Compile the source code.
[root@gejoreuy Downloads]# cd git-2.25.0 [root@gejoreuy git-2.25.0]# make prefix=/usr/local/git all [root@gejoreuy git-2.25.0]# make prefix=/usr/local/git install
Setup environment.
[root@gejoreuy git-2.25.0]# echo 'export PATH=/usr/local/git/bin:$PATH' >> /etc/bashrc [root@gejoreuy git-2.25.0]# source /etc/bashrc
Check if the installation successfully with checking the git version.
[root@gejoreuy git-2.25.0]# git --version