1, RPM Package name definition
Vsftpd.3.0.2-9. El7. x86_64.rpm
Package Name Version Release schema
Use RPM-QA to list all installed packages for the current system, using the RPM-IVH installation package
2. The essence of installing RPM installation package
The essence of installing the RPM package is to copy the corresponding file copy in the package to the root directory of the response:
Here is an example of VSFTPD this RPM package, using the following command to extract the contents of the installation package:
You can see that the VSFTPD RPM package generated Etc,usr,var three directories, the installation of VSFTPD, the three directories will be copied to the corresponding Etc,usr,var below
[Email protected] xx]# lsvsftpd-3.0.2-9.el7.x86_64.rpm[[email protected] xx]# Rpm2cpio vsftpd-3.0.2-9.el7.x86_64.rpm |cpio-id707 Blocks[[email protected] xx]# lsetc usr var vsftpd-3.0.2-9.el7.x86_64.rpm
With RPM-QL, you can view all the contents and paths of a package installation:
3. Common command options for RPM commands:
Inquire:
-QA: View all installed packages of the system;
-QL: View the installation contents and path of the installation package;
-QC: View the configuration file for the installation package;
-QD: View the Help documentation for the installation package;
-qi: View the installation package;
-QF: See which installation package the file was generated from;
-QIP: View information and installation path for the installation package
-UVH: Update: The so-called update is to uninstall the old, and then install new packages, ordinary software packages, in the system can not co-exist in multiple versions, but the kernel may be multi-version coexistence, so when installing the kernel, generally use RPM-IVH, do not use UVH, so do not uninstall the old kernel, multi-core coexistence ; After installing the kernel, uninstall the old kernel;
-E: Uninstall:
-V Registration: You can see if the files generated by the installation package have been modified
--force option: Typically the package is already installed, but you need to reinstall it, you can use the--forece option
--nodeps: Ignoring the dependencies of the installation package;
4, installation package if you use RPM-IVH Direct installation, then will generate some scripts, through Rpm-qa can query to the package, if it is installed directly by the installation file copy overlay to the corresponding folder, you can not query through RPM-QA to
To see which scripts the installation package executed, use the--scripts option:
[Email protected] etc]# rpm-q--scripts vsftpd
5. Digital signature of RMP package
Hash function encryption is characterized by the same length of content that is encrypted, regardless of the input length.
Digital signature, usually private key encryption, public key decryption;
Use the Rpm-k command to see if the digital signature of the package is correct, but if you have already imported the Red Hat's public key, you will still be prompted for MD5 mismatch;
[[email protected] xx]# rpm-k vsftpd-3.0.2-9.el7.x86_64.rpm vsftpd-3.0.2-9.el7.x86_64.rpm:rsa SHA1 ((MD5) PGP) MD5 not O K (MISSING KEYS: (MD5) pgp#fd431d51)
If you install the package at this time, you will be prompted
To import the Red Hat public key:
[Email protected] xx]# rpm--import/etc/pki/rpm-gpg/rpm-gpg-key-redhat-release
Then verify the RPM package, MD5 verify OK:
[[email protected] xx]# rpm-k vsftpd-3.0.2-9.el7.x86_64.rpm vsftpd-3.0.2-9.el7.x86_64.rpm:rsa SHA1 (MD5) PGP MD5 OK
6. Configuring the Yum installation source
The configuration file is placed under the/etc/yum.repos.d/path:
The configuration file ends with the. Repo format as follows:
[mine] Source name name=my repo name baseurl= Source URL address enable=1 whether to enable gpgcheck=0 whether digital signature verification is enabled GPG key=file:///
This article is from the "Ordinary Road" blog, please be sure to keep this source http://linjohn.blog.51cto.com/1026193/1603877
RHCE7 Learning Note 12-Installing and updating software