目录
参考资料
下载地址
步骤
1.下载包
由于我的服务器是CentOS7,所以选择下载:git-2.9.5.tar.gz 和 git-manpages-2.9.5.tar.gz 。下载地址: https://mirrors.edge.kernel.org/pub/software/scm/git/
不同系统下载方式:
Debian/Ubuntu
For the latest stable version for your release of Debian/Ubuntu
apt-get install git
For Ubuntu, this PPA provides the latest stable upstream Git version
add-apt-repository ppa:git-core/ppa # apt update; apt install git
Fedora
yum install git (up to Fedora 21)
dnf install git (Fedora 22 and later)
Gentoo
emerge --ask --verbose dev-vcs/git
Arch Linux
pacman -S git
openSUSE
zypper install git
Mageia
urpmi git
Nix/NixOS
nix-env -i git
FreeBSD
pkg install git
Solaris 9/10/11 (OpenCSW)
pkgutil -i git
Solaris 11 Express
pkg install developer/versioning/git
OpenBSD
pkg_add git
Alpine
apk add git
Slitaz
tazpkg get-install git
Red Hat Enterprise Linux, Oracle Linux, CentOS, Scientific Linux, et al.
需要从 https://mirrors.edge.kernel.org/pub/software/scm/git/ 下载tar包。
2.git-2.9.5.tar.gz 和 git-manpages-2.9.5.tar.gz上传服务器
3.解压并编译
yum install autoconf
# 如果报错“Can't locate ExtUtils/MakeMaker.pm”则执行命令安装
yum install perl-ExtUtils-CBuilder perl-ExtUtils-MakeMaker
# 如果安装报错没找到 autoconf 命令则执行安装。
yum install asciidoc
# 1.解压安装包
tar -xzvf git-2.9.5.tar.gz
# 2.进入解压后目录
cd git-2.9.5
# 3.编译
make configure
./configure --prefix=/usr
make all doc info
# make install 失败不影响使用
sudo make install install-doc install-html install-info
4.验证
git version
显示:git version 2.9.5
5.结束
标签:git,tar,gz,CentOS7,2.9,Git,install,安装,下载 From: https://www.cnblogs.com/lihw-study/p/16721123.html