Installing and Configring NFS Server Step by Step Part 1 - Redhat Enterprise Linux PDF
Installing and Configring NFS Server Step by Step Part 1 - Redhat Enterprise Linux PDF
InstallingandConfigringNFSServerstepbystepPart1
InstallingandConfigringNFSServerstepbystepPart1
InstallingandConfigringNFSServerstepbystep
FollowthesestepstoinstallanNFSserver.
Step1.TobegintheNFSserversetup,installtherequiredpackages:
#yuminstallynfsutilsnfs4acltools
Step2.Verifythepackageinstallation:
#rpmqa|grepnfs
nfs4acltools0.3.35.el6.x86_64
nfsutils1.2.27.el6.x86_64
nfsutilslib1.1.51.el6.x86_64
Step3.TheNFSserverusesthreedifferentservicestofunctionproperly.Youneedtoenablethemallatboot
fortheNFSservertofunctiontheway
itshould:
#chkconfignfson
#chkconfignfslockon
#chkconfigrpcbindon
Step4.Verifythatallthreeservicesaresettostartonsystemboot:
#chkconfiglistnfs
nfs0:off1:off2:on3:on4:on5:on6:off
#chkconfiglistnfslock
nfslock0:off1:off2:on3:on4:on5:on6:off
#chkconfiglistrpcbind
netfs0:off1:off2:on3:on4:on5:on6:off
YoushouldalsoverifythattheNFSserviceiscurrentlystoppedbecauseyouneedtomakesomeconfiguration
changesbeforeyoucanstartit.
Step5.Verifythattheserviceisoff:
#servicenfsstatus
rpc.mountdisstopped
nfsdisstopped
rpc.rquotadisstopped
ConfiguringNFS
Forthefirstconfigurationstep,youneedtomakeafewchangestothemainconfigfile.
Step1.Openthemainconfigfileforediting:
#nano/etc/sysconfig/nfs
Step2.Uncommentthefollowinglines:
MOUNTD_NFS_V1=no
MOUNTD_NFS_V2=no
MOUNTD_NFS_V3=no
RPCNFSDARGS=N2N3
Thefirstthreelinesdisablethemountddaemonfromacceptinganythingbelowversion4.Thelastlinedisables
http://redhatenterpriselinux.blogspot.com/2012/07/installingandconfigringnfsserver.html#.V1uHAPkrKUn
1/2
6/10/2016
InstallingandConfigringNFSServerstepbystepPart1
theNFSservicefromevenadvertisinganythingbutversion4aswell.
Step3.Savethefileandexit.
Next,letsworkwiththe/etc/exportsfilebecausethisdefineswhatresourceswillbeavailabletoyourclients.If
thefiledoesntexistalready,youcancreateit.Thesyntaxofthe/etc/exportsfileis<mountpoint><host>
<permissions/options>
Step4.Setupyourexportsinthe/etc/exportsfilestobeavailabletoanyclientonthenetwork:
#nano/etc/exports
/home*(ro,sync)
/opt/company_data*(rw,sync)
Here,youdefinetworesourcesthatyouwillmakeavailable.Thefirstlinedefinesthe/homedirectorytobe
exportedandallowsreadonlyaccesstoallclients.Thesecondlineprovidesthe/opt/company_datadirectory
toallofyourclientswithreadandwritepermissions.Afteryoufinishdefiningalltheresourcesyouwantto
export,saveandclosethefile.
Step5.StartthetwoNFSservices(rpcbindshouldberunningalreadybydefault):
#servicenfslockstart
StartingNFSstatd:[OK]
#servicenfsstart
StartingNFSservices:[OK]
StartingNFSquotas:[OK]
StartingNFSdaemon:[OK]
StartingNFSmountd:[OK]
Step6:Verifythattheserviceshavestartedsuccessfully:
#servicerpcbindstatus
rpcbind(pid25068)isrunning...
#servicenfslockstatus
rpc.statd(pid17726)isrunning...
#servicenfsstatus
rpc.svcgssdisstopped
rpc.mountd(pid17780)isrunning...
nfsd(pid1777717776177751777417773177721777117770)is
running...
http://redhatenterpriselinux.blogspot.com/2012/07/installingandconfigringnfsserver.html#.V1uHAPkrKUn
2/2