We usually use nfs service provided by the linux, but different linux edition has its own configuration method, this article describe how to set up the nfs server on debian.
1. on the server machine, we should install these packages belowing:
portmap, nfs-user-server, nfs-kernel-server
host-name:/# apt-get install portmap
host-name:/# apt-get install nfs-user-server
host-name:/# apt-get install nfs-kernel-server
复制代码
2. on the client machine, we should install the package belowing:
nfs-common
host-name:/# apt-get install nfs-common
复制代码
3. modify the configuration file
host-name:/# vi /etc/exports
/nfs *(rw,no_root_squash,no_all_squash,sync)
复制代码
4. start the nfs service
host-name:/#/etc/init.d/portmap start
host-name:/#/etc/init.d/nfs-user-server start
host-name:/#/etc/init.d/nfs-kernel-server start
5. test the service
host-name:/#mount -t nfs 192.168.x.x:/nfs /mnt