git編譯安裝

1.安裝依賴包:

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

2.下載git:

wget https://www.kernel.org/pub/software/scm/git/git-2.3.6.tar.gz

3.建立git用戶:

[root@myhost1 ~]# useradd -r -m git

4.編譯安裝:

[root@myhost1 git-2.3.6]# cd /tmp/git-2.3.6

[root@myhost1 git-2.3.6]# ./configure --prefix=/usr/local/git-2.3.6

[root@myhost1 git-2.3.6]# make && make install

[root@myhost1 git-2.3.6]# ln -s git-2.3.6 git

5.測試:

[root@myhost1 local]# git --version

git version 2.3.6


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章