CentOS6 NFS the installation configuration
CentOS 5:
Yum Install nfs-utils Portmap
CentOS 6:
Yum Install nfs-utils Rpcbind
This section is a configuration process using the CentOS 6:
Device: Two CENTOS6 OS installed when the "Basicserver" Software configuration package is selected.
First, let both machines install NFS packages, as shown in the server side:
[Email protected]/home]$ yuminstall nfs-utils rpcbind-y
server-side:
NFSService-side needsStart FirstRPC, and then startNFS, soNFSto be able toRPCto register port information. Client-sideRPCcan be passed to the service-sideRPCrequest to get the service-sideNFSPort information. When it gets to theNFSport information, the data is transferred to the actual port.
###(Create a mounted directory, and mount the directory. )
[Email protected]/etc]$MKDIR/OPT/CENTOS6
[Email protected]/etc]$ cd/opt/centos6/
[Email protected]/opt/centos6]$ mkdir thisisnfsfile
[[email protected]/opt/centos6]$ ls
Thisisnfsfile
[Email protected]/etc]$ Vi/etc/exports
[Email protected]/opt/centos6]$ Cat/etc/exports
/opt/centos6 192.168.1.0/24 (rw,no_root_squash)
# # # No_root_squashrefers to the client root user does not use the power down
### Note:/OPT/CENTOS6 Directory for NFS shares 192.168.1.0-192.168.1.254 interval IP can be accessed, access rights are self-read, root user
# # # (start the corresponding service)
[[email protected]/opt/centos6]$ Chkconfig NFS on
[[email protected]/opt/centos6]$/etc/init.d/rpcbind start
[[email protected]/opt /centos6]$/etc/init.d/nfs start
[[email protected]/opt/centos6]$ service iptables stop
Iptables: Flushing firewallrules: [ ok ]
iptables:setting chains to policy accept:filter [ ok ]
Iptables: unloadingmodules: [ ok ]
Client:
[email protected]/home]$ Yum install nfs-utils rpcbind-y
installation is complete!
[[Email protected] ~]# service Iptablesstop
## # see if you can access Services for NFS
[[email protected] ~] # showmount-e 192.168.1.75
Export list for 192.168.1.75:
/opt/centos6 192.168.1.0/24
[[email protected ] ~]# MKDIR/OPT/CENTOS6
[[email protected] ~]# mount-t NFS 192.168.1.75:/opt/centos6/ /opt/centos6/
[[email protected] ~]# ls/opt/centos6/
thisisnfsfile
### Configure boot auto-mount
[[email protected] ~]# vi/etc/fstab
# # # add #
192.168.1.75:/opt/centos6//opt/centos6/nfsnodev,ro,rsize=32768,wsize=32768 0 0
············································
Client queries
Client to install Nfs-utils
SHOWMOUNT-E 192.168.1.250(server-side address)
# Query which shares shared by the 1.250 server
Mount –t nfs192.168.1.250:/xx/bb
# mount the shared folder on the server to the BB folder in the native root directory
This article is from the "Ten Years Sword-Breeze" blog, please be sure to keep this source http://jingfeng.blog.51cto.com/9152964/1880771
CENTOS6 Installation configuration for NFS