In this post I’ll tell you how to install git onto Oracle Linux. It’s a standard install from source. But since I always have to lookup how this is done – I’ll drop it here for future reference.
For those of you who don’t like installs from source: don’t worry – it’s easy.
edit: I’ve found an easier way. Described here
I fell in love with “git” a while ago. I like the local commit option, the branching. The complete control you have on what is committed and when.
And most of all: I like the fact that git considers a checkout repository as a whole. Git will tell you if you have uncommitted files “hanging around” in a directory under it’s control. Even if your “git status” command is run deep inside the source-tree. You will get a full list of all files that need attention. Even files in parent and “cousin” directories. I love that!
Oh and git will play nice with subversion. Meaning: you can use git to check-in and out of a subversion repository.
Ok, back the installing.
No yum support *sigh*
I’m not sure why, but Oracle does not support yum install of git. So running
yum install git
on Oracle Linux get’s no result (unless you count “No package git available” as a result).
There are no rpms available either. So off we go doing an installation from source. I’m happy to report that it’s no problem what so ever.
Here’s the procedure :
- Install the dependencies – this can be done with YUM
- Download the source-code and unpack it
- Compile and install the compiled programs
You can find the source packages here. (Remember to click on the version you want – the link in the list is not a download-link). I picked up git version 18.104.22.168 and decided to install git in “/usr/local”
Here we go:
# yum install curl-devel expat-devel gettext-devel \
Download a git version and unpack it
# wget http://git-core.googlecode.com/files/git-22.214.171.124.tar.gz
# tar -xvzf git-126.96.36.199.tar.gz
# cd git-188.8.131.52
Compile and install the compiled programs
# make prefix=/usr/local all
# make prefix=/usr/local install
Now leave root and log-in with a standard user:
$ git --version
git version 184.108.40.206