Changes

Jump to: navigation, search

NAD710 Lab 6

188 bytes added, 09:50, 18 March 2009
NFS Server Setup
* Open a terminal window and switch to super user with the command "su -"
* Enter the command <pre>rpcinfo -p</pre>
* Study the output, especially the first few output lines. You should see a few lines that ended with the word "portmapper". If you did do not see such lines, or you got get something like "rpcinfo: can't contact portmapper: ...", then "portmapper" is not running. Try the command "service portmap start" and run the "rpcinfo -p" command again.
* Once you have portmapper running, start the NFS server with the command "service nfs start".
* Run the "rpcinfo -p" command again, compare the output with the output of the previous command and note the difference. You should see lines ended with nfs, nlockmgr, mountd, etc.
* Create a directory called "/nfs-pub" and set the read/write/list premission for all (chmod 777).
* Set the sticky bit on the directory "/nfs-pub" (chmod +t /nfs-pub).
* Modify the /etc/exports file and add the following line to it, : but replace the place holder "ip-of-host" with your HOST's actual IP address.(IP of the Host Computer to which you want to allow access your directory .i.e NFS share directory).
/nfs-pub ip-of-host(rw,root_squash)
 
** /nfs-pub: directory on the NFS server to be shared
** ip-of-host: IP address or host name of the machine which is allowed to mount the share dierctory
** (rw,root_squash): nfs export options
* Run the command "exportfs -a" to tell your NFS server to re-read the configuration file (/etc/exports) and take appropriate actions, i.e. share the directory "/nfs-pub" to the machine specified.
* Enter the command "showmount -e". Read the man page to learn more about the "showmount" command.
1
edit

Navigation menu