Home >Operation and Maintenance >CentOS >How to install rpm package on centos
Installation method: First download the RPM package file; then execute the "yum localinstall rpm package name path" command, you will get a confirmation prompt. If the rpm is compatible with the user system and meets all dependencies, enter " y" to install the RPM package.
#The operating environment of this tutorial: centos7 system, thinkpad t480 computer.
centos uses YUM to install RPM packages
Yum is the default package manager tool in CentOS. It is used to install, remove, download, query and update packages from the official CentOS repository as well as other third-party repositories.
The first step is to download the RPM file you want to install:
wget https://example.com/file.rpm
To install the package, follow the yum localinstall command with the path to the package name:
sudo yum localinstall file.rpm
Yum You will be prompted to confirm. Assuming it is compatible with your system and all dependencies are met, entering y will install the RPM package.
If an RPM package depends on other packages that you have not installed, and those packages are available in a repository enabled on your system, all dependencies will be installed. Otherwise, yum will print a list of all missing dependencies that you must download and install the packages manually.
Instead of automatically downloading and then installing the RPM package, you can pass the URL directly to the RPM package yum localinstall:
sudo yum localinstall https://example.com/file.rpm
If you want to update an RPM package that has been installed using yum, use install with The same process applies to software packages.
If for some reason you want to remove an installed package, use the standard yum remove command followed by the package name:
sudo yum remove file.rpm
Recommended related tutorials: centos tutorial
The above is the detailed content of How to install rpm package on centos. For more information, please follow other related articles on the PHP Chinese website!