Skip to main content

Need Help Using Spok Knowledge? 

Spok

NFS - How to Set Up

Setting up NFS on a RedHat 5 server

There are many protocols used to mount external drives, such as Samba (SMBFS), Common Internet File Sharing (CIFS), Network File Share (NFS), and others.  NFS depends on the RPC protocol, which is provided by portmap.  Some customers use NFS to mount drives and may not want to change this, for whatever reason.  While the NFS utilities exist on the yum repository, the RPMs are not installed in our RedHat 5 build.  The utility can be installed, but since it's not a part of our defaults, there would be no patches applied -- that is, this would be provided "as-is".  Setting this up is very easy.  This process is not service affecting.  This document assumes basic knowledge of the vi editor.

Topic / Solution

All of these steps need to be run as root (or someone with super user access).  This assumes that NFS is not already installed.

∙ You will have to obtain the following RPMs (this assumes a RedHat 5.9 64-bit OS -- you would have to find the appropriate RPMs for the operating system you're on).  These have also been provided (for x86_64) in the MSP Support shares folder.

               libevent-1.4.13-1.x86_64.rpm
               libgssapi-0.10-2.x86_64.rpm
               nfs-utils-1.0.9-66.el5.x86_64.rpm
               nfs-utils-lib-1.0.8-7.9.el5.x86_64.rpm
               portmap-4.0-65.2.2.1.x86_64.rpm

∙ You can put these anywhere, but it's handy to put them in their own folder.

               mkdir /home/amcom/RPMS/nfs

               (and then upload, as binary, to the server, to that location or moving them there once uploaded)

∙ Install the RPMs in this order.

               rpm -iv portmap-4.0-65.2.2.1.x86_64.rpm
               rpm -iv libgssapi-0.10-2.x86_64.rpm
               rpm -iv libevent-1.4.13-1.x86_64.rpm
               rpm -iv nfs-utils-lib-1.0.8-7.9.el5.x86_64.rpm --nodeps
               rpm -iv nfs-utils-1.0.9-66.el5.x86_64.rpm

∙ Edit the service files so they start at the correct levels.

               vi /etc/init.d/nfs

               Change

               # chkconfig: - 60 20
               to
               # chkconfig: 2345 60 20

               If the start / stop values are not 60 20, you can leave them be (as long as they're defined,
               not - -) or adjust them to whatever you'd like -- just make sure the service starts after
               the "networking" service.

               Save and exit.

∙ Install (re-install) the service.

               chkconfig --del nfs
               chkconfig --add nfs

∙ Check to make sure the services are installed and set to on.

               chkconfig --list | grep 'nfs\|portmap'

               You should see that nfs, nfslock, and portmap are set to run at least at runlevels 3, 4, and 5.

∙ Start the services, if not already started (service <service_name> status to see if it's up or not).

               service portmap start
               service nfs start

∙ Repeat the above steps for all servers requested.

The drives requested can now be mounted.


KB28501