To keep your system updated with the latest and greatest packages on CentOS 7, you must constantly update it. The yum update commands will fetch and download the latest updates for your system. By default, it only fetches pre-installed repositories which can be limited with fewer packages.
If you want to install and use the latest packages for your applications on CentOS 7, you’ll have to install additional third-party software repositories. Most of the latest servers and software packages are not available from the default CentOS repositories. The folks behind CentOS are pretty cautious when adding newer updates to their systems. They want to fully test out these updates before releasing them to all systems running CentOS.
Because it takes longer time to updates packages in CentOS, third-party repositories were created to fill in the gap to release updates quickly and frequently. Packages that were installed from these third-party repositories get updated and refreshed very frequently as soon as updates become available. Theses are usually tested and customized for the appropriate version of CentOS.
For example, to get the latest version of Nginx, Apache2, PHP-FPM and other important opensource packages, you must install third-party repositories. This brief tutorial is going to show you how to add these popular repositories to CentOS 7 if you haven’t already done so.
- Installing EPEL Repository for CentOS 7
EPEL (Extra Packages for Enterprise Linux) is an opensource and free community based repository project from Fedora team which provides 100% high quality software packages for Linux distribution including RHEL (Red Hat Enterprise Linux) and CentOS.
Most people who run CentOS 7 usually add these repository to their systems. To enable it in CentOS 7, run the commands below to install it.
sudo yum install epel-release
In the past, one had to add its repository and install the repository. Now all you need to do is run the yum install commands to install and enable EPEL in CentOS7.
- Installing Remi Repository on CentOS 7
The Remi repository provides newer version of popular opensource software for CentOS and Red Hat Enterprise Linux. It depends on the EPEL repository so you must first install EPEL before installing Remi.
To enable Remi repository on CentOS 7, run the commands below.
cd /tmp && wget http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
Next, run the commands below to install it.
sudo rpm -Uvh remi-release-7*.rpm
- Installing RPMForge Repository on CentOS 7
Another useful repository for CentOS system is the RPMForge repository. It’s a community maintained repository which contains newer packages and software for CentOS and Red Hat Linux. More than 5000 individual packages are included in the repository. It’s a great repository to add to your system if you’re running CentOS or Red Hat servers.
To add it, run the commands below.
cd /tmp && wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm
Next, run the commands below to install it
sudo rpm -Uvh rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm
By default CentOS puts all repositories file at /etc/yum.repos.d/ directory. Each of the repository file will have an extension ending in .repo. You can edit individual repository file to enable or disable it.
A simple repository file may contain something like what’s below:
[rpmforge-extras]
name = RHEL $releasever – RPMforge.net – extras
baseurl = http://apt.sw.be/redhat/el7/en/$basearch/extras
mirrorlist = http://mirrorlist.repoforge.org/el7/mirrors-rpmforge-extras
#mirrorlist = file:///etc/yum.repos.d/mirrors-rpmforge-extras
enabled = 0
protect = 0
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag
gpgcheck = 1
You can enable or disable a repository by changing the value for enabled to 1 to enable and 0 to disable. When you’re done, save the file and exit.
Run the yum update commands to see if there are newer updates for your systems.. There may more third-party repositories, but these are the most popular.
Frequently Asked Questions
How do I install EPEL repository on CentOS 7?
To install EPEL repository on CentOS 7, simply run the command 'sudo yum install epel-release'. This will enable the EPEL repository on your system.
What is EPEL repository and its significance for CentOS 7?
EPEL (Extra Packages for Enterprise Linux) is a community-based repository project that provides high-quality software packages for CentOS 7. It offers a wide range of packages not available in the default CentOS repositories.
Why should I consider adding the REMI repository to CentOS 7?
The REMI repository provides updated versions of PHP and MySQL for CentOS 7. It offers newer versions of these packages that may not be available in the default repositories.
How can I add the REMI repository to CentOS 7?
To add the REMI repository to CentOS 7, you can follow the installation instructions provided on the REMI website. Typically, it involves downloading and installing the repository configuration.
What are the benefits of using RPMForge repository on CentOS 7?
RPMForge repository provides a wide range of additional software packages for CentOS 7. It allows users to easily access and install packages that are not available in the default repositories.
Is it safe to use third-party repositories like EPEL, REMI, and RPMForge on CentOS 7?
While third-party repositories can offer additional software packages, it's important to use them cautiously. Stick to reputable repositories like EPEL, REMI, and RPMForge to minimize any security risks.
How often are packages in EPEL, REMI, and RPMForge repositories updated?
Packages in EPEL, REMI, and RPMForge repositories are updated frequently to provide users with the latest versions of software packages. It's recommended to regularly update your system to benefit from these updates.
What types of software packages can I expect to find in EPEL, REMI, and RPMForge repositories for CentOS 7?
EPEL, REMI, and RPMForge repositories offer a variety of software packages including web servers like Nginx and Apache2, PHP-FPM, MySQL, and other important open-source tools. These repositories cater to the needs of users requiring up-to-date software on CentOS 7.