How to Add and Update YUM Repositories in CentOS/RHEL: Webtatic Example


1 views

When working with CentOS or RHEL systems, managing YUM repositories is essential for package management. The repository configuration files are stored in /etc/yum.repos.d/ with .repo extensions.

For CentOS 5 systems, you can add the Webtatic repository with these steps:

# Create a new repo file
sudo vi /etc/yum.repos.d/webtatic.repo

# Add the following content:
[webtatic]
name=Webtatic Repository
baseurl=http://repo.webtatic.com/yum/centos/5/$basearch/
enabled=1
gpgcheck=0

After adding the repository, verify it's properly configured:

# List all enabled repositories
yum repolist

# Check for Webtatic specifically
yum repolist | grep -i webtatic

Before installing packages, always update your YUM cache:

sudo yum clean all
sudo yum makecache

For some repositories, you can use RPM packages for installation:

# For CentOS 5
sudo rpm -Uvh http://repo.webtatic.com/yum/centos/5/x86_64/webtatic-release-5-1.noarch.rpm

While we disabled GPG check for this example, for production systems consider enabling it:

gpgcheck=1
gpgkey=http://repo.webtatic.com/yum/RPM-GPG-KEY-webtatic

If you encounter errors, try these troubleshooting steps:

# Check repository metadata
sudo yum clean metadata

# Verify base URLs
curl -I http://repo.webtatic.com/yum/centos/5/x86_64/

When working with multiple repositories, you can prioritize them:

# In your .repo file
priority=90

Lower numbers indicate higher priority. The default is 99 when not specified.


When working with CentOS 5 systems, managing software packages through YUM (Yellowdog Updater Modified) requires proper repository configuration. The Webtatic repository provides additional packages not included in the default CentOS repositories, particularly useful for web server components.

Before adding a new repository, it's good practice to check your current configuration:

yum repolist all
ls -l /etc/yum.repos.d/

For CentOS 5, you'll need to manually create the repository file:

sudo vi /etc/yum.repos.d/webtatic.repo

Add the following content (adjusting for your architecture if needed):

[webtatic]
name=Webtatic Repository - EL5
mirrorlist=http://repo.webtatic.com/yum/centos/5/$basearch/mirrorlist
gpgcheck=1
gpgkey=http://repo.webtatic.com/yum/RPM-GPG-KEY-webtatic-andy

After saving the file, clear the YUM cache and verify the repository is properly recognized:

sudo yum clean all
sudo yum makecache
yum repolist enabled | grep webtatic

To update packages specifically from the Webtatic repository:

sudo yum --disablerepo=* --enablerepo=webtatic update

If you prefer to install the repository via RPM package:

rpm -Uvh http://repo.webtatic.com/yum/centos/5/x86_64/webtatic-release-5-1.noarch.rpm

If you encounter SSL errors with older CentOS 5 systems:

sudo yum update openssl curl nss
sudo yum clean all

For repository signature verification failures:

sudo rpm --import http://repo.webtatic.com/yum/RPM-GPG-KEY-webtatic-andy

Remember that CentOS 5 reached EOL in March 2017. The Webtatic repository may contain outdated packages with security vulnerabilities. Consider upgrading to a supported CentOS version if possible.