|
先检查git 是否已经安装 :
[iyunv@localhost src]# rpm -q git
进行安装
[iyunv@localhost src]# yum install git
Loaded plugins: fastestmirror, security
Determining fastest mirrors
* base: mirrors.opencas.cn
* extras: mirrors.opencas.cn
* updates: mirrors.opencas.cn
base | 3.7 kB 00:00
extras | 3.4 kB 00:00
updates | 3.4 kB 00:00
updates/primary_db | 3.2 MB 00:01
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: rsync 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
--> Processing Dependency: libz.so.1(ZLIB_1.2.0)(64bit) 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
---> Package rsync.x86_64 0:3.0.6-12.el6 will be installed
---> Package zlib.x86_64 0:1.2.3-27.el6 will be updated
--> Processing Dependency: zlib = 1.2.3-27.el6 for package: zlib-devel-1.2.3-27.el6.x86_64
---> Package zlib.x86_64 0:1.2.3-29.el6 will be an update
--> Running transaction check
---> Package zlib-devel.x86_64 0:1.2.3-27.el6 will be updated
---> Package zlib-devel.x86_64 0:1.2.3-29.el6 will be an update
--> 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
rsync x86_64 3.0.6-12.el6 base 335 k
Updating for dependencies:
zlib x86_64 1.2.3-29.el6 base 73 k
zlib-devel x86_64 1.2.3-29.el6 base 44 k
Transaction Summary
=====================================================================================================================================================
Install 4 Package(s)
Upgrade 2 Package(s)
Total download size: 5.1 M
Is this ok [y/N]: y
Downloading Packages:
(1/6): git-1.7.1-3.el6_4.1.x86_64.rpm | 4.6 MB 00:01
(2/6): perl-Error-0.17015-4.el6.noarch.rpm | 29 kB 00:00
(3/6): perl-Git-1.7.1-3.el6_4.1.noarch.rpm | 28 kB 00:00
(4/6): rsync-3.0.6-12.el6.x86_64.rpm | 335 kB 00:00
(5/6): zlib-1.2.3-29.el6.x86_64.rpm | 73 kB 00:00
(6/6): zlib-devel-1.2.3-29.el6.x86_64.rpm | 44 kB 00:00
-----------------------------------------------------------------------------------------------------------------------------------------------------
Total 2.3 MB/s | 5.1 MB 00:02
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA256 Signature, key ID c105b9de: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
Importing GPG key 0xC105B9DE:
Userid : CentOS-6 Key (CentOS 6 Official Signing Key) <centos-6-key@centos.org>
Package: centos-release-6-2.el6.centos.7.x86_64 (@anaconda-CentOS-201112091719.x86_64/6.2)
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
Is this ok [y/N]: y
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : zlib-1.2.3-29.el6.x86_64 1/8
Installing : 1:perl-Error-0.17015-4.el6.noarch 2/8
Installing : rsync-3.0.6-12.el6.x86_64 3/8
Installing : perl-Git-1.7.1-3.el6_4.1.noarch 4/8
Installing : git-1.7.1-3.el6_4.1.x86_64 5/8
Updating : zlib-devel-1.2.3-29.el6.x86_64 6/8
Cleanup : zlib-devel-1.2.3-27.el6.x86_64 7/8
Cleanup : zlib-1.2.3-27.el6.x86_64 8/8
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 rsync.x86_64 0:3.0.6-12.el6
Dependency Updated:
zlib.x86_64 0:1.2.3-29.el6 zlib-devel.x86_64 0:1.2.3-29.el6
Complete!
安装成功:
[iyunv@localhost src]# git --version
接下来就参考官方的文档吧!http://git-scm.com/book/zh/v1
版权声明:本文为博主原创文章,未经博主允许不得转载。 |
|
|
|
|
|
|