A simple sharing today, seems that installing git on CentOS5 (I am using CentOS 5.8 for some testing) requires different steps rather than the Ubuntu distribution I used previously.
First, you got to install some git dependencies:
[root@localhost ~]# yum -y install zlib-devel openssl-devel cpio expat-devel gettext-devel
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
* base: mirror.hmc.edu
* extras: mirror.compevo.com
* updates: mirror.hmc.edu
Setting up Install Process
Package cpio-2.6-26.el5.x86_64 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package expat-devel.i386 0:1.95.8-11.el5_8 set to be updated
---> Package expat-devel.x86_64 0:1.95.8-11.el5_8 set to be updated
---> Package gettext-devel.i386 0:0.17-1.el5 set to be updated
---> Package gettext-devel.x86_64 0:0.17-1.el5 set to be updated
---> Package openssl-devel.i386 0:0.9.8e-37.el5_11 set to be updated
--> Processing Dependency: krb5-devel for package: openssl-devel
---> Package openssl-devel.x86_64 0:0.9.8e-37.el5_11 set to be updated
---> Package zlib-devel.i386 0:1.2.3-7.el5 set to be updated
---> Package zlib-devel.x86_64 0:1.2.3-7.el5 set to be updated
--> Running transaction check
---> Package krb5-devel.x86_64 0:1.6.1-80.el5_11 set to be updated
--> Processing Dependency: libselinux-devel for package: krb5-devel
--> Processing Dependency: e2fsprogs-devel for package: krb5-devel
--> Processing Dependency: keyutils-libs-devel for package: krb5-devel
--> Running transaction check
---> Package e2fsprogs-devel.x86_64 0:1.39-37.el5 set to be updated
---> Package keyutils-libs-devel.x86_64 0:1.2-1.el5 set to be updated
---> Package libselinux-devel.x86_64 0:1.33.4-5.7.el5 set to be updated
--> Processing Dependency: libsepol-devel >= 1.15.2-1 for package: libselinux-devel
--> Running transaction check
---> Package libsepol-devel.x86_64 0:1.15.2-3.el5 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
expat-devel i386 1.95.8-11.el5_8 base 132 k
expat-devel x86_64 1.95.8-11.el5_8 base 129 k
gettext-devel i386 0.17-1.el5 base 364 k
gettext-devel x86_64 0.17-1.el5 base 380 k
openssl-devel i386 0.9.8e-37.el5_11 updates 1.9 M
openssl-devel x86_64 0.9.8e-37.el5_11 updates 1.9 M
zlib-devel i386 1.2.3-7.el5 base 102 k
zlib-devel x86_64 1.2.3-7.el5 base 103 k
Installing for dependencies:
e2fsprogs-devel x86_64 1.39-37.el5 base 639 k
keyutils-libs-devel x86_64 1.2-1.el5 base 27 k
krb5-devel x86_64 1.6.1-80.el5_11 updates 1.9 M
libselinux-devel x86_64 1.33.4-5.7.el5 base 149 k
libsepol-devel x86_64 1.15.2-3.el5 base 192 k
Transaction Summary
================================================================================
Install 13 Package(s)
Upgrade 0 Package(s)
Total download size: 7.8 M
Downloading Packages:
(1/13): keyutils-libs-devel-1.2-1.el5.x86_64.rpm | 27 kB 00:00
(2/13): zlib-devel-1.2.3-7.el5.i386.rpm | 102 kB 00:00
(3/13): zlib-devel-1.2.3-7.el5.x86_64.rpm | 103 kB 00:00
(4/13): expat-devel-1.95.8-11.el5_8.x86_64.rpm | 129 kB 00:00
(5/13): expat-devel-1.95.8-11.el5_8.i386.rpm | 132 kB 00:00
(6/13): libselinux-devel-1.33.4-5.7.el5.x86_64.rpm | 149 kB 00:00
(7/13): libsepol-devel-1.15.2-3.el5.x86_64.rpm | 192 kB 00:00
(8/13): gettext-devel-0.17-1.el5.i386.rpm | 364 kB 00:01
(9/13): gettext-devel-0.17-1.el5.x86_64.rpm | 380 kB 00:01
(10/13): e2fsprogs-devel-1.39-37.el5.x86_64.rpm | 639 kB 00:02
(11/13): openssl-devel-0.9.8e-37.el5_11.x86_64.rpm | 1.9 MB 00:06
(12/13): krb5-devel-1.6.1-80.el5_11.x86_64.rpm | 1.9 MB 00:06
(13/13): openssl-devel-0.9.8e-37.el5_11.i386.rpm | 1.9 MB 00:06
--------------------------------------------------------------------------------
Total 240 kB/s | 7.8 MB 00:33
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : gettext-devel 1/13
Installing : zlib-devel 2/13
Installing : e2fsprogs-devel 3/13
Installing : keyutils-libs-devel 4/13
Installing : libsepol-devel 5/13
Installing : libselinux-devel 6/13
Installing : krb5-devel 7/13
Installing : expat-devel 8/13
Installing : expat-devel 9/13
Installing : openssl-devel 10/13
Installing : gettext-devel 11/13
Installing : zlib-devel 12/13
Installing : openssl-devel 13/13
Installed:
expat-devel.i386 0:1.95.8-11.el5_8 expat-devel.x86_64 0:1.95.8-11.el5_8
gettext-devel.i386 0:0.17-1.el5 gettext-devel.x86_64 0:0.17-1.el5
openssl-devel.i386 0:0.9.8e-37.el5_11 openssl-devel.x86_64 0:0.9.8e-37.el5_11
zlib-devel.i386 0:1.2.3-7.el5 zlib-devel.x86_64 0:1.2.3-7.el5
Dependency Installed:
e2fsprogs-devel.x86_64 0:1.39-37.el5 keyutils-libs-devel.x86_64 0:1.2-1.el5
krb5-devel.x86_64 0:1.6.1-80.el5_11 libselinux-devel.x86_64 0:1.33.4-5.7.el5
libsepol-devel.x86_64 0:1.15.2-3.el5
Complete!
Next, we need to change the directory to source directory:
[root@localhost ~]# cd /usr/local/src
And then proceed to download git.
[root@localhost ~]# wget https://git-core.googlecode.com/files/git-1.9.0.tar.gz
After the download is done, extract the tar package.
[root@localhost ~]# tar xvzf git-1.9.0.tar.gz
Change the working directory to:
[root@localhost src]# cd git-1.9.0
Once done, invoke the below commands one by one (always wait for each to finish the tasks first):
[root@localhost ~]# ./configure
[root@localhost ~]# make
[root@localhost ~]# make install
And you're done! :O)