linux安装git

安装之前需要先安装好git需要的依赖包

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

下载并编译git

# 下载
# wget https://www.kernel.org/pub/software/scm/git/git-1.8.3.1.tar.gz
# tar xzf git-1.8.3.1.tar.gz
# 编译和验证
# cd git-1.8.3.1
# 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
# git –version

0

发表评论

邮箱地址不会被公开。