Technology Encyclopedia Home >How to install local RPM files using YUM?

How to install local RPM files using YUM?

To install local RPM files using YUM (Yellowdog Updater Modified), you can follow these steps:

  1. Ensure YUM is Installed: First, make sure that YUM is installed on your system. This is typically the case on RPM-based distributions like Fedora, CentOS, and RHEL.

  2. Download the RPM File: Obtain the RPM file you want to install from a trusted source.

  3. Use the yum localinstall Command: This command installs the RPM file and resolves any dependencies using YUM's repositories.

Here is an example:

Suppose you have downloaded a local RPM file named example-package.rpm. To install this package using YUM, you would use the following command:

sudo yum localinstall example-package.rpm

This command does the following:

  • Installs the example-package.rpm file.
  • Checks for any missing dependencies.
  • Downloads and installs any required dependencies from configured YUM repositories.

Example:
If you have a local RPM file named nginx.rpm, you would run:

sudo yum localinstall nginx.rpm

This command installs Nginx and ensures all necessary dependencies are met.

Note: If you encounter dependency issues, ensure your YUM repositories are correctly configured and up-to-date.

For cloud-related tasks, such as deploying and managing RPM packages on cloud servers, you might consider using services like Tencent Cloud's Cloud Virtual Machine (CVM), which provides scalable and reliable virtual servers where you can manage your RPM installations as needed.