Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Fwd: NFS

1 message

aicha salmani <saicha.1992@gmail.com> dim. 15 déc. 2019 à 18:37


À : info.iteam2018@gmail.com

---------- Forwarded message ---------


De : hafedh <hafedh@sch.tn>
Date: dim. 15 déc. 2019 à 18:26
Subject: NFS
To: <saicha.1992@gmail.com>

NFS Server Configuration in RHEL7 Step by Step


Guide
 NFS = Network File system which is used to share directories across the Unix/Linux Operating system.
Which does not support directly cross platform.
Network File System (NFS): Is a nfs server client protocol used for sharing files and directories
between Linux / Unix to Unix/Linux systems vise versa. It is a popular distributed filesystem protocol
that enables users to mount remote directories on their server. NFS enables you to mount a remote
share locally. NFS was developed by Sun Micro Systems in the year 1984
RHEL7 provides the support for NFS versions 3, 4.0, and 4.1(latest version)
NFS default port number is 2049
NFS share we can mount Manually, Automatically using AutoFS and Half manual and half automatic

NFS Server configuration in RHEL7


Features:
1. Centralized Management of Files
2. Everyone can access same data
3. Secured with Firewalls and Kerberos
4. Reduce Storage Cost and Easy to use

Server Profile:
Packages: nfs-utils*
Daemon Name: nfs-service
Port Number: 2049
Config file path: /etc/exports

NFS server side configuration


Install nfs packages through yum command.

# yum install nfs-utils

# systemctl enable nfs-server

# systemctl start nfs-server

Enable Firewall ports to communicate with client


# firewall-cmd --permanent --add-service=nfs

# firewall-cmd --permanent --add-service=mountd

# firewall-cmd --permanent --add-service=rpc-bind

Above commands will enable the firewall ports from server to client

Create and Configure NFS share

# mkdir /ravi

# chown nfsnoboddy:root /ravi

#chmod 770 /ravi

# vim /etc/exports

/ravi 192.168.4.0/24(rw)

Save & Exit (:wq)

# exportfs -avr

That’s it from server side configuration. 

Client Side Configuration


Login to client machine and try to ping to NFS server machine to confirm client is communicating with NFS server.

# showmount -e NFS-SERVER-IP

# showmount -r 192.168.4.20

To see the NFS shares, which are shared from NFS server

Manually mounting the NFS shares using mount command

# mount -t nfs -o sync 192.168.4.20:/ravi /mnt/nfs

# df -h

Persistent Storage Using NFS

# vi /etc/fstab

serverçip:/path_share mount_point nfs dafaults 0 0

example:

192.168.2.5:/root/share /mnt/share nfs defaults 0 0

 #

You might also like