Installation Configuration for NFS
CentOS 5:
Yum Install nfs-utils Portmap
CentOS 6:
Yum Install nfs-utils Rpcbind
The network filesystem (nfs,network file system) is a mechanism to mount a partition (directory) on a remote host to a local system through Network File system support, Users can manipulate the shared partition (directory) of a remote host on the local system as if it were a local partition.
Note: NFS is used only between systems with Unix-like, and if you want to implement Linux server-side-windows client use, you can take advantage of samba and FTP services.
First, the configuration of the server
1,yum Install Nfs-utils rpcbind (centos6.x)
2, execute the following command to edit the file/etc/exports:
# Cat/etc/exports
/data 192.168.10.* (Rw,sync,no_root_squash)
Added content means: Allow IP address range on 192.168.10.* computer to access the/data directory with read and write permissions,/data also known as the server output shared directory.
-The meaning of the parameters in parentheses is described below:
RW: Read/write permissions, read-only access to the parameters of the RO;
Sync: Data is written to memory and hard disk, and async is used, where data is staged in memory and not immediately written to the hard disk.
The NO_ROOT_SQUASH:NFS server shares the user's attributes, and if the user is root, it has root permissions for the shared directory.
Then execute the following command to start the Port mapping: Service NFS Start
[[Email protected] ~]# Service NFS Start
Starting NFS services: [OK]
Starting NFS quotas: [OK]
Starting NFS mountd: [OK]
Starting NFS daemon: [OK]
[Email protected] ~]#
--Loopback testing of NFS servers on Linux servers to verify that the shared directory is accessible.
--Run the following command on the Linux server: \
# mount–t NFS 192.168.10.65:/data/mnt
command to mount the NFS output shared directory of a Linux server to the/MNT directory, so if NFS is working properly, you should be able to see the contents of the/data shared directory in the/MNT directory.
Second, the configuration of the client:
1, the client needs to install Nfs-utils and Rpcbind
2, the client-to-server network needs to be able to connect (shut down the firewall)
3, use SHOWMOUNT-E to test if you can connect successfully
[Email protected] mnt]# showmount-e 192.168.10.65
Export list for 192.168.10.65:
/data (Everyone)
[Email protected] mnt]#
[Email protected] mnt]# mount-t NFS 192.168.10.65:/data/soft/mnt
4, configure the boot automatically mount
[Email protected] mnt]# Vi/etc/fstab
192.168.1.65:/data/mnt/nfs nodev,ro,rsize=32768,wsize=32768 0 0
5, restart the test
This article is from the "Forest blog" blog, make sure to keep this source http://murongqingqqq.blog.51cto.com/2902694/1704726
NFS Service Configuration