Open main menu

CDOT Wiki β

Changes

OPS535-lab-nfs

176 bytes added, 13:28, 4 September 2019
m
Fixing formatting
<li>Study the output and make notes of the first few lines. You should see two lines that end with the word "portmapper". If you don't, there is something wrong with your system, your system will not be able to provide NFS service. Ask for help if this is the case.</li>
<li>You should also see a line or two (or even more) that contains the word "nfs". If you don't, NFS is not running. If NFS is not running, you can start up NFS with the command:
<source>systemctl start nfs-server</source></li>
<li>Create a directory named "/nfs-pub". Enter the command:
<source>mkdir /nfs-pub</source></li>
<li>Change the file permission on "/nfs-pub" so everyone can read/write/list. Enter the command:
<source>chmod 777 /nfs-pubDouble pub</source> Make sure to double check that the file permission with the ls -l commandpermissions have been set correctly.</li>
<li>To set the sticky bit on the directory "/nfs-pub" , use the command
<sourse>chmod +t /nfs-pub</source></li>
<li>Edit your /etc/exports file and insert the following lines:
<source>/nfs-pub ip-of-vm1(rw,root_squash) /nfs-pub ip-of-vm3(rw,root_squash)</source>
"ip-of-vm1" should be replaced by the actual IP address of vm1 (VM1),and "ip-of-vm3" should be replaced by the actual IP address of vm3 (VM3).</li>
<li>Enter the command
<source>exportfs -a</source>
to tell your NFS server to re-read the configuration file (/etc/exports) and take the appropriate action, i.e. to export the directory /nfs-pub to the specific host.</li>
<li>Enter the command
<source>showmount -e</source>
Make notes of the output and consult the man page of showmount to find out the purpose of this command.</li>
<li>Use the command "exit" to leave the super user shell and switch back to the regular user shell.
Enter the command
<source>id</source>
to confirm your user id. Write down your user name, user ID and group ID.</li>
<li>Copy the file /etc/passwd into directory /nfs-pub as passwd.S. Enter the command
<source>cp /etc/passwd /nfs-pub/passwd.S</source></li>
<li>Finally, confirm the file copying with the "ls -l" command and make notes of the output.</li>
<li>Modify the firewall on your server to allow incoming nfs traffic in your internal zone. Make sure this change persists past reboot.</li>
932
edits