Centos-610-源码安装GIT
作者:互联网
- 安装约定
源码目录 /opt/tools
安装目录 /usr/local/git
- 卸载旧版本GIT
yum remove git -y
- 安装依赖包
yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel nss gcc perl-ExtUtils-MakeMaker wget -y
- GIT仓库
https://mirrors.edge.kernel.org/pub/software/scm/git/
- 下载安装
cd /usr/local/src wget https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.9.5.tar.xz tar xf git-2.9.5.tar.xz cd git-2.9.5 make prefix=/usr/local/git all make prefix=/usr/local/git install
- 环境配置
vi /etc/profile
在文件底部参照截图进行配置
保持退出
source /etc/profile (使配置生效)
- 安装验证
git --version
显示如截图则说明Git安装成功;若按照失败请根据提示检查相关配置
标签:git,tar,Centos,安装,610,devel,源码,usr,local 来源: https://www.cnblogs.com/oumi/p/13151127.html