Linux-CentOS6.9安装Git

Linux-CentOS6.9安装Git

一、直接使用yum安装

yum install git

二、或者从源代码安装

安装依赖

yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel

yum install asciidoc xmlto docbook2x

下载

cd /data0/software

wget -O git-2.17.0.tar.gz https://github.com/git/git/archive/v2.17.0.tar.gz

解压

tar zxvf git-2.17.0.tar.gz

cd git-2.17.0/

安装

make configure
./configure --prefix=/usr
make all doc info
make install install-doc install-html install-info

查看版本 检查是否安装成功

git --version

git version 2.17.0

whereis git

git: /usr/bin/git /usr/share/man/man1/git.1 /usr/share/man/man1/git.1.gz

/usr/bin/git --version

git version 2.17.0

官网安装说明

https://git-scm.com/book/zh/v2/%E8%B5%B7%E6%AD%A5-%E5%AE%89%E8%A3%85-Git

git官网中文说明教程

https://git-scm.com/book/zh/v2/

你可能感兴趣的:(Linux,Cuber)