Configure the NFS service (Ubuntu-10.10-desktop) NFS (NetworkFileSystem, Network File System) to share directories of different hosts (different OS) over the network-directories of remote hosts can be mounted through NFS, accessing this directory is like accessing a local directory! (It is best to switch to the root user before the operation) to install the NFS server and client: sudoapt-getinstallnfs-kernel-ser
Configure NFS service (Ubuntu-10.10-desktop)
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! (It is best to switch to the root user before the operation)
Install the NFS server and client:
Sudo apt-get install nfs-kernel-server nfs-common portmap
Prompt whether to continue: Y
Do you want to continue [Y/n]? Y
The client can be installed to test the NFS service on the local machine.
Configure portmap
Sudo dpkg-reconfigure portmap
Select "No" after running"
Configure the Mount directory and permissions
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)
#
/Home/cevin/nfs * (rw, sync, no_root_squash) Note) there is a space in front *.
Explanations:
# Subsequent explanations
/Home/cevin/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 the permission and sync indicates the default one.
Restart the NFS service
Sudo/etc/init. d/nfs-kernel-server restart // restart the nfs service
Try mounting a local disk and mount/home/cevin/nfs to/mnt
Root@linuxidc.com: // # mount-t nfs 192.168.0.110:/home/cevin/nfs mnt // 192.168.0.110 is your own IP
Run df to see the result:
Root@linuxidc.com:/# df
192.168.0.110:/home/cevin/nfs
19737280 2962304 15772352 16%/mnt
Mounted successfully. Tested. unmounted
Root@linuxidc.com:/# umount mnt/