[[email protected] ~]# mount /dev/cdrom /mnt
mount: /dev/sr0 is write-protected, mounting read-only
[[email protected] ~]# ls /mnt
CentOS_BuildTag GPL LiveOS RPM-GPG-KEY-CentOS-7
EFI images Packages RPM-GPG-KEY-CentOS-Testing-7
EULA isolinux repodata TRANS.TBL
[[email protected] ~]# cd /etc/yum.repos.d/
[[email protected] yum.repos.d]# ls
CentOS-Base.repo CentOS-Debuginfo.repo CentOS-Media.repo CentOS-Vault.repo
CentOS-CR.repo CentOS-fasttrack.repo CentOS-Sources.repo
[[email protected] yum.repos.d]# mv CentOS-Media.repo a
[[email protected] yum.repos.d]# ls
a CentOS-Debuginfo.repo CentOS-Vault.repo
CentOS-Base.repo CentOS-fasttrack.repo
CentOS-CR.repo CentOS-Sources.repo
[[email protected] yum.repos.d]# rm -rf C*
[[email protected] yum.repos.d]# ls
a
[[email protected] yum.repos.d]# mv a CentOS-Media.repo
[[email protected] yum.repos.d]# vi CentOS-Media.repo
file:///media/cdrom/
baseurl=file:///media/CentOS/
# CentOS-Media.repo
#
# This repo can be used with mounted DVD media, verify the mount point for
# CentOS-7. You can use this repo and yum to install items directly off the
# DVD ISO that we release.
#
# To use this repo, put in your DVD and use it with the other repos too:
# yum --enablerepo=c7-media [command]
#
# or for ONLY the media repo, do this:
#
# yum --disablerepo=\* --enablerepo=c7-media [command]
[c7-media]
name=CentOS-$releasever - Media
baseurl=file:///mnt
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
~
~
~
"CentOS-Media.repo" 20L, 557C written
[[email protected] yum.repos.d]# rpm -q nfs-utils
package nfs-utils is not installed
[[email protected] yum.repos.d]# rpm -qa nfs-*
[[email protected] yum.repos.d]# yum -y install nfs-utils
Loaded plugins: fastestmirror
c7-media | 3.6 kB 00:00
(1/2): c7-media/group_gz | 155 kB 00:00
(2/2): c7-media/primary_db | 2.8 MB 00:00
Determining fastest mirrors
Resolving Dependencies
--> Running transaction check
---> Package nfs-utils.x86_64 1:1.3.0-0.21.el7 will be installed
--> Processing Dependency: libtirpc >= 0.2.3-1 for package: 1:nfs-utils-1.3.0-0.21.el7.x86_64
--> Processing Dependency: gssproxy >= 0.3.0-0 for package: 1:nfs-utils-1.3.0-0.21.el7.x86_64
--> Processing Dependency: rpcbind for package: 1:nfs-utils-1.3.0-0.21.el7.x86_64
--> Processing Dependency: quota for package: 1:nfs-utils-1.3.0-0.21.el7.x86_64
--> Processing Dependency: libnfsidmap for package: 1:nfs-utils-1.3.0-0.21.el7.x86_64
--> Processing Dependency: libevent for package: 1:nfs-utils-1.3.0-0.21.el7.x86_64
--> Processing Dependency: keyutils for package: 1:nfs-utils-1.3.0-0.21.el7.x86_64
--> Processing Dependency: libtirpc.so.1()(64bit) for package: 1:nfs-utils-1.3.0-0.21.el7.x86_64
--> Processing Dependency: libnfsidmap.so.0()(64bit) for package: 1:nfs-utils-1.3.0-0.21.el7.x86_64
--> Processing Dependency: libevent-2.0.so.5()(64bit) for package: 1:nfs-utils-1.3.0-0.21.el7.x86_64
--> Running transaction check
---> Package gssproxy.x86_64 0:0.4.1-7.el7 will be installed
--> Processing Dependency: libverto-tevent for package: gssproxy-0.4.1-7.el7.x86_64
--> Processing Dependency: libini_config.so.3(INI_CONFIG_1.1.0)(64bit) for package: gssproxy-0.4.1-7.el7.x86_64
--> Processing Dependency: libref_array.so.1()(64bit) for package: gssproxy-0.4.1-7.el7.x86_64
--> Processing Dependency: libini_config.so.3()(64bit) for package: gssproxy-0.4.1-7.el7.x86_64
--> Processing Dependency: libcollection.so.2()(64bit) for package: gssproxy-0.4.1-7.el7.x86_64
--> Processing Dependency: libbasicobjects.so.0()(64bit) for package: gssproxy-0.4.1-7.el7.x86_64
---> Package keyutils.x86_64 0:1.5.8-3.el7 will be installed
---> Package libevent.x86_64 0:2.0.21-4.el7 will be installed
---> Package libnfsidmap.x86_64 0:0.25-12.el7 will be installed
---> Package libtirpc.x86_64 0:0.2.4-0.6.el7 will be installed
---> Package quota.x86_64 1:4.01-11.el7 will be installed
--> Processing Dependency: quota-nls = 1:4.01-11.el7 for package: 1:quota-4.01-11.el7.x86_64
--> Processing Dependency: tcp_wrappers for package: 1:quota-4.01-11.el7.x86_64
---> Package rpcbind.x86_64 0:0.2.0-32.el7 will be installed
--> Running transaction check
---> Package libbasicobjects.x86_64 0:0.1.1-25.el7 will be installed
---> Package libcollection.x86_64 0:0.6.2-25.el7 will be installed
---> Package libini_config.x86_64 0:1.2.0-25.el7 will be installed
--> Processing Dependency: libpath_utils.so.1(PATH_UTILS_0.2.1)(64bit) for package: libini_config-1.2.0-25.el7.x86_64
--> Processing Dependency: libpath_utils.so.1()(64bit) for package: libini_config-1.2.0-25.el7.x86_64
---> Package libref_array.x86_64 0:0.1.5-25.el7 will be installed
---> Package libverto-tevent.x86_64 0:0.2.5-4.el7 will be installed
--> Processing Dependency: libtevent.so.0(TEVENT_0.9.9)(64bit) for package: libverto-tevent-0.2.5-4.el7.x86_64
--> Processing Dependency: libtalloc.so.2(TALLOC_2.0.2)(64bit) for package: libverto-tevent-0.2.5-4.el7.x86_64
--> Processing Dependency: libtevent.so.0()(64bit) for package: libverto-tevent-0.2.5-4.el7.x86_64
--> Processing Dependency: libtalloc.so.2()(64bit) for package: libverto-tevent-0.2.5-4.el7.x86_64
---> Package quota-nls.noarch 1:4.01-11.el7 will be installed
---> Package tcp_wrappers.x86_64 0:7.6-77.el7 will be installed
--> Running transaction check
---> Package libpath_utils.x86_64 0:0.2.1-25.el7 will be installed
---> Package libtalloc.x86_64 0:2.1.2-1.el7 will be installed
---> Package libtevent.x86_64 0:0.9.25-1.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
nfs-utils x86_64 1:1.3.0-0.21.el7 c7-media 370 k
Installing for dependencies:
gssproxy x86_64 0.4.1-7.el7 c7-media 84 k
keyutils x86_64 1.5.8-3.el7 c7-media 54 k
libbasicobjects x86_64 0.1.1-25.el7 c7-media 24 k
libcollection x86_64 0.6.2-25.el7 c7-media 40 k
libevent x86_64 2.0.21-4.el7 c7-media 214 k
libini_config x86_64 1.2.0-25.el7 c7-media 59 k
libnfsidmap x86_64 0.25-12.el7 c7-media 46 k
libpath_utils x86_64 0.2.1-25.el7 c7-media 27 k
libref_array x86_64 0.1.5-25.el7 c7-media 26 k
libtalloc x86_64 2.1.2-1.el7 c7-media 31 k
libtevent x86_64 0.9.25-1.el7 c7-media 32 k
libtirpc x86_64 0.2.4-0.6.el7 c7-media 85 k
libverto-tevent x86_64 0.2.5-4.el7 c7-media 9.0 k
quota x86_64 1:4.01-11.el7 c7-media 176 k
quota-nls noarch 1:4.01-11.el7 c7-media 89 k
rpcbind x86_64 0.2.0-32.el7 c7-media 57 k
tcp_wrappers x86_64 7.6-77.el7 c7-media 78 k
Transaction Summary
================================================================================
Install 1 Package (+17 Dependent packages)
Total download size: 1.5 M
Installed size: 4.3 M
Downloading packages:
warning: /mnt/Packages/gssproxy-0.4.1-7.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY
Public key for gssproxy-0.4.1-7.el7.x86_64.rpm is not installed
--------------------------------------------------------------------------------
Total 2.8 MB/s | 1.5 MB 00:00
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Importing GPG key 0xF4A80EB5:
Userid : "CentOS-7 Key (CentOS 7 Official Signing Key) "
Fingerprint: 6341 ab27 53d7 8a78 a7c2 7bb1 24c6 a8a7 f4a8 0eb5
Package : centos-release-7-2.1511.el7.centos.2.10.x86_64 (@anaconda)
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : libbasicobjects-0.1.1-25.el7.x86_64 1/18
Installing : libtirpc-0.2.4-0.6.el7.x86_64 2/18
Installing : libref_array-0.1.5-25.el7.x86_64 3/18
Installing : libcollection-0.6.2-25.el7.x86_64 4/18
Installing : libtalloc-2.1.2-1.el7.x86_64 5/18
Installing : libtevent-0.9.25-1.el7.x86_64 6/18
Installing : libverto-tevent-0.2.5-4.el7.x86_64 7/18
Installing : rpcbind-0.2.0-32.el7.x86_64 8/18
Installing : libnfsidmap-0.25-12.el7.x86_64 9/18
Installing : 1:quota-nls-4.01-11.el7.noarch 10/18
Installing : keyutils-1.5.8-3.el7.x86_64 11/18
Installing : libevent-2.0.21-4.el7.x86_64 12/18
Installing : libpath_utils-0.2.1-25.el7.x86_64 13/18
Installing : libini_config-1.2.0-25.el7.x86_64 14/18
Installing : gssproxy-0.4.1-7.el7.x86_64 15/18
Installing : tcp_wrappers-7.6-77.el7.x86_64 16/18
Installing : 1:quota-4.01-11.el7.x86_64 17/18
Installing : 1:nfs-utils-1.3.0-0.21.el7.x86_64 18/18
Verifying : libini_config-1.2.0-25.el7.x86_64 1/18
Verifying : tcp_wrappers-7.6-77.el7.x86_64 2/18
Verifying : libverto-tevent-0.2.5-4.el7.x86_64 3/18
Verifying : libtalloc-2.1.2-1.el7.x86_64 4/18
Verifying : libcollection-0.6.2-25.el7.x86_64 5/18
Verifying : 1:nfs-utils-1.3.0-0.21.el7.x86_64 6/18
Verifying : libpath_utils-0.2.1-25.el7.x86_64 7/18
Verifying : libevent-2.0.21-4.el7.x86_64 8/18
Verifying : keyutils-1.5.8-3.el7.x86_64 9/18
Verifying : libref_array-0.1.5-25.el7.x86_64 10/18
Verifying : rpcbind-0.2.0-32.el7.x86_64 11/18
Verifying : libtirpc-0.2.4-0.6.el7.x86_64 12/18
Verifying : gssproxy-0.4.1-7.el7.x86_64 13/18
Verifying : 1:quota-nls-4.01-11.el7.noarch 14/18
Verifying : 1:quota-4.01-11.el7.x86_64 15/18
Verifying : libtevent-0.9.25-1.el7.x86_64 16/18
Verifying : libbasicobjects-0.1.1-25.el7.x86_64 17/18
Verifying : libnfsidmap-0.25-12.el7.x86_64 18/18
Installed:
nfs-utils.x86_64 1:1.3.0-0.21.el7
Dependency Installed:
gssproxy.x86_64 0:0.4.1-7.el7 keyutils.x86_64 0:1.5.8-3.el7
libbasicobjects.x86_64 0:0.1.1-25.el7 libcollection.x86_64 0:0.6.2-25.el7
libevent.x86_64 0:2.0.21-4.el7 libini_config.x86_64 0:1.2.0-25.el7
libnfsidmap.x86_64 0:0.25-12.el7 libpath_utils.x86_64 0:0.2.1-25.el7
libref_array.x86_64 0:0.1.5-25.el7 libtalloc.x86_64 0:2.1.2-1.el7
libtevent.x86_64 0:0.9.25-1.el7 libtirpc.x86_64 0:0.2.4-0.6.el7
libverto-tevent.x86_64 0:0.2.5-4.el7 quota.x86_64 1:4.01-11.el7
quota-nls.noarch 1:4.01-11.el7 rpcbind.x86_64 0:0.2.0-32.el7
tcp_wrappers.x86_64 0:7.6-77.el7
Complete!
[[email protected] yum.repos.d]# rpm -qa nfs-*
nfs-utils-1.3.0-0.21.el7.x86_64
[[email protected] yum.repos.d]# rpm -q nfs-utils
nfs-utils-1.3.0-0.21.el7.x86_64
[[email protected] yum.repos.d]#
原文地址:https://www.cnblogs.com/987m/p/11080808.html