查看: 9|回复: 0

[Centos] CentOS 最新版本git的安装教程

[复制链接]

1

主题

0

回帖

0

积分

热心网友

金币
0
阅读权限
220
精华
0
威望
0
贡献
0
在线时间
0 小时
注册时间
2010-11-12
发表于 2023-9-22 00:00:00 | 显示全部楼层 |阅读模式

CentOS6.5自带的git版本是1.7.1

卸载自带的git

?
1
# yum remove git

下载最新版git

?
1
# wget https://github.com/git/git/archive/v2.9.2.tar.gz

解压

?
1
2
# tar zxvf v2.9.2.tar.gz
# cd git-2.9.2

编译安装

?
1
2
3
4
# make configure
# ./configure --prefix=/usr/local/git --with-iconv=/usr/local/libiconv
# make all doc
# sudo make install install-doc install-html

修改环境变量

?
1
# sudo vim /etc/profile

在最后一行添加

?
1
export PATH=/usr/local/git/bin:$PATH

保存后使其立即生效

?
1
# source /etc/profile

查看是否安装成功

?
1
#git --version

在pycharm中修改git指向

File->Settings->Version Control->Git->Path to Git executable:

选择/usr/local/git/bin/git

以上所述是小编给大家介绍的CentOS 最新版本git的安装教程,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对服务器之家网站的支持!

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

相关侵权、举报、投诉及建议等,请发 E-mail:qiongdian@foxmail.com

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部