git 2.x install for centos 7
centos 7.1 버전에서
# cat /etc/*-release
CentOS Linux release 7.1.1503 (Core)
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"
CentOS Linux release 7.1.1503 (Core)
CentOS Linux release 7.1.1503 (Core)
# yum install git
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
No package 2.1* available.
Resolving Dependencies
--> Running transaction check
---> Package git.x86_64 0:1.8.3.1-12.el7_4 will be updated
--> Processing Dependency: git = 1.8.3.1-12.el7_4 for package: perl-Git-1.8.3.1-12.el7_4.noarch
---> Package git.x86_64 0:1.8.3.1-23.el7_8 will be an update
--> Running transaction check
---> Package perl-Git.noarch 0:1.8.3.1-12.el7_4 will be updated
---> Package perl-Git.noarch 0:1.8.3.1-23.el7_8 will be an update
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================================================
Package Arch Version Repository Size
================================================================================================================
Updating:
git x86_64 1.8.3.1-23.el7_8 base 4.4 M
Updating for dependencies:
perl-Git noarch 1.8.3.1-23.el7_8 base 56 k
Transaction Summary
================================================================================================================
Upgrade 1 Package (+1 Dependent package)
Total download size: 4.5 M
Is this ok [y/d/N]: y
Downloading packages:
No Presto metadata available for base
(1/2): perl-Git-1.8.3.1-23.el7_8.noarch.rpm | 56 kB 00:00:00
(2/2): git-1.8.3.1-23.el7_8.x86_64.rpm | 4.4 MB 00:00:00
----------------------------------------------------------------------------------------------------------------
Total 11 MB/s | 4.5 MB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Updating : perl-Git-1.8.3.1-23.el7_8.noarch 1/4
Updating : git-1.8.3.1-23.el7_8.x86_64 2/4
Cleanup : perl-Git-1.8.3.1-12.el7_4.noarch 3/4
Cleanup : git-1.8.3.1-12.el7_4.x86_64 4/4
Verifying : git-1.8.3.1-23.el7_8.x86_64 1/4
Verifying : perl-Git-1.8.3.1-23.el7_8.noarch 2/4
Verifying : git-1.8.3.1-12.el7_4.x86_64 3/4
Verifying : perl-Git-1.8.3.1-12.el7_4.noarch 4/4
Updated:
git.x86_64 0:1.8.3.1-23.el7_8
Dependency Updated:
perl-Git.noarch 0:1.8.3.1-23.el7_8
Complete!
설치하면 git 1.8.3 이 최신 버전이라고 뜬다.
git 2.x 버전으로 설치 하려면
yum -y install https://packages.endpointdev.com/rhel/7/os/x86_64/endpoint-repo.x86_64.rpm
repo 를 추가작업을 진행 하고
# yum install git
하면
# git --version
git version 2.41.0
git 2.x 버전이 설치가 된다.