Brief configuration of LinuxNFS

Source: Internet
Author: User
Linux-based network file sharing service, which allows you to easily mount directories of multiple servers to a client, it is very convenient to operate directories and files of remote servers as if they were local directories and files. NFS is often used...
Linux NFS brief configuration NFS is a linux-based network file sharing service, which can easily mount directories of multiple servers to a client. for the client, it is very convenient to operate directories and files of remote servers as if they were local directories and files. NFS is often used as a resource sharing service or as an optional solution for distributed storage. Assume that www.2cto.com has two servers, A (172.16.3.148) and B (172.16.3.149). we need to share the/opt/nfsserver directory on A to B. Server Configuration (A: 172.16.3.148): Edit/etc/exports and add vi/etc/exports/opt/nfsserver * (rw, sync, no_root_squash) to take effect: if showmount-e 172.16.3.148 is normal, you can see the following information: Export list for 172.16.3.148:/opt/nfsserver * www.2cto.com client configuration (B: 172.16.3.149 ): check the server's mount information: showmount-e 172.16.3.148 is normal, you should be able to see the following information: Export list for 172.16.3.148:/opt/nfsserver * mount: mount-t nfs 172.16.3.148: /opt/nfsserver confirm the mounting is successful: If the mount is normal, the following information should be displayed: 172.16.3.148:/opt/nfsserver on/opt/nfsserver type nfs (rw, addr = 172.16.3.148) now the nfs configuration is complete, we can see that/opt/nfsserver under Machine A has been mapped to/opt/nfsserver under Machine B through nfs. other instructions: the underlying modules involved in the NFS service include nfs: nfs main module; nfslock: file lock service for multi-user operations; portmap: Foundation of RPC, responsible for dynamic association of RPC ports and applications; www.2cto.com after NFS configuration is complete, it is best to restart the above modules. pay attention to the order. service nfs stopservice nfslock stopservice portmap stop service portmap startservice nfslock startservice nfs start ensures that the NFS configuration is valid after the machine is restarted; chkconfig -- list | grep nfschkconfig -- list | grep nfslockchkconfig -- list | grep portmap chkconfig -- level 2345 nfs onchkconfig -- level 2345 nfslock onchkconfig -- level 2345 portmap on

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.