This section and the teacher learned the use of software packages
First look at how RPM is used, this command can be used to query, install, uninstall, update packages
Simply put, the back with Q is the query, I is installed, you are updated, E is unloaded, V is verified, we come to see
The first is the query,-QA means that all installed packages are queried, as shown below
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/58/1D/wKiom1SpJHbRYChrAAA_O7jlXfk391.jpg "style=" float: none; "title=" 1.JPG "alt=" Wkiom1spjhbrychraaa_o7jlxfk391.jpg "/>
It is worth mentioning that the RPM essence is a pre-compiled package, the path of the different files have been configured in advance. If you want to see what directories an installation package installs to, you can extract it from Cpio.
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/58/19/wKioL1SpJTSATs6sAAFDvGgMfr0301.jpg "style=" float: none; "title=" 2.JPG "alt=" Wkiol1spjtsats6saafdvggmfr0301.jpg "/>
-QL can view the associated path of a package that has already been installed
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/58/1D/wKiom1SpJHnTQBzmAADozrIKmdU808.jpg "style=" float: none; "title=" 3.JPG "alt=" Wkiom1spjhntqbzmaadozrikmdu808.jpg "/>
-QF can see what packages are installed by the path to the file
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/58/1A/wKioL1SpJTbC0afGAABWAa3AX5M594.jpg "style=" float: none; "title=" 4.JPG "alt=" Wkiol1spjtbc0afgaabwaa3ax5m594.jpg "/>
-Q There are many combinations of options to see
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/58/1D/wKiom1SpJHzghc76AAJO3_1d3c8715.jpg "style=" float: none; "title=" 5.JPG "alt=" Wkiom1spjhzghc76aajo3_1d3c8715.jpg "/>
-QC can view configuration files
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/58/1A/wKioL1SpJTmDGommAABxPJ3hqlY718.jpg "style=" float: none; "title=" 6.JPG "alt=" Wkiol1spjtmdgommaabxpj3hqly718.jpg "/>
-QLP can view the package information
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/58/1D/wKiom1SpJH6zXgBxAAC4obnOGFg619.jpg "style=" float: none; "title=" 7.JPG "alt=" Wkiom1spjh6zxgbxaac4obnogfg619.jpg "/>
Now look at how to install the common collocation is-IVH, as shown below, notice that he has a warning message, this is why? This is because Red Hat's software package uses a digital signature, the basic principle is a to a random value C generates a hash value D, and then use the private key to encrypt D to get e, and then the encrypted e and random value C are sent to the b,b with the public key decryption E after the random value of the hash d, see whether the consistent
Because the public key is not installed on this machine because it cannot be verified
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/58/1A/wKioL1SpJTzQafw3AAD9xtnbuPA214.jpg "style=" float: none; "title=" 8.JPG "alt=" Wkiol1spjtzqafw3aad9xtnbupa214.jpg "/>
We can also verify by-K
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/58/1D/wKiom1SpJIGTs8_dAAByCP_lfWw151.jpg "style=" float: none; "title=" 9.JPG "alt=" Wkiom1spjigts8_daabycp_lfww151.jpg "/>
The solution is simple, import the public key is OK
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/58/1A/wKioL1SpJT7jBlMjAACqZqDg7l4330.jpg "style=" float: none; "title=" 10.JPG "alt=" Wkiol1spjt7jblmjaacqzqdg7l4330.jpg "/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/58/1D/wKiom1SpJIOzpsY7AAArBPO84QM490.jpg "style=" float: none; "title=" 11.JPG "alt=" Wkiom1spjiozpsy7aaarbpo84qm490.jpg "/>
Test after import the warning is gone.
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/58/1A/wKioL1SpJUCTqPZcAADXDui1u8g859.jpg "style=" float: none; "title=" 12.JPG "alt=" Wkiol1spjuctqpzcaadxdui1u8g859.jpg "/>
Next look at the update package RPM-UVH XXX
The essence of the update is to uninstall the old version and then follow the new version. The normal package is not multi-version coexistence, so if you use-IVH to install the latest version of the package, he will prompt the conflict, need to use the-UVH update;
However, the kernel can coexist in multiple versions, so it is not possible to use-UVH when updating the kernel, but should use-IVH
View the current kernel
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/58/1D/wKiom1SpJIXhZJ11AADPnzHks4k255.jpg "style=" float: none; "title=" 13.JPG "alt=" Wkiom1spjixhzj11aadpnzhks4k255.jpg "/>
Finally, look at the-V authentication package, install a package, and then go through-V to see if any files have been modified.
The newly installed FTP service didn't make any changes.
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/58/1D/wKiom1SpJIaSdEdCAAA4OAa6slM768.jpg "style=" float: none; "title=" 15.JPG "alt=" Wkiom1spjiasdedcaaa4oaa6slm768.jpg "/>
Modify the Readme
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/58/1A/wKioL1SpJUPxpq7CAAB4lDmwKys070.jpg "style=" float: none; "title=" 16.JPG "alt=" Wkiol1spjupxpq7caab4ldmwkys070.jpg "/>
The above with RPM installation package has a problem is the dependency of the package, often a package also depends on other software packages, if a manual installation is very cumbersome, how to solve it, you can use Yum directly from the specified Yum source server automatically download all dependent packages
Here is an exercise, configuring two servers, rhce7-01 Yum source pointing to the local disc, rhce7-00 to rhce7-01 FTP server
Configuration file Repo file can be configured under/etc/yum.repos.d/
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/58/1D/wKiom1SpJIjylWFNAABahuU2A1A113.jpg "style=" float: none; "title=" 17.JPG "alt=" Wkiom1spjijylwfnaabahuu2a1a113.jpg "/>
Note Gpgcheck I write 0, if it is 1, need to configure the public key also need to specify the path
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/58/1D/wKiom1SpK9fQnXahAABkL3TcB3o266.jpg "title=" Capture.jpg "alt=" Wkiom1spk9fqnxahaabkl3tcb3o266.jpg "/>
Clear the cache, notice a warning
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/58/1A/wKioL1SpJUjzr2zwAAC5k_LdvTQ147.jpg "title=" 21.JPG "Style=" Float:none; "alt=" wkiol1spjujzr2zwaac5k_ldvtq147.jpg "/>
These plug-ins do not need, you can manually shut down, the corresponding enabled to change to 0 on the line
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/58/1D/wKiom1SpJIrxwnh3AAByN7vHVpE484.jpg "style=" float: none; "title=" 19.JPG "alt=" Wkiom1spjirxwnh3aabyn7vhvpe484.jpg "/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/58/1D/wKiom1SpJIvQdVh7AABDUu7oCxU739.jpg "style=" float: none; "title=" 20.JPG "alt=" Wkiom1spjivqdvh7aabduu7ocxu739.jpg "/>
Under 01, point to local, so Baseurl=file:///var/ftp/iso
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/58/1A/wKioL1SpJUngWD-1AABqLyxXnkQ094.jpg "style=" float: none; "title=" 22.JPG "alt=" Wkiol1spjungwd-1aabqlyxxnkq094.jpg "/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/58/1D/wKiom1SpJI6CmHdxAABtACN_rio222.jpg "style=" float: none; "title=" 23.JPG "alt=" Wkiom1spji6cmhdxaabtacn_rio222.jpg "/>
Next, install the FTP service on 01
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/58/1A/wKioL1SpJUvhSLZAAADH_BerHwM197.jpg "style=" float: none; "title=" 24.JPG "alt=" Wkiol1spjuvhslzaaadh_berhwm197.jpg "/>
Reboot
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/58/1D/wKiom1SpJJCQCT_NAABvUPTtwNI517.jpg "style=" float: none; "title=" 25.JPG "alt=" Wkiom1spjjcqct_naabvupttwni517.jpg "/>
Under FTP, create a subdirectory/iso, and then mount the disc
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/58/1A/wKioL1SpJU2C9wtTAAF6ynBJ8hw155.jpg "style=" float: none; "title=" 26.JPG "alt=" Wkiol1spju2c9wttaaf6ynbj8hw155.jpg "/>
Clear the cache, delete the firewall policy, and confirm that the SELinux status allows process access
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/58/1D/wKiom1SpJJKBOXMAAACKlPCgDsU653.jpg "style=" float: none; "title=" 27.JPG "alt=" Wkiom1spjjkboxmaaacklpcgdsu653.jpg "/>
Go back to 00 and check again.
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/58/1A/wKioL1SpJU_gXltWAACNvZUATIk166.jpg "style=" float: none; "title=" 28.JPG "alt=" Wkiol1spju_gxltwaacnvzuatik166.jpg "/>
Test the repolist and successfully pass.
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/58/1D/wKiom1SpJJTxByijAAEUY6Z6p8g809.jpg "style=" float: none; "title=" 29.JPG "alt=" Wkiom1spjjtxbyijaaeuy6z6p8g809.jpg "/>
After knowing the Yum source, see what Yum options Yum list can list if the package is installed
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/58/1A/wKioL1SpJVGx5Et5AACYL-Duxi8533.jpg "style=" float: none; "title=" 30.JPG "alt=" Wkiol1spjvgx5et5aacyl-duxi8533.jpg "/>
If you want to find a package, you can search in the Yum source by searching
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/58/1D/wKiom1SpJJaiMmXMAAGx9bvGOiI232.jpg "style=" float: none; "title=" 31.JPG "alt=" Wkiom1spjjaimmxmaagx9bvgoii232.jpg "/>
You can remove a package with remove
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/58/1D/wKiom1SpJJfw7sbsAAEbo52BA9U845.jpg "style=" float: none; "title=" 32.JPG "alt=" Wkiom1spjjfw7sbsaaebo52ba9u845.jpg "/>
Can be installed through install, he will automatically resolve the dependency
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/58/1A/wKioL1SpJXvQSltoAADbpTMw3Wg562.jpg "style=" float: none; "title=" 33.JPG "alt=" Wkiol1spjxvqsltoaadbptmw3wg562.jpg "/>
The update package is available through the update
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/58/1D/wKiom1SpJMDgkJBDAABAl25vpFA091.jpg "style=" float: none; "title=" 34.JPG "alt=" Wkiom1spjmdgkjbdaabal25vpfa091.jpg "/>
If you only want to download the package without installing, you can specify the download and download path
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/58/1A/wKioL1SpJYDj18u1AAIUkhPd8z8902.jpg "style=" float: none; "title=" 35.JPG "alt=" Wkiol1spjydj18u1aaiukhpd8z8902.jpg "/>
Confirm Download Success
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/58/1D/wKiom1SpJMaySOKlAAHuQHIFeAA688.jpg "style=" float: none; "title=" 36.JPG "alt=" Wkiom1spjmaysoklaahuqhifeaa688.jpg "/>
If you forget what package the software is installed in, you can check it by whatprovides
For example, the SCP service is installed through the OpenSSH package.
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/58/1A/wKioL1SpJYPAvc3lAADnMUGKdKo534.jpg "style=" float: none; "title=" 37.JPG "alt=" Wkiol1spjypavc3laadnmugkdko534.jpg "/>
Viewing yum sources can be done via repolist
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/58/1D/wKiom1SpJMjxDlubAABKKJptKtE447.jpg "style=" float: none; "title=" 38.JPG "alt=" Wkiom1spjmjxdlubaabkkjptkte447.jpg "/>
Query, install the time can be manually shielded installation source
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/58/1A/wKioL1SpJYWgUTu0AACXEDGXPt4018.jpg "style=" float: none; "title=" 39.JPG "alt=" Wkiol1spjywgutu0aacxedgxpt4018.jpg "/>
You can also view the package information through info
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/58/1A/wKioL1SpJYegax19AAEDGQyANEQ758.jpg "style=" float: none; "title=" 40.JPG "alt=" Wkiol1spjyegax19aaedgqyaneq758.jpg "/>
Some feature-similar packages are placed in a group and can be viewed through Yum grouplist
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/58/1D/wKiom1SpJMzQR8BoAAE9yUS7fYc043.jpg "style=" float: none; "title=" 41.JPG "alt=" Wkiom1spjmzqr8boaae9yus7fyc043.jpg "/>
The entire group can be installed directly via Groupinstall
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/58/1D/wKiom1SpJNDi2JC5AANTwsNhp3g555.jpg "style=" float: none; "title=" 42.JPG "alt=" Wkiom1spjndi2jc5aantwsnhp3g555.jpg "/>
Some third-party packages can also be downloaded via the Internet, such as pkgs.org
Not to be continued ...
How do I create a source to handle related dependencies?
This article is from the "Mapo Tofu" blog, please be sure to keep this source http://beanxyz.blog.51cto.com/5570417/1599105
RHCE Study notes (+) RPM and YUM