NFS sharing service

Network file system NFS C / S

rpc 111 remote procedure call mechanism

S: set up a shared directory

C: Use this to mount a shared directory mount

 

server 

yum -y install nfs-utils rpcbind // installation and nfs rpc

[Root @ yum ~] # mkdir / data // create public folders

[Root @ yum ~] # vim / etc / exports // modify the configuration file

[root@yum ~]# cat /etc/exports     

/ Data 192.168.2.0/24(rw) // allows you to view the segment and authority

[Root @ yum ~] # systemctl start rpcbind // Remember that first open service in the open rpc nfs

[root@yum ~]# systemctl enable rpcbind

[root@yum ~]# systemctl start nfs

[root@yum ~]# systemctl enable nfs

 

 Client computer  

[Root @ www ~] # yum -y install nfs-utils // But you can not install nfs showmount command to install this

IP address [root @ www ~] # showmount -e 192.168.2.30 // server

[Root @ www ~] # mount 192.168.2.30:/data / opt / // opt mount point is a shared file server can be found on the inside   

[root@www ~]# vim     /etc/fstab     

192.168.2.30:/data      /opt     nfs      defaults,_netdev       0 0

 

/ Var / ftp / under the root directory can be shared is shared

 

Guess you like

Origin www.cnblogs.com/maoyanqing/p/11386738.html
Recommended