How to setup a CentOS 5.5 NFS Installation Server

This tutorial I am going to show how to create a very basic and functional CentOS 5.5 NFS Installation Server. This is very useful when you need to deploy many servers in a local network.

Download CentOS 5.5 in your temp directory:
# cd /tmp
# wget
# wget

Create a directory for your installation files. With the following command, create the /inst directory:
# mkdir /inst

Mount you’re the first ISO file in the /media directory:
# mount -ro loop /tmp/CentOS-5.5-x86_64-bin-DVD-1of2.iso /media

Copy all the information from the first ISO file to the installation directory:
# cp /media/* /inst/ -Rf

Unmount the first DVD and mount the second one:
# umount /media
# mount -ro loop /tmp/CentOS-5.5-x86_64-bin-DVD-2of2.iso /media

Copy all the information from the second ISO file to the installation directory:
# cp /media/* /inst/ -Rf

Set up an NFS share. Add the following line to /etc/exports.
# vi /etc/exports

/inst *(ro,sync)

Export the shared directory.
# exportfs -a

Make sure there’s nothing blocking access to NFS. The default CentOS Linux IPTABLES firewall blocks
access to an NFS server.
# iptables –F

Now you can activate the NFS service. The following commands assume that it’s already running
(which you can check using the service nfs status command):
# service nfs stop
# service nfs start

When you install CentOS Linux from an NFS server, you’ll need the name of the installation directory in this case, /inst. Also you will need the ip address of the installation server.

Leave a Reply

Your email address will not be published. Required fields are marked *