The software described in this documentation is either in Extended Support or Sustaining Support. See https://www.oracle.com/us/support/library/enterprise-linux-support-policies-069172.pdf for more information.
Oracle recommends that you upgrade the software described by this documentation as soon as possible.

1.4.1 Setting up a New NFS Server

Note

This procedure assumes that you are setting up an Oracle Linux 6 system as an NFS version 4 server. Using NFSv4 greatly simplifies firewall configuration as you need only configure a single rule for TCP port 2049.

To set up an NFS server:

  1. Install the nfs-utils package.

    # yum install nfs-utils

  2. Create the directory where you will copy the full Oracle Linux Release 6 Media Pack DVD image, for example /var/OSimage/OL6.6:

    # mkdir -p /var/OSimage/OL6.6

  3. Edit the configuration file, /etc/exports, as follows.

    1. Add an entry for the directory where you will copy the DVD image.

      The following example allows read-only access to the directory /var/OSimage/OL6.6 for any NFS client on the 192.168.1 subnet:

      /var/OSimage/OL6.6 192.168.1.0/24(ro)

    2. Save your changes to the file.

  4. Start the NFS server, and configure it to start after a reboot.

    # service rpcbind start
    # service nfs start
    # service nfslock start
    # chkconfig rpcbind on
    # chkconfig nfs on
    # chkconfig nfslock on

  5. If you have configured a firewall on your system, configure it to allow incoming NFSv4 requests from NFS clients.

    For example, use the following commands to configure iptables to allow NFSv4 connections and save the change to the firewall configuration:

    # iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 2049 -j ACCEPT
    # service iptables save