Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use Linux system RPM

2025-03-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

Linux system RPM how to use, I believe that many inexperienced people do not know what to do, so this paper summarizes the causes of the problem and solutions, through this article I hope you can solve this problem.

RPM is a very important tool for Linux system, except the core module can not be installed through RPM, other modules can be installed through RPM.

1) to install the software package with RPM, the simplest command is as follows:

1 # rpm-I example.rpm install example.rpm package

2 # rpm-iv example.rpm installs the example.rpm package and displays the information of the files being installed during the installation

3 # rpm-ivh example.rpm installs the example.rpm package and displays the information of the files being installed and the installation progress during the installation process

2) remove installed software packages

To uninstall the package example, simply enter the following command:

# rpm-e example

Note: the package name is example, not the rpm file name "example.rpm".

3) upgrade the software package

Upgrading software is similar to installing software:

# rpm-Uvh example.rpm

Users should be aware that rpm will automatically uninstall the old version of the corresponding software package. If the configuration file of the old version of the software is not compatible with the new version, rpm will automatically save it as another file, and the user will see the following information:

Saving / etc/example.conf as / etc/example.conf.rpmsave

In this way, the user can change the corresponding configuration file manually.

In addition, if the user wants to install the older version of the software, the user will see the following error message:

# rpm-Uvh example.rpm

Examle packag example-2.0-l (which is newer) is already installed

Error:example.rpm cannot be installed

Use the-oldpackage parameter if the user wants to forcibly install it.

4) query software package

Users can use rpm-Q to query the corresponding software in the database of rpm. Rpm will give the name, version and release number of the software package, for example:

1 # rpm-Q example

The following are specific parameters that can be used when querying:

-a: query all software packages currently installed on the system.

-f file name: query the software package that includes the file.

-F: same as-f parameter, except that the input is standard (for example, find / usr/bin | rpm-qF)

-Q package name: query the package

-Q: same as-p parameter, except that the input is standard (for example, find / mnt/cdrom/RedHat/RPMS | rpm-qQ)

The following is the format selection for output:

-I displays the name, description, release, size, compilation date, installation date, developer and other information of the package.

-l displays the files contained in the package

-s displays the current status of the files contained in the package, with only two states: normal and missing

-d displays the documentation in the package (such as man,info,README, etc.)

-c displays the configuration files in the software package, which usually need to be manually modified by the user after installation, such as sendmail.cf,passwd,inittab, etc.

If you use the-v parameter, you can get an output similar to ls-l.

5) check the software package with rpm

Rpm-Vf needs to be verified to the package

What are the versions of Linux? the versions of Linux are Deepin, UbuntuKylin, Manjaro, LinuxMint, Ubuntu and so on. Among them, Deepin is one of the best-developed Linux distributions in China; UbuntuKylin is a derivative release based on Ubuntu; Manjaro is a Linux release based on Arch; LinuxMint's default Cinnamon desktop is similar to Windows XP's easy-to-use; Ubuntu is the Linux operating system based on desktop applications.

After reading the above, have you mastered how to use the Linux system RPM? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 251

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report