In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
The content of this article mainly focuses on how to use the rpm command in the Linux command. The content of the article is clear and clear. It is very suitable for beginners to learn and is worth reading. Interested friends can follow the editor to read together. I hope you can get something through this article!
In Linux, RPM is used to install, uninstall, and so on software. RPM is distributed by Redhat and is used to manage software packages.
1) to install the software package with RPM, the simplest command is as follows:
# rpm-I example.rpm installs the example.rpm package; ``# rpm-iv example.rpm installs the example.rpm package and displays the information of the files being installed during the installation;`` # rpm-ivh example.rpm installs the example.rpm package and displays the information of the files being installed and the installation progress 2) remove the installed package
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 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 you want 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:
# rpm-Q example the following are the 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-p parameter, but 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 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
Rpm-Vf needs to be validated 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:
# 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:
# 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:
# 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:
# rpm-qpi koules-1.2-2.i386.rpm another management package tool in Linux is yum.
Thank you for your reading. I believe you have some understanding of "how to use the rpm command in the Linux command". Go ahead and practice it. If you want to know more about it, you can follow the website! The editor will continue to bring you better articles!
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.