In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail how to use the rpm command of the Linux system. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.
Rpm, originally a Red Hat Linux distribution program designed to manage Linux suites, is popular because it follows GPL rules and is powerful and convenient. Gradually adopted by other distributions.
1) to install the software package with RPM, the simplest command is as follows:
1 # rpm-I example.rpm installs the example.rpm package; 2 # rpm-iv example.rpm installs the example.rpm package and displays the file information that is being installed during the installation process; 3 # rpm-ivh example.rpm installs the example.rpm package and displays the information of the files being installed and the installation progress 2) to delete the installed package to uninstall the package example, simply enter the following command:
1 # rpm-e example Note: the package name is example, not the rpm file name "example.rpm".
3) upgrade software package upgrade software is similar to installing software:
1 # rpm-Uvh example.rpm users should note that rpm automatically uninstalls 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 so that users can manually change the corresponding configuration file. 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 uses the-oldpackage parameter if the user wants to forcibly install it.
4) query the 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 below 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, but the input is standard input (e.g. find / usr/bin | rpm-qF)-Q package name: query the package-Q: same-p parameter, but the input is standard input (e.g. find / mnt/cdrom/RedHat/RPMS | rpm-qQ) the following is the output format selection:-I displays the name, description, release, size, compilation date of the package Installation date, developer and other information. -l displays the files contained in the package-s shows the current status of the files contained in the package, and there are only two states: normal and missing-d display the documents in the package (such as man,info,README, etc.)-c displays the configuration files in the package, which generally need to be manually modified by the user after installation. For example, sendmail.cf,passwd,inittab and others can get an output similar to ls-l if you use the-v parameter.
5) check the software package with rpm
1 rpm-Vf needs to be verified to package rpm practical skills! 1) users can install software packages through FTP. If you can connect to the network and want to install a new software package, you can install it directly with its URL address: for example, if you now have this package under ftp.linuxsir.com/pub/linux/redhat/RPMS/: foo-1.0-1.i386.rpm, you can use this command:
1 # rpm-I ftp.linuxsir.com/pub/linux/redhat/RPMS/foo-1.0-1.i386.rpm to install, you can also query!
2) if a user accidentally deletes several files, but is not sure which files are, and wants to check the entire system to see which parts may have been damaged, you can use:
1 # rpm-Va3) if a user comes across a file that no one can come out of and wants to know which package it belongs to, you can do this:
1 # rpm-qf / usr/X11R6/bin/xjewel results in the following information:
Xjewel-1.6-14) if the user gets a new RPM file but is not clear about its contents, or wants to know which files will be installed on the system by a certain package, you can do this:
1 # rpm-qpi koules-1.2-2.i386.rpm results will get a lot of information.
This is the end of this article on "how to use rpm commands in Linux system". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.
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: 0
*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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.