Ubuntu9.10 sets up the NFS service on arm at a.m. on September 25,. Referring to other people's practices, it is also a common method on the Internet to build the NFS service on Linux.
Specifically, the NFS server is built on ubuntu9.10 and the client is built on arm to facilitate development.
Reference others' practices first:
1. Install the NFS server and client:
Sudo 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): sudo gedit/etc/default/Portmap
Comment out-I 127.0.0.1
(2) sudo dpkg-reconfigure Portmap
Select "no" after running"
3. Configure the Mount directory and permissions
# Sudo gedit/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)
#
/Home/nfsboot 192.168.1. * (RW, sync, no_root_squash)
Explanations:
# Subsequent explanations
/Home/nfsboot 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 the permission and sync indicates the default value.
4. Update the exports file
If you change/etc/exports, you cannot update this file through sudo exportfs-R.
5. Restart the NFS service.
Sudo/etc/init. d/nfs-kernel-server restart NFS service
6. Test
Try mounting the local disk (My Linux system IP address is 202.198.137.18, Mount/home/nfsboot to/mnt)
$ Sudo Mount 192.168.1.7:/home/nfsboot/mnt
Run $ DF to check the result
$ Sudo umount/mnt
5. Use NFS service mounting in an embedded system (from the Internet)
Used for Embedded mounting
Mount-T nfs-O nolock 192.168.1.7:/home/nfsboot/mnt
PS:
In theory, it is enough, because I used to engage in a country without any obstacles. But now the problem arises. The previous system version is 8. 04, but now it is 9. 10, the result is not running. After a day or two, I was dizzy. I always suspected that I was wrong at the place.
I saw an article 9 last night. 10 NFS service build, only to see:
Note: The Host IP address above cannot be configured with *. Otherwise, access is denied on the client. What if we want to set LAN access?
What should I do? Use a subnet mask, for example, 10.1.60.0/255.255.254.0, to make both 10.1.60. * And 10.1.61. * accessible.
10.1.60/23.
What is it about? The previous method does not work. I will specify
/Home/nfsboot 192.168.1.7 (RW, sync, no_root_squash) // the IP address of the local machine, which is used for testing.
OK! Yes !!!
NFS support on arm. I will not talk about it here. It is in my blog. Mounted from arm!
Outer Edge:
I also learned about NFS, such
Question: 1. sudo Mount-t nfs 192.168.1.7:/home/nfsboot/mnt
Mount. NFS: Access denied by server while mounting 192.168.1.7:/home/nfsboot
Because I specify a CIDR block.
2. Ladeng @ Ladeng-LAPTOP :~ $ Showmount-e
Showmount: RPC: program not registered
MOUNTD not started
Solution:
Ladeng @ Ladeng-LAPTOP :~ $ Host 127.0.0.1
1.0.0.127.in-ADDR. Arpa Domain Name Pointer localhost.
Ladeng @ Ladeng-LAPTOP :~ $ Host 127.0.0.1 // disable Wireless
; Connection timed out; no servers cocould be reached
The fact is: even if an IP address is specified, NFS can be used, but this method still does not work. Why ?? Learning
3. Ladeng @ Ladeng-LAPTOP :~ $ DF
File System 1 K-block used available % mount point
/Dev/sda10 17061584 5290556 10904324 33%/
Tmpfs 767520 0 767520 0%/lib/init/RW
Varrun 767520 128 767392 1%/var/run
Varlock 767520 0 767520 0%/var/lock
Udev 767520 172 767348 1%/dev
Tmpfs 767520 84 767436 1%/dev/SHM
Lrm 767520 2192 765328 1%/lib/modules/2.6.28-17-generic/volatile
/Dev/sda9 241116 45117 183551 20%/boot
/Dev/sda8 8111964 1502092 6197808 20%/home
/Dev/sda6 38538496 21477824 17060672 56%/Media
Used to view mounting information
So far, this problem has come to an end and starts real program development!