How can git be installed on CENTOS 5.5?
If you are using CentOS the built in yum
repositories don't seem to have git
included and as such, you will need to add an additional repository to the system. For my servers I found that the Webtatic repository seems to be reasonably up to date and the installation for git
will then be as follows:
# Add the repository
rpm -Uvh http://repo.webtatic.com/yum/centos/5/latest.rpm
# Install the latest version of git
yum install --enablerepo=webtatic git-all
To work around Missing Dependency: perl(Git)
errors:
yum install --enablerepo=webtatic --disableexcludes=main git-all
From source? From the repos? The easiest way is to use the repos: sudo yum install git
should do it. It may first be necessary to set up an additional repo such as EPEL first if git is not provided by the main repos.
If you want to install from source, you can try these instructions. If you have yum-utils
installed it's actually easier than that, too**:
sudo yum build-dep git
wget http://kernel.org/pub/software/scm/git/<latest-git-source>.tar.gz
tar -xvjf <latest-git>.tar.gz
cd <git>
make (possibly a ./configure before this)
sudo make install
**Substitute the portions enclosed in <>
with the paths you need. Exact procedure may vary slightly as I have not compiled git from source, personally (there may be a configure script, for example). If you have no idea what I'm talking about, then you may want to just install from the repo as per my first suggestion.