LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Blogs > sujit123
User Name
Password

Notices


Rate this Entry

(NFS) on RedHat

Posted 06-03-2008 at 06:54 AM by sujit123

0. Is NFS running on your system?
Before the configuration of NFS, you can check whether your linux system has NFS installed or not.
[root@water root]# chkconfig --list | grep nfs

If you see the following information, then continue on section 1.


nfs 0:off 1:off 2:off 3:on 4:on 5:on 6:off
nfslock 0:off 1:off 2:off 3:on 4:on 5:on 6:off

If you don't see anything, you can start NFS without reboot system by entering the command:

[root@water root]# /etc/rc.d/init.d/nfs start

1. NFS Server Configuration
1.1 The first step to setup the server is to modify the /etc/exports file on the server machine. The file specifies which partition on the server will be exported to client machines with certain permissions.

Following is an example of a NFS /etc/exprots file:

#
# /ect/exports for nfsfishes.mydomain.edu
#
/export/home walleye.mydomain.edu(rw) \
crappie.mydomain.edu(rw)
/export/data walleye.mydomain.edu(rw) \
crappie.mydomain.edu(rw)

The partitions /export/home and /export/data on the server named as water are shared by the clients named as walleye and crappie with read and write permissions.
1.2 After modifying the /etc/exports file, you have to use the exportfs command to tell the NFS server processes to re-read the configuration information.


[root@water root]# exportfs -r

OK, the NFS server configuration is done.

2. NFS Client Configuration
NFS clients are easy to configure under Linux. You can use mount command to under the command line as following:
[root@walleye root]# mount water:/export/home /nfs/home

You can also add the mount options into /etc/fstab file.

water:/export/home /nfs/home nfs bg 0 0

That's it.
3. Help
man chkconfig
man exportfs
man mount
Posted in Uncategorized
Views 691 Comments 0
« Prev     Main     Next »

  



All times are GMT -5. The time now is 01:33 PM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration