*Note: You must disable CentOS-Base.repo CentOS-Sources.repo for use the local repositori
1. Open |Terminal
2. change directori to /etc/yum.repos.d
cd /etc/yum.repos.d
3. create file local.repo
nano local.repo
[RHEL7-REPO]
name=Local REPO
baseurl=file:///mnt/CentOS
enabled=1
gpgcheck=0
and then save the file
5. mount the DVD image to folder /mnt/CentOS
mkdir -p /mnt/CentOS
mount /dev/sr0 /mnt/CentOS
6. yum clean all
[root@zimbra yum.repos.d]# yum clean all
Loaded plugins: fastestmirror, langpacks
Cleaning repos: RHEL7-REPO
Cleaning up everything
Cleaning up list of fastest mirrors
7. yum update
[root@zimbra yum.repos.d]# yum update
Loaded plugins: fastestmirror, langpacks
RHEL7-REPO | 3.6 kB 00:00
(1/2): RHEL7-REPO/group_gz | 157 kB 00:00
(2/2): RHEL7-REPO/primary_db | 2.7 MB 00:00
Determining fastest mirrors
No packages marked for update
8. test to install NC package from local dvd
yum install nc
[root@zimbra yum.repos.d]# yum install nc
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package nmap-ncat.x86_64 2:6.40-4.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
nmap-ncat x86_64 2:6.40-4.el7 RHEL7-REPO 200 k
Transaction Summary
================================================================================
Install 1 Package
Total download size: 200 k
Installed size: 410 k
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : 2:nmap-ncat-6.40-4.el7.x86_64 1/1
Verifying : 2:nmap-ncat-6.40-4.el7.x86_64 1/1
Installed:
nmap-ncat.x86_64 2:6.40-4.el7
Complete!
Thanks.!!
0 comments:
Post a Comment
komentar anda sangat berguna bagi saya..