Linux-GIT源代码包安装

安装Git

下载安装包

个人收集

wget http://cunqi0105-1300757323.cos.ap-shanghai.myqcloud.com/install-pkg/git-2.24.1.tar.gz

官方下载

下载地址:https://mirrors.edge.kernel.org/pub/software/scm/git/

image-20200614225320092

安装依赖文件

yum -y install curl-devel expat-devel gettext-devel openssl-devel zlib-devel asciidoc xmlto docbook2x autoconf automake libtool

systemctl stop firewalld && setenforce 0 && systemctl disable firewalld

编译安装

cd /root && tar zxvf git-2.24.1.tar.gz  -C /usr/src/ && cd /usr/src/git-2.24.1

make configure

./configure --prefix=/usr/local/git && make && make install

添加变量文件

export PATH=/usr/local/git/bin:$PATH

source /etc/profile

git --version

rm -rf /usr/src/git-2.24.1

 

posted @ 2020-07-22 16:06  孤独的小人物  阅读(182)  评论(0编辑  收藏  举报