Preparing a Web image server and planning to share images with NFS on different machines. Take a note on NFS configuration and mounting to avoid forgetting that environment: the server and client are both Ubuntu10.04NFSServer: 192.168.1.105 $ sudoapt-getinstallnfs-kernel-server $ sudomkdir-p/export/user
Preparing a Web image server and planning to share images with NFS on different machines.
Take notes on NFS configuration and mounting to avoid forgetting:
Environment: both the server and client are Ubuntu 10.04
NFS Server:192.168.1.105
$ Sudo apt-get install nfs-kernel-server
$ Sudo mkdir-p/export/users
$ Mount -- bind/home/ubuntub // export/users
$ Sudo mount -- bind/home/ubuntub // export/users
$ Sudo vi/etc/fstab
/Home/ubuntub/export/users none bind 0 0
$ Sudo vi/etc/default/nfs-kernel-server
NEED_SVCGSSD = no
$ Sudo vi/etc/default/nfs-common
NEED_IDMAPD = yes
NEED_GSSD = no
$ Sudo vim/etc/idmapd. conf # Check it here. If so, you do not need to modify it.
[Mapping]
Nobody-User = nobody
Nobody-Group = nogroup
$ Sudo vim/etc/exports
/Export 192.168.1.0/24 (rw, fsid = 0, insecure, no_subtree_check, async)
/Export/users 192.168.1.0/24 (rw, nohide, insecure, no_subtree_check, async)
$ Sudo/etc/init. d/nfs-kernel-server restart
NFS Client:
$ Sudo apt-get install nfs-common
$ Sudo vim/etc/default/nfs-common
NEED_IDMAPD = yes
NEED_GSSD = no
$ Sudo mount-o proto = tcp and port = 2049 192.168.1.105:/export/mnt
$ Cd/mnt/
$ Cd users/
$ Touch hi
$ Sudo vim/etc/fstab # There is a problem here, and there is no response to restart
192.168.1.105:/export/mnt nfs4 _ netdev, auto, 0, 0
Now go to the/mnt directory of the client and operate on the directory. You can see it immediately on the server.