centos6.5安装git

安装git是由于vue-cli须要git去下载webpack这样的模板vue

1,     安装编译git时须要的包webpack

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

2, 删除已有的git .  
yum remove git

3, 下载git源码.git

wget https://github.com/git/git/archive/v2.13.0.tar.gzgithub

tar zxvf v2.13.0.tar.gzweb

咱们能够从https://github.com/HYPERLINK "http://lib.csdn.net/base/git" \o "Git知识库" \t "_blank"Git/git/releases 查看最新版的,而后把wget后面的版本换成最新的vue-cli

4, 编译安装bash

cd git-2.13.0make prefix=/usr/local/git all
make prefix=/usr/local/git install
echo "export PATH=$PATH:/usr/local/git/bin" >> /etc/bashrc
source /etc/bashrc
PSmake prefix=/usr/local/git all这一步可能会报错如:Can't locate ExtUtils/MakeMaker.pm in @INC….解决方案:yum install perl-ExtUtils-CBuilder perl-ExtUtils-MakeMaker  而后再从新执行make prefix=/usr/local/git all
5, 检查一下版本号
git --version
相关文章
相关标签/搜索