Linux from entry to master series NFS

Source: Internet
Author: User

Network File System (NFS) is a mechanism for attaching partitions (directories) on remote hosts to local systems through the Network, with support for the network file system, you can operate on the shared partition (directory) of the remote host on the local system just like operating on the local partition.

Configuration of NFS server on Linux Server

Log on to the Linux server as root, edit the exports shared directory configuration file under the/etc directory, and specify the shared directory and permissions.

Run the following command to edit the file/etc/exports:

# Vi/etc/exports

Add the following content to the file:

/Home/work 192.168.0. * (rw, sync, no_root_squash)

Save and exit.

The added content indicates that the computer with the ip address range of 192.168.0. * can access the/home/work directory with the read/write permission.

/Home/work is also called the server output shared directory.

The meanings of parameters in parentheses are described as follows:

Rw: read/write permission. the read-only permission parameter is ro;

Sync: data is written to the memory and hard disk synchronously. You can also use async. Data is saved in the memory before being written to the hard disk immediately.

No_root_squash: attributes of the NFS server shared directory user. If the user is root, the shared directory has root permissions.

Run the following command to start port ing:

#/Etc/rc. d/init. d/portmap start

Finally, run the following command to start the NFS service. At this time, NFS will activate the daemon and then start listening to Client requests:

#/Etc/rc. d/init. d/NFS start

You can also restart the Linux server to automatically start the NFS service.

After the NFS server is started, you also need to check the firewall and other settings of the Linux Server (usually you need to disable the Firewall Service) to ensure that the ports used by NFS and the hosts that allow communication are not blocked, check the settings of iptables, ipchains, and other options on the Linux server, as well as/etc/hosts. deny,/etc/hosts. allow file.

We first perform a loop test on the NFS server on the Linux server to verify whether the shared directory can be accessed. Run the following command on a Linux Server:

# Mount-t NFS 192.168.0.20:/home/work/mnt

# Ls/mnt

Command to mount the NFS output shared directory of the Linux server to the/mnt directory. Therefore, if NFS works properly, you should be able to see the content in the/home/work shared directory in the/mnt directory.

Install NFS server in Ubuntu 12.04

Install and configure the NFS server to share the Ubuntu 12.04 and ARM files.

Build an nfs server in Ubuntu

File Server NFS configuration details

Build an NFS Network File System server in Ubuntu

Heartbeat_ldirector + LB + NFS for HA, LB, and file sharing

How to Configure NFS server in CentOS 5.5

Install and use NFS in Ubuntu 12.10

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.