0% found this document useful (0 votes)
40 views3 pages

NFS Server Setup

If the portmap service is running, then the nfs service can be started. If the services are listed as off for run levels 3, 4 and 5, then change them to on with the commands: #rpcinfo -p this file is for listing the hosts that are not allowed to access your shares. #vi / etc / hosts.allow this command allows your machine to access your nfs shares, add the following lines to your file, and replace the IP(s) of your machine(s)

Uploaded by

Travis Booth
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views3 pages

NFS Server Setup

If the portmap service is running, then the nfs service can be started. If the services are listed as off for run levels 3, 4 and 5, then change them to on with the commands: #rpcinfo -p this file is for listing the hosts that are not allowed to access your shares. #vi / etc / hosts.allow this command allows your machine to access your nfs shares, add the following lines to your file, and replace the IP(s) of your machine(s)

Uploaded by

Travis Booth
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Server 192.168.1.0 Client 192.168.1.

From Server To run an NFS server, the portmap service must be running. To verify that portmap is active, type the following command as root: /sbin/service portmap status If the portmap service is running, then the nfs service can be started. To start an NFS server, as root type: /sbin/service nfs start To check to make sure the NFS service is started run this command: #/sbin/service nfs status If the services are listed as off for run levels 3, 4 and 5, then change them to on with the commands: #/sbin/chkconfig --level 5 nfslock on #/sbin/chkconfig --level 5 rpcbind on This command will make sure nfs starts when server boots: #/etc/rc.d/init.d/nfs start This command will make sure the nfslock starts when server boots: #/etc/rc.d/init.d/nfslock start This command will make sure the rpcbind starts when server boots: #/etc/rc.d/init.d/rpcbind start To Display a List of Registered RPC Programs and to make sure nfs is running correctly use this command: #rpcinfo p This file is for listing the hosts that are not allowed to access your shares. This file file will most likely be over written by the following command (see below) it is best to list ALL servers here. #vi /etc/hosts.deny

portmap:ALL rquotad:ALL lockd:ALL mountd:ALL statd:ALL

This command allows your machine to access your NFS shares, add the following lines to your file, and replace the IPs with the IP(s) of your machine(s) #vi /etc/hosts.allow portmap:192.168.1.5 (This is the address of your desktop) rquotad:192.168.1.5 lockd:192.168.1.5 mountd:192.168.1.5 statd:192.168.1.5 Run this command to check the status of your iptables firewall: # /etc/init.d/iptables status To stop the iptables firewall: # /etc/init.d/iptables stop SELinux may create problem for network service if not configured properly. So you can turn off SELinux temporarily i.e. permissive mode for SELinux. In this mode SELinux will continue its work and it will log message to system log files. But it will not block any network service or protected service. command to get status of SELinux #sestatus This command will set SELinux to permissive mode #setenforce permissive (create the directory to mount to the client (desktop), then restart nfs daemons) After permissive mode is set you want to make you mount directory with this command #mkdir /dir/SomeFolder Use chmod to modify the access to the created directory #chmod 777 /dir/SomeFolder You the next command to edit the exports file using vi #vi /etc/exports /dir/SomeFolder 192.168.1.0(rw) (Server IP Address)

Turn the NFS config file back on running this command: #chkconfig nfs on #exportfs ra Run this command to restart server now: #shutdown -r now

Login to your client computer and open a terminal Run the following command #mount (Server IP):/mnt/SomeFolder /mnt Once you get into the directory try to make a file: touch test.txt You can then go back to the server and check the directory to make sure the file was created in the mounted directory.

You might also like