Step-by-Step Guide: Installing Git on RHEL 5.3 x64 via YUM Repository Configuration


2 views

Before proceeding, ensure your RHEL 5.3 system meets these requirements:

  • Root or sudo privileges
  • Existing yum package manager
  • Internet connectivity
  • Compatible architecture (x86_64)

Since RHEL 5.3's default repositories don't include Git, we'll use EPEL (Extra Packages for Enterprise Linux):

# Download and install EPEL RPM
wget https://archive.fedoraproject.org/pub/archive/epel/5/x86_64/epel-release-5-4.noarch.rpm
rpm -Uvh epel-release-5-4.noarch.rpm

Verify the repository configuration:

# Check available repositories
yum repolist

# Verify EPEL is enabled
yum-config-manager --enable epel

Now install Git with all dependencies:

# Install Git core package
yum install git

# For complete Git functionality (optional)
yum install git-all git-gui gitk

Confirm successful installation and check version:

git --version
which git

If repository installation fails, consider compiling from source:

# Install dependencies
yum groupinstall "Development Tools"
yum install zlib-devel perl-ExtUtils-MakeMaker

# Download and compile Git
wget https://www.kernel.org/pub/software/scm/git/git-1.7.12.tar.gz
tar -xzf git-*.tar.gz
cd git-*
make prefix=/usr/local all
make prefix=/usr/local install
  • Dependency errors: Try yum deplist git to identify missing packages
  • Repository conflicts: Use yum clean all and retry
  • SSL issues: Update CA certificates with yum update ca-certificates

Set up basic Git configuration:

git config --global user.name "Your Name"
git config --global user.email "your.email@example.com"
git config --global core.editor vim

Before proceeding, ensure you have root access to your RHEL 5.3 x64 system and a working internet connection. Verify your system architecture:

uname -m

RHEL 5.3's default repositories don't include Git. We'll use the EPEL (Extra Packages for Enterprise Linux) repository:

wget http://download.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
rpm -Uvh epel-release-5-4.noarch.rpm

After adding EPEL, update your YUM cache:

yum clean all
yum makecache

Verify Git is available in the repository:

yum list available git*

Install Git using YUM:

yum install git

Verify the installation:

git --version

If you prefer the latest Git version, compile from source:

yum groupinstall "Development Tools"
yum install zlib-devel perl-ExtUtils-MakeMaker
wget https://www.kernel.org/pub/software/scm/git/git-2.9.5.tar.gz
tar -zxf git-2.9.5.tar.gz
cd git-2.9.5
make prefix=/usr/local all
make prefix=/usr/local install

Configure your Git user information:

git config --global user.name "Your Name"
git config --global user.email "your.email@example.com"

If you encounter dependency issues:

yum deplist git
yum install <missing-dependencies>

For repository errors:

yum clean metadata
yum update