Command configuration for obtaining servers and clients for Network File System nfs in linux

Source: Internet
Author: User
Command configuration for obtaining servers and clients of the Network File System nfs in linux-Linux Enterprise Application-Linux server application information. For details, see the following. Concept: nfs rpc-based network service enables resource sharing between Unix hosts.

Prerequisites: the nfs software package is installed ("rpm-qa | grep nfs" is used for verification). (The rpc service is supported by linux and installed by default .)

I. Server Configuration

1. Enable the portmap service to activate RPC
Service portmap start (equivalent to the command "/etc/rc. d/init. d/portmap start ")

2. Edit the/etc/exports file (This file contains all directories to be shared and their permissions)

Example:
/Home 192.168.0.1/24 (ro) (share a CIDR Block)
/Abc 192.168.0.1 (rw, no_root_squash .)

Run the "man 5 exports" command to view the detailed file format.

3. Start or restart the nfs server program (in fact, it allows the server program to read the configuration information of the/etc/exports file)

Service nfs start (equivalent to the command "/etc/rc. d/init. d/nfs start ")
Or
Service nfs restart (equivalent to the command "/etc/rc. d/init. d/nfs restart ")

Ii. Use of the client (another Linux computer)

1. Enable the portmap service to activate RPC
Service portmap start (equivalent to the command "/etc/rc. d/init. d/portmap start ")

2. Run the mount command to load the shared directory of the server.
Mount-t 192.168.0.X:/home/mnt
(Replace "X" with the IP address of your server)

3. Uninstall the mounted file system
Umount/mnt

Iii. Use of auxiliary commands
Showmount-e 192.168.0.X (check shared resources on the server)
Nfsstat (check nfs running status)
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.