安装需求:
1. ># yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel asciidoc
2. ># yum install gcc perl-ExtUtils-MakeMaker
卸载Centos自带的git1.7.1:
通过git –version查看系统带的版本,Cento6.5应该自带的是git版本是1.7.1
># yum remove git
下载git2.2.1并将git添加到环境变量中
1. ># wget https://github.com/git/git/archive/v2.2.1.tar.gz
2. ># tar zxvf v2.2.1.tar.gz
3. ># cd git-2.2.1
4. ># make configure
5. ># ./configure --prefix=/usr/local/git --with-iconv=/usr/local/libiconv
6. ># make all doc
7. ># make install install-doc install-html
8. ># echo "export PATH=$PATH:/usr/local/git/bin" >> /etc/bashrc
9. ># source /etc/bashrc
查看版本号
1. ># git --version标签:git,tar,make,devel,升级,version,install,linux From: https://blog.51cto.com/u_15882671/5871556
2. >git version 2.2.1