Environment Description:
The NFS server is HPUX 11.31 and the NFS client is CentOS5.5.
1. Modify the NFS server host configuration file
Vim/etc/hosts
172.16.10.10 hpdb
172.16.10.15 app1
172.16.10.16 app2
Note: The host name is used in the nfs configuration file, and the host name must be used. The IP address cannot be used. The nfs client also needs to add host records for the server.
Ii. Modify the NFS configuration file of the NFS server
The main modification is as follows:
Vim/etc/rc. config. d/nfsconf
NFS_CLIENT = 0 # disable the NFS client
NFS_SERVER = 1 # Enable NFS server
PCNFS_SERVER = 0 # Turn off the pcnfs Server
START_MOUNTD = 1 # mountd starts when the nfs server is started
Vim/etc/exports
/Nfshare-rw = app1: app2, anon = 601
Format: Share file system permissions (-ro,-rw, root) = client host name 1: client host name 2
Multiple options are separated by commas. anon is the user ID and group ID assigned to the ROOT user for access.
Iii. Convert the NFS configuration file format and refresh the NFS service
Exp2df # convert/etc/exports to the/etc/dfs/dfstab File
Exportfs-a # refresh the NFS service
4. Start and Stop an NFS server
Start NFS
/Sbin/init. d/nfs. core start
/Sbin/init. d/nfs. server start
Stop NFS
/Sbin/init. d/nfs. server stop
/Sbin/init. d/nfs. core stop
V. NFS client mounting (Linux) and unmounting
Mount-t nfs 172.16.10.10:/nfshare/test
Umount/test
Vi. Common commands for NFS server maintenance
Rpcinfo # focus on whether the three services have started rpcbind, mountd, and nfs normally
Nfsstat # view nfs data read/write status
Showmount-e danbao # view shared file systems and accessible clients
Install NFS server in Ubuntu 12.04
Install and configure the NFS server to share the Ubuntu 12.04 and ARM files.
Build an nfs server in Ubuntu
File Server NFS configuration details
Build an NFS Network File System server in Ubuntu
Heartbeat_ldirector + LB + NFS for HA, LB, and file sharing
How to Configure NFS server in CentOS 5.5
Install and use NFS in Ubuntu 12.10