码迷,mamicode.com
首页 > 其他好文 > 详细

centos6 升级Git版本

时间:2019-08-29 12:05:38      阅读:125      评论:0      收藏:0      [点我收藏+]

标签:nbsp   sci   centos6   get   usr   prefix   figure   ica   asc   

操作步骤如下:

yum remove -y git  #卸载旧版本Git
yum install -y tk zlib-devel openssl-devel perl cpio expat-devel gettext-devel  asciidoc xmlto autoconf  #安装依赖,否则一路报错....
wget https://www.kernel.org/pub/software/scm/git/git-2.1.2.tar.gz  
tar xf v2.2.1.tar.gz
cd git-2.2.1
make configure 
./configure --prefix=/usr/local/git --with-iconv=/usr/local/libiconv   #添加 iconv 支持
make all doc  #编译并生成帮助文档
make install install-doc install-html #安装程序
echo "export PATH=$PATH:/usr/local/git/bin" >> ~/.bash_profile
echo "export GIT_SSL_NO_VERIFY=1" > ~/.bash_profile     (如果不加入这句会出现fatal Peer certificate cannot be authenticated with known CA certificate)
source ~/.bash_profile
git --version

Git 项目地址:https://github.com/git/git

 

centos6 升级Git版本

标签:nbsp   sci   centos6   get   usr   prefix   figure   ica   asc   

原文地址:https://www.cnblogs.com/panwenbin-logs/p/11428432.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!