by Devin Yang

建立於: 5年前 ( 更新: 5年前 )

本文使用的CentOS 6.2進行,進行重build curl及git過程。
主因是因為作業系統太舊,我想直接由source build最新版本的git。
cat /etc/redhat-release
CentOS release 6.2 (Final)

但進行下方指令時,出現了 SSL connect error的錯誤。
git clone https://github.com/git/git.git

因為舊版的CentOS,所以網路提供的方式..
yum update -y nss curl
的更新方式無效了,
所以..我就自己重Build curl。
先在另一台電腦,clone,最新版本的curl。
git clone https://github.com/curl/curl

依其說明,查看GIT-INFO檔,如何編譯。
我執行
./buildconf
./configure
make

就順順利利的編譯完curl了。接著使用make install直接安裝。
完成後,重試git repo的下載(註: 其實到可以到release下載釋出的版本)
[root@myserver src]# git clone https://github.com/git/git.git
Cloning into 'git'...
remote: Counting objects: 247464, done.
remote: Total 247464 (delta 0), reused 0 (delta 0), pack-reused 247463
Receiving objects: 100% (247464/247464), 90.42 MiB | 1.16 MiB/s, done.
Resolving deltas: 100% (182891/182891), done.
Checking connectivity... done.

順立clone了git的source囉.
進入git的repo資料夾。
依README.md說明,查看INSTALL檔,如何安裝。
$ make configure ;# as yourself
$ ./configure --prefix=/usr ;# as yourself
$ make all doc ;# as yourself
# make install install-doc install-html;# as root

果真,按步施工,保證成功。但我只單純進行如下動作。打了./configure,不設定prefix。
make configure
./configure
make
make install

就搞定囉,但是,發覺,疑版本是rc1版本。
[root@myserver git]# which git
/usr/local/bin/git
[root@myserver git]# git --version
git version 2.18.0.rc1

雖然是RC的版本了,基本上不太會有問題才對,看起來滿正常的..:)
[root@myserver src]# git clone https://github.com/DevinY/dlaravel.git
Cloning into 'dlaravel'...
remote: Counting objects: 1456, done.
remote: Compressing objects: 100% (36/36), done.
remote: Total 1456 (delta 27), reused 42 (delta 16), pack-reused 1398
Receiving objects: 100% (1456/1456), 3.03 MiB | 948.00 KiB/s, done.
Resolving deltas: 100% (866/866), done.

想想後,我又重build了2.17.1版了,這次到release處透過wget下載,並解壓縮重build。

簡單的用,
./configure
make
make install
最後畫面如下搞定囉,安裝了2.17.1版啦。
		rm -f "$execdir/$p" && \
		test -z "" && \
		ln "$execdir/git-remote-http" "$execdir/$p" 2>/dev/null || \
		ln -s "git-remote-http" "$execdir/$p" 2>/dev/null || \
		cp "$execdir/git-remote-http" "$execdir/$p" || exit; \
	done && \
	./check_bindir "z$bindir" "z$execdir" "$bindir/git-add"
[root@myserver git-2.17.1]# which git
/usr/local/bin/git
[root@myserver git-2.17.1]# git --version
git version 2.17.1
[root@myserver git-2.17.1]#
以上即是這次我在舊版本CentOS 6.2更新git的過程。
 

Tags: linux

Devin Yang

文章內容無法一一說明,如果您有什麼不了解處,歡迎提問哦:)

No Comment

Post your comment

需要登入才可留言!

類似的文章


linux, python, colab

如何從我們的Server透過ssh連線到colab?

介紹我寫的一支bash,用來透過ssh連線到colab vm內。 一行指令,搞定colab OpenSSH Server。

linux,security

ssh-agent及ssh-add認證代理員

在ssh的核心套件中的程式諸如,scp、ssh、ssh-add、ssh-agent、sshd及ssh-keygen 讓我們來談談ssh-agent及ssh-add使用情境吧。 在開始前先來看看這些指令用途的簡介:

linux

rsync如何自動允許ssh金鑰指紋

當我們第一次使用ssh進行主機連線時,會顯示一個主機金鑰的指紋確認。 有時進行一些自動化的排程使用rsync,或許遠端主機變更了,需要自動允許, 如何讓ssh自動允許指紋進行連線,不需使用互動模式手動去壓yes呢?