Created
December 21, 2018 07:26
-
-
Save JessonYue/f0c5db29bb5c1285a3182a7734544532 to your computer and use it in GitHub Desktop.
如何在CentOS 6.x/7.x上安装git及最新版
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
下载 | |
# wget https://www.kernel.org/pub/software/scm/git/git-2.5.0.tar.gz | |
# tar -zxvf git-2.5.0.tar.gz | |
编译安装 | |
# cd git-2.5.0 | |
# make prefix=/usr/local/git all | |
# make prefix=/usr/local/git install | |
# echo "export PATH=$PATH:/usr/local/git/bin" >> /etc/bashrc | |
# source /etc/bashrc | |
检查git版本 | |
# git --version | |
git version 2.5.0 | |
注意:如果安装完查看版本不是我们安装的最新版,请重新执行下面的操作 | |
# yum remove -y git | |
# source /etc/bashrc | |
# git --version |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment