阿里雲Ecs服務器安裝Git

yum安裝

yum install git

自定義版本安裝

https://mirrors.edge.kernel.org/pub/software/scm/git/

在Linux上下載git

wget https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.25.0.tar.gz

下載相關依賴

sudo yum -y install zlib-devel openssl-devel cpio expat-devel

解壓

tar -zxvf git-2.8.0.tar.gz

編譯

    cd git-2.8.0
    make configure
    ./configure
    make
    make install
    echo "export PATH=$PATH:/usr/local/git/bin" >> /etc/bashrc
    source /etc/bashrc  

./configure時可能出現問題
更換命令

uname -m
./configure --host=x86_64

host後面時uname -m執行後的結果

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