File share mounts between Linux Centos (6.6) servers
Purpose: Because the server set up load balancer, multi-server file upload must be synchronized, the purpose here is to set server 1 as the primary file server
Server 1:192.168.1.100
Server 2:192.168.1.20
Here comes the wind.
Installation Essentials Kit [per]1.nfs
Yum Install Nfs-utils
2. Set up service self-start
Chkconfig Rpcbind onchkconfig NFS on
3. Start the service
Service Rpcbind StartService NFS Start
Centos server 1 settings
/www/wwwroot/www.lanmps.com/uploads 192.168.1.20 (Rw,no_root_squash,no_all_squash,sync)
and reload
Exportfs- R
Share List view
Exportfs
Centos server 2 settings 1. See if server 1 is shared
SHOWMOUNT-E 192.168.1.100
If there is a share, a shared list is displayed
2. Directory Settings
Here 2 server directories are the same, so do not set.
If different or not please build yourself: mkdir-p/www/wwwroot/www.lanmps.com/uploads
3. Mounting
Mount-t nfs-o RW 192.168.1.100:/www/wwwroot/www.lanmps.com/uploads/www/wwwroot/www.lanmps.com/uploads
4. See if it is mounted
Method One:
Df-h
Method Two:
directly into the/www/wwwroot/www.lanmps.com/uploads directory, whether you can create a modified file
5. Uninstall, delete share
Umount/www/wwwroot/www.lanmps.com/uploads
If you need more features, see:
Http://www.server110.com/linux/201404/10169.html (Thanks for the offer)
File share mounts between Linux Centos servers