Red Hat RPM

Source: Internet
Author: User
Article Title: Red Hat RPM. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
A major feature of RedHat Linux is the use of Red Hat Package Manager (RPM) technology to install and delete programs. As a result, most software upgrades and installation involve rpm packages. below I will share some of my skills ".
  
Install
The rpm Package format is as follows: foo-1.0-1.i386.rpm
Foo indicates the package name, 1.0 indicates the package release version, and 1 indicates the number of releases. i386 indicates the system on which the package is used (x86 system here ).
Command format for installing the rpm Package: rpm-I [installation options] <安装包的名字>
For example, if you want to install the foo-1.0-1.i386.rpm, you can run the following command: rpm-I foo-1.0-1.i386.rpm
We can ignore the installation options and use the default options.
  
Upgrade
The upgrade is to first reinstall the file and then install the new rpm Package. the specific format is as follows:
Rpm-U [upgrade options] <文件包名字>
In fact, in the above two operations, we can add some options to make the installation/upgrade more intuitive: "h" can use "#" to represent the installation progress; "v" can display more prompts.
Therefore, the more common method is:
Rpm-ivh <文件包名称> Install software
Rpm-Uvh <文件包名称> Upgrade Software
Query
The command format is as follows:
Rpm-q [query options]
When the query option is the name of a package, the detailed information about the package name and version is displayed.
Below are several common combinations:
Rpm-qa query all installed packages
Rpm-qf foo displays the name of the package containing the foo file.
Rpm-ql PCD. rpm lists all the details in the PCD. rpm package.
Rpm-qa | grep PCD check whether the PCD file is installed
  
Verification
Command format: rpm-V [check option]
When the verification is normal, you will not see any results. if any exception is found, it will be displayed in its specific method.
  
Delete
Command format:
Rpm-e <文件名称>
  
Actual example
1. if you accidentally delete some files and are not sure what they are, you can check the entire system to find them:
Rpm-Va
2. if you want to know which rpm package a file comes from:
Rpm-qf file name
3. if you are using a file and want to know more about it, enter:
Rpm-qdf file name to find the path of the file.
4. if you have a new rpm Package and want to know more about it:
Rpm-qip package name
A wide array of parameters should not be enjoyed by beginners. Fortunately, "Little Red Hat" has developed a GUI for running and managing RPM in X Windows-glint (Graphical Linux Installation Tool ), with it, you only need a mouse to "point to the mountains. Similar to glint tools, KDE comes with Kpackage. In contrast, kpackage seems more beautiful.
  
TAR & GZIP in Linux
  
Although RPM is so easy to use, many necessary and useful software existed before it was invented (that is, many source programs are not RPM packages ). Most non-RPM packages use tar for packaging and gzip for compression.
The full name of tar is Tap ARchiver, which is used to package a large number of files into a single file (that is, a tar file ). However, tar files are not compressed and must be compressed using gzip. As we can see, most of the tarpack programs are compressed files ending with .tar.gz or. tgz. The decompression method is simple. you only need to enter the following command on the Linux command line:
Tar xvfz filename.tar.gz (or filename. tgz)
When we download the .tar.gz or. tgz file from the Internet, we often need to check the content before deciding whether to install it. In linux, the command for the contents of the. tar.gz and. tgz files is:
Tar tfz filename.tar.gz
In the WIN95/98 environment, Winzip 7.07.0can also decompress the content of the .tar.gz file.
  
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.