Thứ Tư, 16 tháng 11, 2016

Creating a Local Yum Repository Using an ISO Image

Sometime , our server internal can not access internet . we able to  create respository local for use yum command .

1. Transfer the removable storage to the system on which you want to create a local yum repository, and copy the DVD image to a directory in a local file system.

2 . Create a suitable mount point, for example /mnt/ISO

3. use the “mount” command to mount an iso
[root@kilo ~]# mount -t iso9660 -o loop V77197-01-OracleLinux-6U7.iso /mnt/ISO/   

4 . In the /etc/yum.repos.d directory, edit the existing repository files

[OL67]
name=Oracle Linux
baseurl=file:///mnt/ISO
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY
gpgcheck=1
enabled=1


5. Clean up the yum cache
 yum clean all
 
6. Test that you can use yum to access the repository. 
 
yum repolist 



Không có nhận xét nào:

Đăng nhận xét