To configure NFS network sharing in Ubuntu10.10

Source: Internet
Author: User
After the cross-compiling environment arm-linux-gcc is installed in Ubuntu10.10, NFS network sharing is configured for file sharing between different linux Hosts and the target machine. For windows and linux sharing, the samba service is required. Network File System (NFS) allows you to share directories of different hosts (different OS) over the network-you can mount directories of remote hosts through NFS, accessing this directory is like accessing a local directory! 1,

After the cross-compiling environment arm-linux-gcc is installed in Ubuntu 10.10, NFS network sharing is configured for file sharing between different linux Hosts and the target machine. For windows and linux sharing, the samba service is required.
Network File System (NFS) allows you to share directories of different hosts (OS) over the Network-you can mount directories of remote hosts through NFS, accessing this directory is like accessing a local directory!
1. Install the NFS server and client:
$ Sudo apt-get install nfs-kernel-server
Here when installing the nfs_kernel-server, the installation is more comprehensive, just install it can

2. Configure portmap
You can choose either of the two methods:
(1): $ sudo gedit/etc/default/portmap
By default, you do not need to comment out the 127.0.0.1 file.
Or
(2): $ sudo dpkg-reconfigure portmap
Select "NO"
3. Configure the Mount directory and permissions
$ Sudo gedit/etc/exports
My configuration is as follows: add the code in the blank space at the end of the/etc/exports file:
/Home/share * (rw, sync, no_root_squash)

/Home/share is the shared directory of the NFS server. If share does not exist, you can create a new one. * Indicates that any IP Address can share this directory. You can change it to a restricted IP address. rw indicates read and write permissions, and sync indicates default. no_root_squash indicates that if you are root, the shared directory also has the root permission. If it is root_squash, it will be restricted to anonymous names, and uid/gid will be changed to the nobody permission.
$ Man exports View Details
: Q exit to view
4. Update the exports file
If/etc/exports is changed, you can use
$ Sudo exportfs-r
To update this file.
5. Restart the NFS service.
$ Sudo/etc/init. d/nfs-kernel-server restart
Restart the nfs service
6. Test
Mount a local disk (the linux system IP address is 192.168.2.104, And/home/share is mounted to/mnt). You can use ifconfig to view the local IP address.
$ Sudo mount 192.168.2.104:/home/share/mnt
Use
$ Df
Then go to the mnt folder to view the result. You can see the content in the share directory in the mnt folder.
$ Cd/mnt
Unmount
$ Umount/mnt
7. How to access shared files on the target machine?
Now, you can test the nfs service on your machine. The procedure is as follows:
$ Mount serverip:/arm9test/mnt
Specifically, serverip is actually the Server ip address. Do not drop the ":" next to the serverip address, which may cause errors.
If the mounting is successful, you can see the files under/arm9test in/mnt. If an error occurs, you need to find the cause. You 'd better check the private dish of laruence, because the above is very clear.

After passing the test on your computer, you need to mount the shared directory of the host to the target board. In this way, the debugging program is very convenient and you can directly debug it without passing the program in. The Mount process is as follows:
First, start 2410, go to linux, go to shell, and configure the IP address of the Board,
$ Ifconfig eth0 ipaddr
Ipaddr is the ip address configured above to allow access to the shared directory. It can be set to 127.0.0.2 and then run the following command:
$ Mount serverip:/arm9test/mnt/ext1
Change the serverip address to the ip address of your host. At this time, make sure that the nfs service of your host has been started and the network cable has been connected, under normal circumstances, wait a moment to complete the mounting.

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.