Create an NFS server in ubuntu

Source: Internet
Author: User
1. install nfs server and client server: sudoapt-getinstallportmapnfs-kernel-server Client: sudoapt-getinstallportmapnfs-common2. configure the shared file edit/etc/exports, and add the sudogedit/etc/exports directory to be shared. Configure/media/sda6/share * (rw, sync)/m 1. install the nfs server and client
Server: sudo apt-get install portmap nfs-kernel-server
Client: sudo apt-get install portmap nfs-common
2. Configure shared files
Edit/etc/exports and add the directory to be shared.
Sudo gedit/etc/exports
Configuration
/Media/sda6/share * (rw, sync)
/Media/sda6/share is the directory to be shared, * indicates that all network segments are allowed to access, and rw indicates read/write permissions.
Save.
Sudo exportfs-ra
3. Restart the service
Sudo/etc/init. d/portmap restart
Sudo/etc/init. d/nfs-kernel-server restart

4. You can perform this test after the server is installed.
$ Showmount-e
If this information is displayed, it indicates that the operation is successful.
Boris @ NF140:/etc/default $ showmount-e
Export list for NF140:
/Media/sda6/share *

4. Create a directory for mounting on the client.
Sudo mkdir/mnt/share
Sudo chmod 777/mnt/share/
6. The customer can load it.
Sudo mount 172.16.5.140:/media/sda6/share/mnt/share

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.