Skip to content

Instantly share code, notes, and snippets.

@hallkk
Last active April 16, 2019 12:25
Show Gist options
  • Save hallkk/43e68b6de88e2b4f6dec3d09999f87c6 to your computer and use it in GitHub Desktop.
Save hallkk/43e68b6de88e2b4f6dec3d09999f87c6 to your computer and use it in GitHub Desktop.
centos下编译安装git客户端
# 删除旧版本
yum remove git -y
# 安装依赖
yum install gcc -y
yum install curl-devel -y
yum install openssl-devel -y
yum install expat-devel -y
# 下载,解压
cd /tmp
wget https://www.kernel.org/pub/software/scm/git/git-2.10.2.tar.gz
tar zxvf git-2.10.2.tar.gz
cd git-2.10.2
#编译,安装
make prefix=/usr/local all
make prefix=/usr/local install
# 测试安装成功
git --version
git clone ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment