How to configure NFS in CentOS 6 ?
Network : 192.168.58.0
Server IP : 192.168.58.200
Server settings.
[root@server ~]# yum install nfs* -y
# Add the following entry in Export File
[root@server ~]# vi /etc/exports
/home 192.168.58.0/24(rw,sync,no_root_squash,no_all_squash)
# options
# /home = shared directory.
# 192.162.0.0/24 = Range of the network which nfs will
# grant access to.
# rw = Read and write access.
# ro = Read only access.
# sync = synchronize
# no_root_squash = enables root access and privilege.
# no_all_squash = enables user access.
[root@server ~]# service nfslock restart
[root@server ~]# service nfs restart
[root@server ~]# chkconfig nfslock on
[root@server ~]# chkconfig nfs on
Client Configuration
Network : 192.168.58.0
Client IP : 192.168.58.201
[root@client ~]# yum install nfs* -y
[root@client ~]# service nfslock restart
[root@client ~]# service netfs restart
[root@client ~]# chkconfig nfslock on
[root@client ~]# chkconfig netfs on
[root@client ~]# mount nfs 192.168.58.200:/home /home
[root@client ~]# df -h
# Edit & add the following line in the fstab file (To make this Permanant)
[root@client ~]# vi /etc/fstab
192.168.58.200:/home /home nfs defaults,_netdev 1 1
Network : 192.168.58.0
Server IP : 192.168.58.200
Server settings.
[root@server ~]# yum install nfs* -y
# Add the following entry in Export File
[root@server ~]# vi /etc/exports
/home 192.168.58.0/24(rw,sync,no_root_squash,no_all_squash)
# options
# /home = shared directory.
# 192.162.0.0/24 = Range of the network which nfs will
# grant access to.
# rw = Read and write access.
# ro = Read only access.
# sync = synchronize
# no_root_squash = enables root access and privilege.
# no_all_squash = enables user access.
[root@server ~]# service nfslock restart
[root@server ~]# service nfs restart
[root@server ~]# chkconfig nfslock on
[root@server ~]# chkconfig nfs on
Client Configuration
Network : 192.168.58.0
Client IP : 192.168.58.201
[root@client ~]# yum install nfs* -y
[root@client ~]# service nfslock restart
[root@client ~]# service netfs restart
[root@client ~]# chkconfig nfslock on
[root@client ~]# chkconfig netfs on
[root@client ~]# mount nfs 192.168.58.200:/home /home
[root@client ~]# df -h
# Edit & add the following line in the fstab file (To make this Permanant)
[root@client ~]# vi /etc/fstab
192.168.58.200:/home /home nfs defaults,_netdev 1 1
No comments:
Post a Comment