当前位置: 移动技术网 > 网络运营>服务器>Linux > CentOS 最新版本git的安装教程

CentOS 最新版本git的安装教程

2019年04月27日  | 移动技术网网络运营  | 我要评论

centos6.5自带的git版本是1.7.1

卸载自带的git

# yum remove git

下载最新版git

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

解压

# tar zxvf v2.9.2.tar.gz
# cd git-2.9.2

编译安装

# make configure
# ./configure --prefix=/usr/local/git --with-iconv=/usr/local/libiconv
# make all doc
# sudo make install install-doc install-html

修改环境变量

# sudo vim /etc/profile

在最后一行添加

export path=/usr/local/git/bin:$path

保存后使其立即生效

# source /etc/profile

查看是否安装成功

#git --version

在pycharm中修改git指向

file->settings->version control->git->path to git executable:

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

以上所述是小编给大家介绍的centos 最新版本git的安装教程,希望对大家有所帮助

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网