Yumの構成と初歩的な使用

9651 ワード

Yum構成の前提は、オプティカル(光学式)ドライブをマウントしたり、他のYUMソースをマウントしたりすることです.私は通常、地元のYUMソース、ISO、NFS、その他に傾いていますが、その中でISOの構成が最もEasyです.
YUMのプロファイルは:/etc/yumにあります.repos.d/ディレクトリの下、xxx.repo.

  
  
  
  
  1. [root@RHEL ~]# cd /etc/yum.repos.d/  
  2. [root@RHEL yum.repos.d]# ls  
  3. redhat.repo  rhel-debuginfo.repo  
  4. [root@RHEL yum.repos.d]# 

新しいrepo:isoを作成します.repo.

  
  
  
  
  1. [root@RHEL yum.repos.d]# vim iso.repo  
  2. [root@RHEL yum.repos.d]# cat iso.repo  
  3. [Server]  
  4. name=Server  
  5. baseurl=file:///iso/Server  
  6. gpgcheck=0  
  7.  
  8. [VT]  
  9. name=VT  
  10. baseurl=file:///iso/VT  
  11. gpgcheck=0  
  12.  
  13. [Cluster]  
  14. name=Cluster  
  15. baseurl=file:///iso/Cluster  
  16. gpgcheck=0  
  17.  
  18. [ClusterStorage]  
  19. name=ClusterStorage  
  20. baseurl=file:///iso/ClusterStorage  
  21. gpgcheck=0  
  22. [root@RHEL yum.repos.d]# 

これで、YUMが似合う.
次の操作を行います.

  
  
  
  
  1. [root@RHEL yum.repos.d]# yum list | grep libXp  
  2. Unable to read consumer identity  
  3. libXpm.i386                             3.5.5-3                   installed       
  4. libXpm.x86_64                           3.5.5-3                   installed       
  5. libXpm-devel.x86_64                     3.5.5-3                   installed       
  6. libXp.i386                              1.0.0-8.1.el5             Server          
  7. libXp.x86_64                            1.0.0-8.1.el5             Server          
  8. libXp-devel.i386                        1.0.0-8.1.el5             Server          
  9. libXp-devel.x86_64                      1.0.0-8.1.el5             Server          
  10. libXpm-devel.i386                       3.5.5-3                   Server          
  11. [root@RHEL yum.repos.d]#   
  12. [root@RHEL yum.repos.d]# yum install -y libXp  
  13. Loaded plugins: katello, product-id, security, subscription-manager  
  14. Updating certificate-based repositories.  
  15. Unable to read consumer identity  
  16. Setting up Install Process  
  17. Resolving Dependencies  
  18. --> Running transaction check  
  19. ---> Package libXp.i386 0:1.0.0-8.1.el5 set to be updated  
  20. ---> Package libXp.x86_64 0:1.0.0-8.1.el5 set to be updated  
  21. --> Finished Dependency Resolution  
  22.  
  23. Dependencies Resolved  
  24.  
  25. ===============================================================================================================================================================================================  
  26.  Package                                    Arch                                        Version                                              Repository                                   Size 
  27. ===============================================================================================================================================================================================  
  28. Installing:  
  29.  libXp                                      i386                                        1.0.0-8.1.el5                                        Server                                       22 k  
  30.  libXp                                      x86_64                                      1.0.0-8.1.el5                                        Server                                       23 k  
  31.  
  32. Transaction Summary  
  33. ===============================================================================================================================================================================================  
  34. Install       2 Package(s)  
  35. Upgrade       0 Package(s)  
  36.  
  37. Total download size: 45 k  
  38. Downloading Packages:  
  39. -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------  
  40. Total                                                                                                                                                           11 MB/s |  45 kB     00:00       
  41. Running rpm_check_debug  
  42. Running Transaction Test  
  43. Finished Transaction Test  
  44. Transaction Test Succeeded  
  45. Running Transaction 
  46.   Installing     : libXp                                                                                                                                                                   1/2   
  47.   Installing     : libXp                                                                                                                                                                   2/2   
  48. Cluster/productid                                                                                                                                                       | 1.7 kB     00:00       
  49. ClusterStorage/productid                                                                                                                                                | 1.8 kB     00:00       
  50. Server/productid                                                                                                                                                        | 1.7 kB     00:00       
  51. Installed products updated.  
  52.  
  53. Installed:  
  54.   libXp.i386 0:1.0.0-8.1.el5                                                                    libXp.x86_64 0:1.0.0-8.1.el5                                                                     
  55.  
  56. Complete!  
  57. [root@RHEL yum.repos.d]# 

——
To be Continue.