CentOS的yum源中沒有git,只能自己編譯安裝,現在記錄下編譯安裝的內容,留給自己備忘。
確保已安裝了依賴的包
yum install curl |
yum install curl-devel |
yum install zlib-devel |
yum install openssl-devel |
yum install perl |
yum install cpio |
yum install expat-devel |
yum install gettext-devel |
下載最新的git包
yum install git or wget http://www.codemonkey.org.uk/projects/git-snapshots/git/git-latest.tar.gz |
tar xzvf git-latest.tar.gz |
cd git-2011-11-30#你的目錄可能不是這個 |
autoconf |
./configure |
make |
sudo make install |
檢查下安裝的版本,大功告成
git --version |