一、Linux git安装
下载链接:https://www.kernel.org/pub/software/scm/git/
1.1 安装git
1.1.1 下载
wget https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.19.6.tar.gz
1.1.2 安装
yum -y install autoconf automake libtool
yum -y install gcc gcc-c++ make curl curl-devel expat-devel openssl openssl-libs openssl-devel zlib zlib-devel pcre-devel libsepol-devel libcurl libcurl-devel keyutils-libs-devel krb5-devel libcom_err-devel libselinux-devel libverto-devel
yum -y install perl-ExtUtils-MakeMaker
yum -y remove git
tar -zxf git-2.19.6.tar.gz
make configure
./configure --prefix=/usr/local/git
make profix=/usr/local/git
make install
echo "export PATH=\$PATH:/usr/local/git/bin" >> /etc/profile
source /etc/profile
git --version
1.1.3 脚本安装
#!/bin/bash
wget https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.19.6.tar.gz
yum -y install autoconf automake libtool
yum -y install curl-devel expat-devel openssl-devel zlib-devel
yum -y install gcc-c++ perl-ExtUtils-MakeMaker
yum -y remove git
tar -zxf git-2.19.6.tar.gz
make configure
./configure --prefix=/usr/local/git
make profix=/usr/local/git
make install
echo "export PATH=\$PATH:/usr/local/git/bin" >> /etc/profile
source /etc/profile
git --version