Sunday, July 3, 2011

Make local yum repository

- run mount command to mount repo file :
ex: mount -t iso9660 -o loop /dev/hdc /u02
- go to yum repo directory
cd /etc/yum.repos.d
- make file local.repo in this directory
insert below script in local.repo
[localrepo]
name=My local repo
baseurl=file:///u02/Server
enabled=1
gpgcheck=0
#gpgkey=file:///path/to/you/RPM-GPG-KEY
- run df -h to check the repo file already mounted

Filesystem Size Used Avail Use% Mounted on
/dev/sda1 3.8G 1.8G 1.9G 50% /
tmpfs 494M 0 494M 0% /dev/shm
/dev/hdc 2.9G 2.9G 0 100% /u02