NFS or
Step 1: Install the
Step 2: Create a file
In the line above:
Step 3: Make sure
Step 4: To see the list of nfs exports, run:
To see the same list from a different host, run:
Step 5: Mount and access the contents:
Network File System
is a very convenient way of allowing the data on one Linux host to be accessible on another. The procedure for setting up a NFS share and accessing the same on a client is very simple.Step 1: Install the
nfs utilities
and rpcbind (portmap)
on the source host.]# yum install nfs-utils nfs-utils-lib
Step 2: Create a file
/etc/exports
and enter the following information./tmp *(rw,sync,no_root_squash)
In the line above:
/tmp
- The folder to be shared*
- Allow access to all clientsrw
- Provide read/write accesssync
- The requests are honored only after changes are committedno_root_squash
- Allow root user to access the shareStep 3: Make sure
nfs
and rpcbind
services start at boot. Export the list of shared folders and start these services now.]# chkconfig rpcbind on
]# chkconfig nfs on
]# exportfs -rv
]# service rpcbind restart
]# service nfs restart
Step 4: To see the list of nfs exports, run:
]# showmount -e localhost
To see the same list from a different host, run:
]# showmount -e <ip address/hostname>
Step 5: Mount and access the contents:
]# mount -t nfs <ipaddress/hostname>:/tmp /mnt/share
0 comments:
Post a Comment