NFS Server Installation and Configuration

NFS Server Installation and Configuration ------

Install NFS Server -----

Prerequsites -----

> Installed CentOS 6 / RHEL 6 Server
> YUM Repository configured on network
> Static IP configured to the server 

Installation Steps -----

> Logoing to the server with root user.

> Install NFS packages.
Command :- #yum install -y nfs*

> Install rpcbind package.
Command :- #yum install -y rpcbind*

> Disabled Selinux
Command :- #vi /etc/selinux/config       ------ Edit config file.
SELINUX=disabled

:wq      ----- Save the file and exit



 > Disabled Linux Firewall / iptables.
Command :- #service iptables stop           ------ Stop iptables services
                      #chkconfig iptables off         ------ Off the service in linuix boot.


> Start NFS Service
Command :- #service nfs start


> Start rpcbind Service
Command :- #service rpcbind start


> Enable NFS and rpcbind service in linux boot process
Command :- #chkconfig rpcbind on
                      #chkconfig nfs on



Configure NFS Server -----

> Create directory on / partition.
Command :- #mkdir /storage        ------ Create storage directory on / partition

> Change read , write premission to storage directory
Command :- #chmod 777 /storage    ------ I have give full permission to /storage directory.

> Add nfsshare directory in /etc/exports file to share on network.
Command :-  #vi /etc/exports       ----- Edit exports file and add the following information.

/storage *(rw,no_root_squash,sync)

:wq       ------ Save and exit

rw      - Allow both read and write requests on a NFS volume.
ro       - Allow only read requests on a NFS volume.
sync   - Reply to requests only after the changes have been committed to stable storage. (Default)
no_root_squash  - Turn off root squashing.
* - Share with any network

> Restart NFS service
Command :- #service nfs restart

> Restart rpcbind service
Command :- #service rpcbind restart

Client Machine Configuration -----

> Mount NFS Server share dirctory with local directory
Command :- #mount <NFS-Server-IP>:/storage /media    ------ NFS server /storage directory mount on /media client machine directory.

Note :- Make sure Client machine's selinux and iptables configured or disabled to access NFS server.

EOF



Comments

Popular posts from this blog

KVM Live Migration without Shared Storage

Create CentOS 6 Local package and Group package Repository

Create Linux ( LUCI ) Cluster