Ubuntu12.04 install NFSserver

Source: Internet
Author: User
Ubuntu12.04 install NFSserver first install nfs-kernel-serverapt-getinstallnfs-kernel-server and then create a directory: mkdir-p/opt/share and grant the permission 777: chmod-R777/opt/share add configuration in the/etc/exports file:/opt/s

Install NFS server in Ubuntu 12.04

First install nfs-kernel-server

Apt-get install nfs-kernel-server

Then create a directory:

Mkdir-p/opt/share

And grant permissions 777:

Chmod-R 777/opt/share

Add the configuration in the/etc/exports file:

/Opt/share 10.112.18.0/255.255.255.0 (rw, no_root_squash)

Add the configuration in/etc/hosts. allow:

Portmap: 10.112.18.0/255.255.255.0

Add the configuration in/etc/hosts. deny:

Portmap: ALL

Restart two services:

Service portmap restart

Service nfs-kernel-server restart

Install nfs-common on another Ubuntu

Apt-get install nfs-common

Then create the directory test

Mkdir ~ /Test

Run the test command to check the following:

# Showmount-e 10.112.18.158

Export list for 10.112.18.158:

/Opt/share 10.112.18.0/255.255.255.0

Find the nfs server Mount directory. Now manually mount:

Mount-t nfs4 10.112.18.158:/opt/share ~ /Test/

Now we can test it. It should be successful.

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.