Page 110 - RHEL8 BOOK
P. 110

Step # 1: Check the Installed Packages.
          [root@sun pub]# yum list installed | grep nfs

          Step # 2: Install Packages through rpm/yum.
          [root@sun ~]#yum install nfs* -y

          Step # 3: Create the resources (Files/folders) to be shared.
          [root@sun pub]# mkdir /var/zoom
           [root@sun pub]# chmod 777 /var/zoom
           [root@sun pub]# cd /var/zoom/
          [root@sun zoom]# touch zfa.txt zfb.txt zfc.txt
          [root@sun zoom]# mkdir zdira zdirb zdirc
          [root@sun zoom]# ls

          Step # 4: Edit the Configuration File
          [root@sun ~]#vi /etc/exports
          /sales             192.168.1.2(rw,sync)
          /var/zoom             192.168.1.3/24(ro,sync)
          /var/salesdept         192.168.1.0/24(rw,async)
          /var/ftp/pub/Packages *(rw,async)

          Step # 5: Start the services.
          [nfs-server ]# systemctl restart nfs-server.service
          [nfs-server ]# systemctl enable nfs-server.service
          [root@sun ~]#systemctl stop firewalld.service
          [root@sun ~]#systemctl disable firewalld

          If you don’t know which ports to allow through firewall, run the following command:


          [root@sun ~]#rpcinfo -p

          Step # 7: Check the list of shares from NFS server.
          [root@sun ~]#showmount –e <nfs_server_name/ip>
          [root@sun ~]#showmount –e 192.168.1.1

                                          CLIENT SIDE CONFIGURATION

          Step # 1: To see the list of shares from NFS server
          [root@sun ~]#showmount –e 192.168.1.X (where X is nfs server IP)
          [root@sun ~]#mkdir /misc/nfs1
          [root@sun ~]#mount –t nfs –o nfsvers=3 192.168.1.1:/var/zoom /misc/nfs1

          Step # 2: Check the NFS server data
          [root@sun ~]# cd /misc/nfs1
          [root@sun nfs1]#ls



                                                       S. Pradhan
                             (MCA, MBA-IT, BCA, CCNA, MCSA 2012, RHCE, ETHICAL HACKING)
                                             Email Id:-spradhan.iiht@gmail.com
                                                           110
   105   106   107   108   109   110   111   112   113   114   115