Home > Linux > NFS Quick howto for CentOS 5

NFS Quick howto for CentOS 5

April 14, 2011

To use NFS successfully, you’ll have to configure the server and the client. In this example, the client is and the server is The folder to be shared is /home/sharing, and to be mounted to /mnt on the client.

On the server:

1. Make directory that you want to use.
# mkdir /home/sharing

2. Edit /etc/exports, insert the client machine’s ip
# nano /etc/exports
Add this line:

3. Edit /etc/hosts.allow
# nano /etc/hosts.allow
Add this line:

4. Start NFS and portmap
# /etc/init.d/nfs start
# /etc/init.d/portmap start


On the client:

1. Start portmap
# /etc/init.d/portmap start

2. Mount the nfs folder
# mount /mnt

3. chech /var/log/messages for any error that might occur
# colortail -f /var/log/messages

4. Use mount to chech if the folder is mounted properly
# mount
The output should be like this: on /mnt type nfs (rw,addr=

5. Edit /etc/fstab to mount the shared folder on boot
# nano /etc/fstab
Add this line: /mnt nfs rw,hard,intr 0 0



Tags: ,
%d bloggers like this: