Setting up a simple NFS server - Printable Version +- Linux-Noob Forums (https://www.linux-noob.com/forums) +-- Forum: Linux Noob (https://www.linux-noob.com/forums/forum-3.html) +--- Forum: Tips and Tricks (https://www.linux-noob.com/forums/forum-59.html) +---- Forum: Samba and NFS (https://www.linux-noob.com/forums/forum-23.html) +---- Thread: Setting up a simple NFS server (/thread-2445.html) |
Setting up a simple NFS server - xDamox - 2005-09-06 In this guide I will show you how to setup a simple NFS server using Fedora, but I will show how to set it up via command line so you should be able to configure it on more than one distribution. The first step is to make sure you have the NFS server software installed you can check this by issuing the following command: Code: rpm -q nfs-utils if you don't have this package installed, you can use the YUM packages management tool to install the package, to do this issue the following command: Code: yum install nfs-utils Once you have installed the package you can begin to configure the NFS server, you should have a file in the /etc directory called: "exports". This file determines what directory's will be exported, who is allowed to access them and what permissions they have. In this tutorial I will be exporting my /home directory and allowing only the IP of 192.168.0.13 to access this exported directory. So the first step is to edit the exports file and added the following: Code: /home 192.168.0.13(rw,nohide) The above exports the /home directory with the read and write permissions the attributes inside the brackets can be read using the man command along with other attributes that can go in the brackets: Code: man exports Once you have setup your export you should start the portmap daemon. The portmap daemon MUST always be running when running a NFS server. Code: service portmap start Once your portmap has been started you can start your NFS server: Code: service nfs start Once the service has started you can check everything is running by issue the following command: Code: rpcinfo -p You will get output similar to: Code: program vers proto port Once everything is checked out and the services are running you can connect form 192.168.0.13 and mount the /home directory. Code: mount 192.168.0.2:/home /mnt/home Replace 192.168.0.2 with your NFS servers IP and the /mnt/home mount point to one that suites you. if you make any changes to the export file you will need to reexport it instead of restarting the services issue the following: Code: exportfs -r well you can now setup a simple NFS server and store your files on the server :) Setting up a simple NFS server - znx - 2005-11-05 :) nice ! |