centos6.5 安裝git

1.安裝編譯git時須要的包git

# yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel

# yum install  gcc perl-ExtUtils-MakeMaker

2.刪除已有的gitbash

# yum remove git

3.下載git源碼,我本身下載的是2.0.0版本的下載地址:http://pan.baidu.com/s/1qXFnOxIcurl

# cd /usr/src
# wget https://www.kernel.org/pub/software/scm/git/git-2.0.5.tar.gz
# tar xzf git-2.0.5.tar.gz

4.編譯安裝url

# cd git-2.0.5
# 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

5.檢查一下版本號spa

# git --version
相關文章
相關標籤/搜索