Steps for installing the NFS server in Ubuntu

Source: Internet
Author: User
During embedded Linux development, NFS is often used to facilitate program debugging. With NFS, you can place the root file system used by the Board under the host directory. The Development Board mounts the file to this directory over Ethernet and uses the file under this directory as the content of the root file system, in this way, the user's program can be re-used without having to re-burn the root file system of the writing board, which can greatly speed up program debugging. To install the NFS server in Ubuntu, follow these steps: 1. Install the NFS server and client: apt-get

During embedded Linux development, NFS is often used to facilitate program debugging. With NFS, you can place the root file system used by the Board under the host directory. The Development Board mounts the file to this directory over Ethernet and uses the file under this directory as the content of the root file system, in this way, the user's program can be re-used without having to re-burn the root file system of the writing board, which can greatly speed up program debugging.

To install the NFS server in Ubuntu, follow these steps:

1. Install the NFS server and client:

Apt-get install nfs-kernel-server nfs-common portmap

The client can be installed to test the NFS service on the local machine.

2. Configure portmap

You can choose either of the two methods:

(1) emacs, etc/default/portmap

Remove-I 127.0.0.1

(2) dpkg-reconfigure portmap

Select "no" after running"

In addition, it is very important to use the sysv-rc-conf tool to check the status of the current nfs and portmap. If it is off, use sysv-rc-conf portmap on and sysv-rc-conf nfs-kernel-server on.

3. Configure the Mount directory and permissions

Emacs/etc/exports

Add

/Nfs * (rw, sync)

Explanations:

/Nfs is the NFS shared directory. * indicates that any IP Address can share this directory. You can change it to a restricted IP address. rw indicates permissions and sync indicates default permissions.

4. Update the exports file

If you update/etc/exports, you can update this file through exportfs-r.

5. Restart the NFS service.

/Etc/init. d/nfs-kernel-server restart NFS service

6. Test

Try mounting a local disk (My Ubuntu system IP address is 192.168.0.3 and/nfs is mounted to/mnt)

Mount 192.168.0.3:/nfs/mnt

Run df to view results

Umount/mnt

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.