88 The Virtualization Cookbook for Red Hat Enterprise Linux 5.2
6.3.3 Copying the DVD contents
Copy the contents of the ISO image to the file system. Temporarily mount it over a new
directory tmp/ using a loopback device:
# cd /nfs
# mkdir tmp
# mount -o loop rhel-5-server-s390x-dvd.iso tmp
List the contents of the mounted ISO image:
# ls tmp
EULA README-pa.html RELEASE-NOTES-ml.html
eula.en_US README-pt_BR.html RELEASE-NOTES-mr.html
generic.ins README-ru.html RELEASE-NOTES-or.html
...
Make a new directory, /nfs/rhel5.2/, and recursively copy the contents of the DVD to it
using the cp -a command. This will take a number of minutes to complete. Then unmount
tmp/, as shown here:
# cp -a tmp/* rhel5.2/
# umount tmp
6.3.4 Building the repository directory
For the yum command to work, a common metadata repository must be built using the
createrepo command. There is a sample repository in the directory Server/repodata/. The
group XML file named comps-rhel5-server-core.xml should be used to create group
information:
# cd /nfs/rhel5.2/Server/
# mv repodata/ repodata.orig
# createrepo -g repodata.orig/comps-rhel5-server-core.xml .
2495/2495 - junit-javadoc-3.8.2-3jpp.1.s390x.rpm
Saving Primary metadata
Saving file lists metadata
Saving other metadata
Now the newly created repodata/ directory contains the correct common metadata:
# cd repodata
# ls
comps-rhel5-server-core.xml other.xml.gz repomd.xml
filelists.xml.gz primary.xml.gz
6.4 Enabling the NFS server
The method of enabling an NFS server will differ, depending upon the operating system.
However, the steps are basically the same:
Export the appropriate directories.
Start the NFS server in the current run level.
The directories to export using NFS are set in the /etc/exports configuration file. Export the
directory /nfs/rhel5.2/ to make the install tree available and /nfs/virt-cookbook-RH5.2/ to
Comentarios a estos manuales