CentOS 6 — Configure NFS Client

Configure NFS Client to mount directories provided from NFS Server.

 
[root@www ~]# yum -y install nfs-utils # install
[root@www ~]# vi /etc/idmapd.conf

# line 5: uncomment and change to your domain name
Domain = server.world

[root@www ~]# /etc/rc.d/init.d/rpcbind start 
Starting rpcbind: [  OK  ]

[root@www ~]# /etc/rc.d/init.d/rpcidmapd start 
Starting RPC idmapd: RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
[ OK ]

[root@www ~]# /etc/rc.d/init.d/nfslock start 
Starting NFS statd: [  OK  ]

[root@www ~]# /etc/rc.d/init.d/netfs start 
Mounting other filesystems: [  OK  ]

[root@www ~]# chkconfig rpcbind on 
[root@www ~]# chkconfig rpcidmapd on 
[root@www ~]# chkconfig nfslock on 
[root@www ~]# chkconfig netfs on 
[root@www ~]# mount -t nfs dlp.server.world:/home /home 
[root@www ~]# df -h 
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root 18G 864M 16G 6% /
tmpfs 499M 499M 0% /dev/shm
/dev/vda1 485M 47M 413M 11% /boot
dlp.server.world:/home 18G 864M 16G 6% /home

# home directory on NFS is mounted

[root@www ~]# vi /etc/fstab 
# add at the lat line: change home directory this server mounts to the one on NFS
/dev/mapper/VolGroup-lv_root / ext4 defaults 1 1
UUID=2078630e-e84a-49e7-af68-55f0bde8d6c3   /boot   ext4   defaults1 2
tmpfs /dev/shm tmpfs defaults 0 0
dlp.server.world:/home nfs defaults 1 1
  

Источник: CentOS 6 — Configure NFS Client : Server World.

Comments are closed.