Friday, August 14, 2009

How to install a NFS server on Debian

How to install a NFS server on Debian

NFS (Network File System) is must if you'd like to share your storage capacity through IP network. It's easy to build easy to configure. Just follow the steps below.

1) Run apt-get install nfs-kernel-server nfs-common portmap

2) Then edit /etc/exports as following

# /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,no_subtree_check) hostname2(ro,sync,no_subtree_check)
#
# Example for NFSv4:
# /srv/nfs4 gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)
# /srv/nfs4/homes gss/krb5i(rw,sync,no_subtree_check)
/media/sdb 192.168.1.10(rw,sync,no_root_squash)

Line in red indicates your NFS server's share point directory, access granted IP and permissions. wq exports file.

3) You need to commit your changes with following command

exportfs -a

That's all you can mount your NFS client to your new NFS server.

Cheers

Typhoon Master

No comments:

Post a Comment