Difference between revisions of "How to setup NFS/Autofs"

From HyperSecurity Wiki
Jump to: navigation, search
('''Client Config Files:''')
 
(3 intermediate revisions by the same user not shown)
Line 7: Line 7:
  
 
NFS has to be running on the server. Do not run autofs for the client on the server.  
 
NFS has to be running on the server. Do not run autofs for the client on the server.  
 
----
 
 
  
 
== '''Client Config Files:''' ==
 
== '''Client Config Files:''' ==
Line 24: Line 21:
  
 
Example:
 
Example:
foo    -rw,sync        server hostname/ip:/foo
+
foo    -rsize=4096,soft,intr,rw     server hostname/ip:/foo
  
 
NFS and autofs both have to be running on the client. NFS first, then autofs in that order.
 
NFS and autofs both have to be running on the client. NFS first, then autofs in that order.
Line 30: Line 27:
 
http://www.redhat.com/docs/manuals/linux/RHL-7.3-Manual/custom-guide/s1-nfs-mount.html
 
http://www.redhat.com/docs/manuals/linux/RHL-7.3-Manual/custom-guide/s1-nfs-mount.html
  
 
+
== '''Both Server/Client Config Files:''' ==
----
 
  
 
Both systems must have the opposite server/client hostname or IP in the following:
 
Both systems must have the opposite server/client hostname or IP in the following:
  
/etc/hosts.allow
+
'''/etc/hosts.allow'''
  
 
Example:
 
Example:

Latest revision as of 23:01, 12 January 2010

Server Config Files:

/etc/exports

Example: /mountpoint client hostname/ip(rw,sync)

NFS has to be running on the server. Do not run autofs for the client on the server.

Client Config Files:

/etc/auto.master

This is an automounter map and it has the following format key [ -mount-options-separated-by-comma ] location. For details of the format look at autofs. mounts done from a hosts map will be mounted with the "nosuid" and "nodev" options unless the "suid" and "dev" options are explicitly given.

Example: /foo /etc/auto.foo --timeout=600

/etc/auto.foo

Example: foo -rsize=4096,soft,intr,rw server hostname/ip:/foo

NFS and autofs both have to be running on the client. NFS first, then autofs in that order.

http://www.redhat.com/docs/manuals/linux/RHL-7.3-Manual/custom-guide/s1-nfs-mount.html

Both Server/Client Config Files:

Both systems must have the opposite server/client hostname or IP in the following:

/etc/hosts.allow

Example: Server /etc/hosts.allow ALL  : client hostname or ip

Example: Client /etc/hosts.allow ALL  : server hostname or ip