Centos安裝Git
獲得更好的觀看體驗
完整教程
一.yum安裝,版本較低
yum install git
二.原始碼構建
git官方下載鏈接
1.解壓
tar -zxvf git-2.31.1.tar.gz
2.安裝可能所需的依賴
yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel gcc-c++ perl-ExtUtils-MakeMaker
3.安裝
cd git-2.31.1
make configure
./configure --prefix=/usr/local/git
make profix=/usr/local/git
make install
4.加入環境變數
vim /etc/profile
沒有yum install vim
G移到尾部增加
i進入編輯模式
# git
export GIT_HOME=/usr/local/git
export PATH=$PATH:$GIT_HOME/bin
ese : wq保存
重繪環境變數
source /etc/profile
5.完成安裝
git --version

轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/280299.html
標籤:其他
