5Aug/090
How to Install the Latest git on CentOS 5 from Source
To install the latest git on CentOS 5 you will need to install from source since the yum repos are typically fairly far behind. Follow the instructions below and installing git will be a snap.
- Install Dependencies: First we need to install a couple packages via yum to cover the dependencies for building git from source.
1 2 | [root@server ~] #cd /usr/local/src [root@server ~] # wget http://www.kernel.org/pub/software/scm/git/git-1.6.0.4.tar.gz |
1 2 3 | [root@server ~] #tar -zxvf git-1.6.0.4.tar.gz [root@server ~] #cd git-1.6.0.4 [root@server ~] #make prefix=/usr/local all |
1 | [root@server ~] #make prefix=/usr/local/ install |
1 2 | [root@server ~] #cd /usr/local/src [root@server ~] #wget http://www.kernel.org/pub/software/scm/git/git-manpages-1.6.0.4.tar.gz |
1 2 | [root@server ~] #cd /usr/local/share/man [root@server ~] #tar -zxvf /usr/local/src/git-manpages-1.6.0.4.tar.gz |
1 2 | [root@server ~] #git --version [root@server ~] #man git |
After following the above steps you should be able to successfully use git.
[root@server ~]#yum install curl-devel
[root@server ~]#yum install expat-devel
[root@server ~]#yum install gettext-devel
[root@server ~]#yum install openssl-devel
[root@server ~]#yum install zlib-devel
[root@server ~]#yum install expat-devel
[root@server ~]#yum install gettext-devel
[root@server ~]#yum install openssl-devel
[root@server ~]#yum install zlib-devel