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 > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "how to use the rpm installation command of linux". The explanation in this article is simple and clear, easy to learn and understand. Please follow the ideas of Xiaobian slowly and deeply to study and learn "how to use the rpm installation command of linux" together!
Usage: 1. Install,"#rpm -i rpm file name";2. Delete,"# rpm -e example";3. Upgrade,"# rpm -Uvh rpm file";4. Query,"# rpm -q software package";5. Verify software package,"rpm -Vf package to be verified".
This tutorial operating environment: centos7 system, thinkpad t480 computer.
Under Linux operating system, almost all software is installed, uninstalled and managed through RPM. RPM is Redhat Package Manager, which is software developed by Redhat to manage packages under Linux. When Linux is installed, almost all modules except a few core modules are installed via RPM. RPM has five modes of operation: install, uninstall, upgrade, query, and verify.
1) Install the 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 information about files being installed during installation;#rpm -ivh example.rpm installs the example.rpm package and displays information about files being installed and installation progress during installation
2) Remove installed packages
To uninstall package example, simply type this line:
# rpm -e example
Note: The package name is example, not the rpm file name "example.rpm".
3) Upgrade software package
Upgrading software is similar to installing software:
# rpm -Uvh example.rpm
Note that rpm automatically uninstalls older versions of the corresponding package. If the configuration file of the older version of the software is incompatible with the newer version, rpm automatically saves it as a separate file, and the user will see the following message:
saving /etc/example.conf as /etc/example.conf.rpmsave
This allows the user to manually change the corresponding configuration file.
Also, if you try to install an older version of the software, you will see the following error message:
# rpm -Uvh example.rpmexamle packag example-2.0-l(which is newer) is already installederror:example.rpm cannot be installed
Use the-oldpackage parameter if the user wants to force the installation.
4) Query software package
The user can query the corresponding software in the rpm database with rpm -q, rpm will give the software package name, version, release version number, for example:
# 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 package that contains the file.
-F : Same as the-f argument, except the input is standard (e.g. find /usr/bin)| rpm -qF)v-q package name : Query the software package
-Q : Same as-p parameter, except input is standard input (e.g. find /mnt/cdrom/RedHat/RPMS)| rpm -qQ)
Here are the format choices for output:
-i Displays package name, description, release, size, build date, install date, developer, etc.
-l Displays files included in the package
-s Displays the current status of files contained in the package, with only two states: normal and missing.
-d Displays documentation in the package (e.g. man,info,README, etc.)
-c Displays configuration files in the package. These files are generally manually modified by the user after installation, such as sendmail.cf,passwd,inittab, etc.
If you take-v, you get something like ls -l.
5) Verify software package with rpm
rpm -Vf needs to be verified to package
RPM practical tips!
1) Users can install software packages via FTP. If the user is able to connect to the network and wants to install a new package, he can install it directly with its URL address:
For example: Now there is this file package under ftp.linuxsir.com/pub/linux/redhat/RPMS/: foo-1.0-1.i386.rpm, then 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 the user accidentally deleted several files, but is not sure which files, want to check the entire system to understand which parts may have been damaged, you can use:
# rpm -Va
3) If a user encounters a file that doesn't come out and wants to know which package it belongs to, he can do this:
# rpm -qf /usr/X11R6/bin/xjewel
The result is the following information:
xjewel-1.6-1
4) If a user gets a new RPM file and doesn't know what it's about, or wants to know what files a package will install on the system, do this:
# rpm -qpi koules-1.2-2.i386.rpm Thank you for reading, the above is the "linux rpm installation command how to use" content, after the study of this article, I believe that everyone on linux rpm installation command how to use this problem has a deeper understanding, the specific use of the situation also needs to be verified by practice. Here is, Xiaobian will push more articles related to knowledge points for everyone, welcome to pay attention!
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.