I, Environment introduction
NFS server: CentOS6.6 192.168.1.116
NFS client: centos5.5 192.168.1.114
Second, server-side installation configuration
1. First use the RPM-QA command to see if the required installation package (Nfs-utils, Rpcbind) is installed:
# Rpm-qa | grep "Rpcbind"
rpcbind-0.2.0-11.el6.i686
# Rpm-qa | grep "NFS"
Nfsometer-1.6-1.el6.noarch
nfs-ganesha-proxy-2.2.0-2.el6.i686
nfs-ganesha-2.2.0-2.el6.i686
nfs-utils-lib-devel-1.1.5-11.el6.i686
nfs-ganesha-ceph-2.2.0-2.el6.i686
nfs-ganesha-nullfs-2.2.0-2.el6.i686
nfs-utils-lib-1.1.5-11.el6.i686
nfs-ganesha-utils-2.2.0-2.el6.i686
nfswatch-4.99.9-1.el6.rf.i686
nfs-utils-1.2.3-64.el6.i686
nfs4-acl-tools-0.3.3-7.el6.i686
nfs-ganesha-mount-9p-2.2.0-2.el6.i686
nfs-ganesha-vfs-2.2.0-2.el6.i686
2, such as the query results, the server itself has already installed NFS, if not installed, then use the Yum command to install:
# yum-y Install nfs-utils Rpcbind
3. NFS Shared file path configuration:
/HOME/192.168.1.0/24 (Rw,sync,no_root_squash)
/home/www 192.168.1.0/24 (Rw,sync,no_root_squash)
4, Start the NFS service (start Rpcbind First, then start NFS, if the server itself has already installed NFS, then use restart restart two services):
# service Rpcbind Start
Starting rpcbind: [OK]
# Service NFS Start
Start NFS service: [OK]
Turn off NFS quotas: [OK]
Start NFS mountd: [OK]
Start the NFS daemon: [OK]
Starting RPC IDMAPD: [OK]
5. Set up NFS service boot from:
# Chkconfig Rpcbind on
# Chkconfig NFS On
Third, Client Mount Configuration
1. Install NFS
# yum-y Install nfs-utils Rpcbind
2. Start the service
# service Rpcbind Start
2. Set up service self-start
# Chkconfig Rpcbind on
3. Create mount point
# MAKE/AAA
# MAKE/BBB
4. View the shares on the NFS server:
# SHOWMOUNT-E 192.168.1.116
Export list for 192.168.1.116:
/home/www 192.168.1.0/24
/Home 192.168.1.0/24
5. Mount:
#mount-T NFS 192.168.1.116:/home//AAA
#mount-T NFS 192.168.1.116:/home/www//bbb
6. View Mounted Shares:
# mount
/dev/sda3 on/type ext3 (rw)
Proc On/proc type proc (rw)
Sysfs On/sys type SYSFS (rw)
Devpts on/dev/pts type devpts (rw,gid=5,mode=620)
/DEV/SDA1 on/boot type ext3 (rw)
Tmpfs ON/DEV/SHM type TMPFS (rw)
None On/proc/sys/fs/binfmt_misc type Binfmt_misc (rw)
Sunrpc on/var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
192.168.1.116:/home ON/AAA type NFS (rw,addr=192.168.1.116)
192.168.1.116:/home/www ON/BBB type NFS (rw,addr=192.168.1.116)
/dev/sdb on/home type ext3 (rw)
/DEV/SDC on/home type ext3 (rw)
7. Set up auto mount on boot
# Vi/etc/fstab
Add the following two sentences
192.168.1.116:/HOME/AAA NFS Defaults 0 0
192.168.1.116:/HOME/WWW/BBB NFS Defaults 0 0
8. Restart the client to verify that it is active
# reboot
To see if the file system mounts and mounts automatically after the system restarts
# DF-HT
File system type capacity used% mount point available
/dev/sda3 ext3 2.9G 1.8G 936M 66%/
/DEV/SDA1 ext3 99M 16M 79M 17%/boot
Tmpfs tmpfs 499M 0 499M 0%/dev/shm
192.168.1.116:/home
NFS 8.3G 3.4G 4.5G 43%/aaa
192.168.1.116:/home/www
NFS 8.3G 3.4G 4.5G 43%/bbb
Description has been automatically mounted successfully, the mounted File system format is NFS format.
This article is from the "Technical Achievement Dream" blog, please be sure to keep this source http://20145520.blog.51cto.com/9112173/1704470
NFS installation configuration under CentOS 6.6