第三章 安装GIT

环境安装

[root@gitlab ~]# rpm -qa centos-release
centos-release-7-4.1708.el7.centos.x86_64
[root@gitlab ~]# uname -a
Linux gitlab 3.10.0-693.el7.x86_64 #1 SMP Tue Aug 22 21:09:27 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
[root@gitlab ~]# getenforce 
Disabled
[root@gitlab ~]# systemctl status firewalld.service 
● firewalld.service - firewalld - dynamic firewall daemon
   Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
   Active: inactive (dead)
     Docs: man:firewalld(1)

YUM安装GIT

#centos 自带git
[root@gitlab ~]# rpm -qa git
git-1.8.3.1-11.el7.x86_64

#安装方法
yum install git -y

编译安装

编译安装可以安装较新版本的git
Git下载地址: https://github.com/git/git/releases

# 安装依赖关系
yum install curl-devel expat-devel gettext-devel  openssl-devel zlib-devel
# 编译安装
tar -zxf git-2.0.0.tar.gz
cd git-2.0.0
make configure
./configure --prefix=/usr
make  
make install  

posted @ 2018-03-21 21:56  云原生运维社区  阅读(124)  评论(0编辑  收藏  举报