centos6.5安裝git

軟件包鏈接:https://git.kernel.org/pub/scm/git/git.git/snapshot/git-2.7.2.tar.gz

官網鏈接:https://git.kernel.org/pub/scm/git/git.git/refs/tags

wget下載https開頭的網址域名 時報錯,你可能需要加上 --no-check-certificate 選項

例如:wget --no-check-certificate https://git.kernel.org/pub/scm/git/git.git/snapshot/git-2.7.2.tar.gz

1、安裝編譯git時需要的包

# yum -y install gcc openssl openssl-devel curl curl-devel unzip perl perl-devel expat expat-devel zlib zlib-devel asciidoc xmlto gettext-devel openssh-clients

2、新建文件夾 mkdir

# cd /usr/local

# mkdir? git

3、下載解壓tar包

#wget --no-check-certificate https://git.kernel.org/pub/scm/git/git.git/snapshot/git-2.7.2.tar.gz

# tar xzf git-2.7.2.tar.gz

4、編譯安裝

# make prefix=/usr/local/git all doc

# make prefix=/usr/local/git install

5、 配置環境變量

# vim /etc/profile

底部追加 export PATH=/usr/local/git/bin:$PATH

# source /etc/profile? 使更新生效

6、安裝成功

? ? ? git --version

顯示版本號“git version 2.7.2”

最后編輯于
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。

推薦閱讀更多精彩內容