File share mounts between Linux Centos servers

Source: Internet
Author: User
Tags centos server

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.