Centos Git installation and upgrade

  • Install dependencies

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

  • If you upgrade, uninstall the old version

yum remove git

  • download new version

wget https://www.kernel.org/pub/software/scm/git/git-2.1.2.tar.gz
tar xzf git-2.1.2.tar.gz

  • Install

cd git-2.1.2
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

  • test

git --version

 

references:

https://blog.csdn.net/feinifi/article/details/79629904

https://blog.csdn.net/u014066037/article/details/70224780

https://blog.csdn.net/zzpzheng/article/details/52132385

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324914126&siteId=291194637