To start with modify the /etc/exports file on the NFS server with below entry
/nfs 192.168.0.*(rw,sync)
In the above example /nfs directory will only be shared to clients in the 192.168.0.0/24 subnet, as denoted by the 192.168.0.*. The options within the share will be read-write (rw) and will only reply to requests after changes have been committed to stable storage (sync).
Start the necessary services in NFS server
Red Hat Enterprise Linux 6 and above
# service rpcbind start
# chkconfig rpcbind on
# service nfslock start
# chkconfig nfslock on
# service nfs start
# chkconfig nfs on
Red Hat Enterprise Linux 5 and below
# service portmap start
# chkconfig portmap on
# service nfslock start
# chkconfig nfslock on
# service nfs start
# chkconfig nfs on
Start the necessary services on the NFS client.
Red Hat Enterprise Linux 6 and above
# service rpcbind start
# chkconfig rpcbind on
# service nfslock start
# chkconfig nfslock on
Red Hat Enterprise Linux 5 and below
# service portmap start
# chkconfig portmap on
# service nfslock start
# chkconfig nfslock on
Mount the NFS share on the NFS client, where <nfs server> is the IP address or hostname of the NFS server.
# mount -t nfs <nfs server>:/nfs /mnt/nfs
/nfs 192.168.0.*(rw,sync)
In the above example /nfs directory will only be shared to clients in the 192.168.0.0/24 subnet, as denoted by the 192.168.0.*. The options within the share will be read-write (rw) and will only reply to requests after changes have been committed to stable storage (sync).
Start the necessary services in NFS server
Red Hat Enterprise Linux 6 and above
# service rpcbind start
# chkconfig rpcbind on
# service nfslock start
# chkconfig nfslock on
# service nfs start
# chkconfig nfs on
Red Hat Enterprise Linux 5 and below
# service portmap start
# chkconfig portmap on
# service nfslock start
# chkconfig nfslock on
# service nfs start
# chkconfig nfs on
Start the necessary services on the NFS client.
Red Hat Enterprise Linux 6 and above
# service rpcbind start
# chkconfig rpcbind on
# service nfslock start
# chkconfig nfslock on
Red Hat Enterprise Linux 5 and below
# service portmap start
# chkconfig portmap on
# service nfslock start
# chkconfig nfslock on
Mount the NFS share on the NFS client, where <nfs server> is the IP address or hostname of the NFS server.
# mount -t nfs <nfs server>:/nfs /mnt/nfs
No comments:
Post a Comment