本文共 613 字,大约阅读时间需要 2 分钟。
CentOS7自带的git版本1.8.3.1,这个版本有点低了。于是决定折腾升级, 实操记录在此:
1、确认你的当前git版本
在终端输入:
git --version2、使用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-WANdisco5、安装Git
在终端输入:
yum install git6、验证Git版本
在终端输入:
git --version转载地址:http://zzcoi.baihongyu.com/