Chapter 6. Configuring an NFS/FTP server 101
The directories to export with NFS are in the /etc/exports configuration file. Export the
/nfs/rhel6/ directory to make the installation tree available and /nfs/virt-cookbook-RH6/ to
make the files associated with this book available. First, make a backup copy of the file. Then
edit the original copy and add the two directories as follows:
# cd /etc
# cp exports exports.orig
# vi exports // add two lines
/nfs/rhel6 *(ro,sync)
/nfs/virt-cookbook-RH6 *(ro,sync)
The *(ro,sync) parameter specifies that any client with access to this server can get the NFS
mount in read-only mode. You may want to be more restrictive than allowing any client (with
the “*”) for security reasons. Type man exports for more details.
Set the NFS server to start with the chkconfig command and start it on the current session
with the service nfs start command:
# chkconfig nfs on
# chkconfig --list nfs
nfs 0:off 1:off 2:on 3:on 4:on 5:on 6:off
# service nfs start
Starting NFS services: [ OK ]
Starting NFS quotas: [ OK ]
Starting NFS daemon: [ OK ]
Starting NFS mountd: [ OK ]
Your NFS server should now be running with the directory exported. You should test this
configuration by mounting the exported directory locally. The following example shows that
the /mnt/ directory is empty. Then the newly exported /nfs/ directory is mounted and the
files are listed.
# mkdir /mnt/tmp
# mount localhost:/nfs/rhel6/ /mnt/tmp
# ls -F /mnt/tmp
EULA README-or.html RELEASE-NOTES-ja.html
eula.en_US README-pa.html RELEASE-NOTES-ko.html
generic.ins README-pt_BR.html RELEASE-NOTES-ml.html
GPL README-ru.html RELEASE-NOTES-mr.html
images/ README-si.html RELEASE-NOTES-or.html
...
The output shows that the RHEL 6 installation tree is accessible through NFS. Now unmount
it and test the virt-cookbook-RH6/ directory:
# umount /mnt/tmp
# mount localhost:/nfs/virt-cookbook-RH6 /mnt/tmp
# ls -F /mnt/tmp
clone-1.0-9.s390x.rpm README.txt vm/
# umount /mnt/tmp
You should now be able to use this server as the source of a RHEL 6 mainframe Linux
installation. Later, you will be able to copy the installation tree to a System z Linux virtual
server.
Kommentare zu diesen Handbüchern