WEB Server access NFS shared resources - automatically mount

First, the installation package rpcbind

[root@localhost ~]# yum -y install rpcbind

[root@localhost ~]# systemctl enable rpcbind

[root@localhost ~]# systemctl start rpcbind

Second, clients see NFC

[root@localhost ~]# showmount -e 192.168.200.111

Third, the NFC manually mount the shared directory

  To root Performs user authentication mount operation, the NFS share server / opt / wwwroot directory is mounted to a local directory / var / www / html

[root@localhost ~]# mount 192.168.200.114:/opt/wwwroot  /var/www/html

 

[root@localhost ~]# tail -1 /etc/mtab

[root @ localhost ~] # vim /var/www/html/index.html ----------------------- // Create a test file

Four, fstab to automatically mount

  Repair / etc / fstab configuration file,

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

  192.168.200.???:/opt/wwwroot /var/www/html    nfs   defaults,_netdev     0    0

Fifth, the test client

 

 

 

ipvsadm  -Lnc

 

Guess you like

Origin www.cnblogs.com/123456likun/p/11621370.html