How to build an nfs server for tiny6410 in ubuntu

Source: Internet
Author: User


When developing an nfs server in an embedded linux system, 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 root file system of the user's program can be re-used after it is updated, which can greatly speed up program debugging. Www.2cto.com
To install the nfs server in Ubuntu, follow these steps: 1. Install the NFS server and client: sudo apt-get install nfs-kernel-server nfs-common portmap can be used to test the NFS service on the local machine. 2 configure portmap either of the two methods: (1): sudo emacs/etc/default/portmap remove-I 127.0.0.1 (2) to select "no" after running sudo dpkg-reconfigure portmap, you must use the sysv-rc-conf (instead of chkconfig) tool to check the status of the current nfs and portmap. If it is off, use sudo sysv-rc-conf portmap on or sudo sysv-rc-conf nfs-kernel-server on to open 4.3.3 and configure the Mount directory and permission vim/etc/exports.
My configuration is as follows: #/etc/exports: the access control list for filesystems which may be exported # to NFS clients. see exports (5 ). # Example for NFSv2 and NFSv3: #/srv/homes hostname1 (rw, sync) hostname2 (ro, sync) # Example for NFSv4: #/srv/nfs4 gss/krb5i (rw, sync, fsid = 0, crossmnt) #/srv/nfs4/homes gss/krb5i (rw, sync) # www.2cto.com/home/rootfs * (rw, sync) Explanation: # The following explains that/home/rootfs is the shared directory of NFS. * indicates that any IP Address can To share this directory, you can change it to a restricted IP address. rw indicates the permission and sync indicates the default IP address. 4.3.4 update the exports file as long as you have changed/etc/exports, you cannot use sudo exportfs-r to update this file 4.3.5 to restart NFS service Sudo/etc/init. d/portmap startsudo/etc/init. d/nfs-kernel-server restart nfs service 6 local test try mounting local disk (My linux system IP address is 192.168.1.104, Mount/home/rootfs to/mnt) $ sudo mount 192.168.1.104: /home/rootfs/mnt run $ df check the result $ sudo umount/mnt 7 test on the Development Board (mount the host/home/rootfs to the/mnt directory of the Development Board) mount-t nfs-o nolock 192.168.1.104:/home/rootfs/mnt author yinjiabin

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.