1th ChapterBuildNfsService (SpecifyWwwusers)
1.1Service-side operations(in theNfs01Service Side) 1.1.1installationNfsService
Rpm-qa nfs-utils Rpcbind
Yum Install nfs-utils rpcbind-y
Rpm-qa nfs-utils Rpcbind
1.1.2Start the service
/etc/init.d/rpcbind start
/etc/init.d/nfs start
Rpcinfo-p localhost
Chkconfig NFS On
Chkconfig Rpcbind on
1.1.3Configuration
Mkdir/data-p
Useradd www-s/sbin/nologin-m-u 888
ID www
Chown-r Www.www/data
Ls-ld/data
[[email protected] data]# vim/etc/exports # # # Edit configuration file
#----------time by Oldboy for Kaifa.
/DATA172.16.1.0/24 (rw,sync,all_squash,anonuid=888,anongid=888)
[Email protected] data]# Cat/etc/exports
[Email protected] data]# EXPORTFS-RV # # #使配置生效
### or use/etc/init.d/nfs Reload # # #平滑重启
1.1.4Test
SHOWMOUNT-E 172.16.1.31
Mount-t NFS 172.16.1.31:/data/mnt
Df-h
Umount/mnt # # # If uninstall is not removed, use UMOUNT-LF/MNT force unload (data is not lost)
1.2Client1operation (inBackupclient)1.2.1installationNfsRelated Service Packs
Rpm-qa nfs-utils Rpcbind
Yum Install nfs-utils rpcbind-y
Rpm-qa nfs-utils Rpcbind
1.2.2Start the service
/etc/init.d/rpcbind start
Chkconfig Rpcbind on
1.2.3Configuration
Useradd www-s/sbin/nologin-m-u 888
ID www
1.2.4Mount Test
[[email protected] ~]# Ping 172.16.1.31
[[Email protected] ~]# Telnet 172.16.1.31 111
SHOWMOUNT-E 172.16.1.31
Mount-t NFS 172.16.1.31:/data/mnt
Df-h
Cat/proc/mounts
Touch/mnt/oldboy.txt
1.3Client2operation (inWeb01client)1.3.1installationNfsRelated Service Packs
Rpm-qa nfs-utils Rpcbind
Yum Install nfs-utils rpcbind-y
Rpm-qa nfs-utils Rpcbind
1.3.2Start the service
/etc/init.d/rpcbind start
Chkconfig Rpcbind on
1.3.3Configuration
Useradd www-s/sbin/nologin-m-u 888
ID www
1.3.4Mount Test
[[email protected] ~]# Ping 172.16.1.31
[[Email protected] ~]# Telnet 172.16.1.31 111
SHOWMOUNT-E 172.16.1.31
Mount-t NFS 172.16.1.31:/data/mnt
Df-h
Cat/proc/mounts
Touch/mnt/oldgirl.txt
This article is from the "11942277" blog, please be sure to keep this source http://11952277.blog.51cto.com/11942277/1895555
NFS Service under Linux (Specify WWW user)