centos yum方式安装git

1.查询可用安装包

[harli@cluster04 cluster_13]$ yum list git
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
1. base: centos.ustc.edu.cn
2. extras: centos.ustc.edu.cn
3. updates: ftp.sjtu.edu.cn
Available Packages
git.x86_64 1.7.1-3.el6_4.1

2. 安装

[harli@cluster04 cluster_13]$ sudo yum install git.x86_64
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: centos.ustc.edu.cn
* extras: centos.ustc.edu.cn
* updates: mirrors.pubyun.com
Setting up Install Process
Resolving Dependencies
–> Running transaction check
—> Package git.x86_64 0:1.7.1-3.el6_4.1 will be installed
–> Processing Dependency: perl-Git = 1.7.1-3.el6_4.1 for package: git-1.7.1-3.el6_4.1.x86_64
–> Processing Dependency: perl(Git) for package: git-1.7.1-3.el6_4.1.x86_64
–> Processing Dependency: perl(Error) for package: git-1.7.1-3.el6_4.1.x86_64
–> Running transaction check
—> Package perl-Error.noarch 1:0.17015-4.el6 will be installed
—> Package perl-Git.noarch 0:1.7.1-3.el6_4.1 will be installed
–> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================================================================================

Package Arch Version Repository Size

=============================================================================================================================================================
Installing:
git x86_64 1.7.1-3.el6_4.1 base 4.6 M
Installing for dependencies:
perl-Error noarch 1:0.17015-4.el6 base 29 k
perl-Git noarch 1.7.1-3.el6_4.1 base 28 k

**

Transaction Summary

**

=============================================================================================================================================================
Install 3 Package(s)

Total download size: 4.7 M
Installed size: 15 M
Is this ok [y/N]:
输入Y即可
Downloading Packages:
(1/3): git-1.7.1-3.el6_4.1.x86_64.rpm | 4.6 MB 00:01
(2/3): perl-Error-0.17015-4.el6.noarch.rpm | 29 kB 00:00

(3/3): perl-Git-1.7.1-3.el6_4.1.noarch.rpm | 28 kB 00:00


Total 2.5 MB/s | 4.7 MB 00:01
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : 1:perl-Error-0.17015-4.el6.noarch 1/3
Installing : perl-Git-1.7.1-3.el6_4.1.noarch 2/3
Installing : git-1.7.1-3.el6_4.1.x86_64 3/3
Verifying : git-1.7.1-3.el6_4.1.x86_64 1/3
Verifying : perl-Git-1.7.1-3.el6_4.1.noarch 2/3
Verifying : 1:perl-Error-0.17015-4.el6.noarch 3/3

Installed:
git.x86_64 0:1.7.1-3.el6_4.1

Dependency Installed:
perl-Error.noarch 1:0.17015-4.el6 perl-Git.noarch 0:1.7.1-3.el6_4.1

Complete!

3. 验证安装结果

[harli@cluster04 cluster_13]$ git –version
git version 1.7.1

你可能感兴趣的:(工具使用)