首先從https://git-scm.com/downloads官網(wǎng)下載git最新版本
-
解壓文件,如果文件是
xz格式壓縮則要下載xz解壓工具:# yum install xz # xz -d git.xxx.xz //會把文件解壓成tar # tar xvf git.xx.tar -
進(jìn)行安裝
# cd git-xxx # ./configure # make & make install
出現(xiàn)錯誤缺少GCC,yum 安裝gcc
缺少zlib.h,則在從http://www.zlib.net/下載zlib最新版:zlib-1.2.8.tar.gz,同樣通過configure make make install安裝,再重復(fù)上面的步驟
使用過程種出現(xiàn)問題
fatal: Unable to find remote helper for 'https'
重新編譯安裝
$ yum install curl-devel
$ # cd to wherever the source for git is
$ cd /usr/local/src/git-1.7.9
$ ./configure
$ make
$ make install