Install and configure the NFS server in Ubuntu 14.04

Source: Internet
Author: User

Install and configure the NFS server in Ubuntu 14.04

(1) install the NFS server
1.1-install the Ubuntu nfs server:

Sudo apt-get install nfs-kernel-server

1.2-install the nfs client:

Sudo apt-get install nfs-common

(Nfs-commom is also installed when nsf-kernel-server is installed. If this software package is not installed, execute the command in 1.2)
1.3-set the shared file directory

Sudo mkdir /***/***

(2) Configure NFS
2.1-modify the configuration file/etc/exports

Add/home/USER/nfs * (rw, sync, no_root_squash, no_subtree_check) to the last line)
The preceding directory is shared with the nfs service client. * indicates that all network segments can be accessed (or specific IP addresses can be used)
Rw: The Client Connected to this directory has read and write permissions on the shared directory.
Sync: synchronous data writing memory and Hard Disk
No_root_squash: when the user accesses the shared folder with the root user, the root user is not mapped. (Root_squash: the root user is mapped to an anonymous user when the root user accesses the shared folder)
No_subtree_check: the permission of the parent directory is not checked.
2.2-nfs is an RPC program. before using it, you need to map the port and set it through rpcbind:

Sudo service rpcbind restart

2.3-restart the nfs service:

Sudo service restartnfs-kernel-server restart

2.4-test
Run the following command to display the shared directory:

Showmount-e

(3) attaching commands
To execute the mount command on any server, you can mount the shared path on the specified ip server to the local.

Sudo mount-t nfs ***. ***:/home/USER/nfs-client/
* **. ** Is the IP address of the NFS server.

If you want to enable automatic mounting:
Run the above command sudo mount-t nfs ***. ***. ***. * **:/home/USER/nfs-clinet/write to/etc/rc. local file.

(4) Others
Client error:
Mount: file system type error, option error, ***. ***:/home/USER/nfs has bad super block,
The code page, Helper Program, or other errors are missing
(For some file systems (such as nfs and cifs), you may need
One/sbin/mount. <type> Helper Program)
Some useful information can be found in syslog in some cases-Please try

Dmesg | tail command.
Solution:

Sudo apt-get install nfs-common

-------------------------------------- Split line --------------------------------------

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

-------------------------------------- Split line --------------------------------------

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.