How to add git to an amazon ami ec2 instance
To install git on amazon ami is really simple. Make sure you have sudo and then run yum to install it.
sudo yum install git
That's it. The output should be something like:
\$ sudo yum install git
Loaded plugins: fastestmirror, priorities, security
Determining fastest mirrors
amzn-main | 2.1 kB 00:00
amzn-main/primary_db | 1.6 MB 00:00
amzn-updates | 2.3 kB 00:00
amzn-updates/primary_db | 233 kB 00:00
Setting up Install Process
Resolving Dependencies
--> Running transaction check
--> Processing Dependency: git = 1.7.2.5-1.16.amzn1 for package: perl-Git-1.7.2.5-1.16.amzn1.i686
---> Package git.i686 0:1.7.4.5-1.21.amzn1 set to be updated
--> Running transaction check
---> Package perl-Git.i686 0:1.7.4.5-1.21.amzn1 set to be updated
--> Finished Dependency ResolutionDependencies Resolved
==============================================================================================================================
Package Arch Version Repository Size
==============================================================================================================================
Updating:
git i686 1.7.4.5-1.21.amzn1 amzn-main 4.4 M
Updating for dependencies:
perl-Git i686 1.7.4.5-1.21.amzn1 amzn-main 16 kTransaction Summary
Install 0 Package(s)
Upgrade 2 Package(s)Total download size: 4.4 M
Is this ok [y/N]: y
Downloading Packages:
(1/2): git-1.7.4.5-1.21.amzn1.i686.rpm | 4.4 MB 00:00
(2/2): perl-Git-1.7.4.5-1.21.amzn1.i686.rpm | 16 kB 00:00
Total 7.9 MB/s | 4.4 MB 00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : git-1.7.4.5-1.21.amzn1.i686 1/4
Updating : perl-Git-1.7.4.5-1.21.amzn1.i686 2/4
Cleanup : git-1.7.2.5-1.16.amzn1.i686 3/4
Cleanup : perl-Git-1.7.2.5-1.16.amzn1.i686 4/4Updated:
git.i686 0:1.7.4.5-1.21.amzn1Dependency Updated:
perl-Git.i686 0:1.7.4.5-1.21.amzn1Complete!