Configure the Network File System NFS service

Source: Internet
Author: User
Article title: configure the Network File System NFS service. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

  1. set the shared directory

(1) set the shared directory

Run commands

# Gedit/etc/exports

Edit the nfs service configuration file (note: The file is empty when it is opened for the first time) and add the following content:

/Opt/tmp * (rw, sync, no_root_squash)

Where:

/Opt/tmp indicates the directory to be shared by nfs, which can be used as the Development Board's

File systems are mounted through nfs;

* Indicates that all clients can mount the directory.

Rw indicates that the client connected to this directory has the permission to read and write the directory.

No_root_squash indicates that the client connected to this directory is allowed to have the root identity of the host.

  2. start the NFS service

You can start the NFS service in two ways: command line and graphical interface. the purpose of establishing the NFS service is

The directory sharing service is provided externally through the network, but the firewall is enabled for the default installed Fedora system, which causes the NFS server

Cannot be used normally. Therefore, first disable the firewall and enter the "lokkit" command in the command line to open the fire prevention period setting interface:

Select (*) Disabled, and then select "OK" to exit, so that the firewall is permanently Disabled.

The following describes how to start the NFS service:

(1) start and stop the nfs service through commands

Run the following command line:

#/Etc/init. d/nfs start

This will start the nfs service. you can enter the following command to check whether the nfs service is started.

# Mount-t nfs localhost:/opt/tmp/mnt/

If no error message is displayed, you can view the content in the/mnt directory and

/Opt/tmp is consistent.

Use this command to stop the nfs service:

#/Etc/init. d/nfs stop

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.