1.4.1 Setting up a New NFS Server


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:


    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