centos7安装git

1.安装依赖项 sudo dnf install curl-devle expat-devel gettext-devel openssl-devel zlib-devel
  sudo dnf install gcc perl-ExtUtils-MakeMaker
  sudo dnf install asciidoc xmlto
  sudo dnf install docbook2X
  cd /usr/bin/
  ln -s db2x_docbook2texi docbook2x-texi
2.下载git源码到本机 wget -c https://git.kernel.org/pub/scm/git/git.git/snapshot/git-2.13.2.tar.gz -O git-2.13.2.tar.gz
3.解压源码 tar -zvxf git-2.13.2.tar.gz
4.cd git-2.13.2
5.sudo dnf install autoconf
6.make configure
7../configure --prefix=/usr
8.make all doc info
9.sudo make install install-doc install-html install-info

你可能感兴趣的:(git,centos)