博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
CentOS 7.5 如何升级Git实录
阅读量:4187 次
发布时间:2019-05-26

本文共 613 字,大约阅读时间需要 2 分钟。

CentOS7自带的git版本1.8.3.1,这个版本有点低了。于是决定折腾升级, 实操记录在此:

1、确认你的当前git版本

在终端输入:

git --version
 

2、使用root账号

在终端终入:

su root
然后输入root账号的密码,注意linux下输密码时界面是没有变化的

 

3、配置存储库

启用Wandisco GIT存储库,在此之前我们先写入新yum存储库配置文件,在终端输入:

vim /etc/yum.repos.d/wandisco-git.repo
按i,进入插入模式,输入:
[wandisco-git]
name=Wandisco GIT Repository
baseurl=http://opensource.wandisco.com/centos/7/git/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://opensource.wandisco.com/RPM-GPG-KEY-WANdisco
按ESC键,然后输入:wq回车,保存存退出

 

4、导入存储库GPG密钥

在终端输入:

sudo rpm --import http://opensource.wandisco.com/RPM-GPG-KEY-WANdisco
 

5、安装Git

在终端输入:

yum install git
 

6、验证Git版本

在终端输入:

git --version

转载地址:http://zzcoi.baihongyu.com/

你可能感兴趣的文章