# Cài đặt NFS trên client
[root@client01 ~]# yum -y install nfs-utils
[root@client01 ~]# nano /etc/idmapd.conf
# bỏ dấu # tại dòng domain và điền domain tương ứng
Domain = eit.local
[root@client01 ~]# systemctl restart rpcbind
[root@client01 ~]# systemctl start nfs-lock
[root@client01 ~]# systemctl start nfs-idmap
[root@client01 ~]# systemctl start nfs-mountd
[root@client01 ~]# systemctl enable rpcbind
[root@client01 ~]# systemctl enable nfs-lock
[root@client01 ~]# systemctl enable nfs-idmap
[root@client01 ~]# systemctl enable nfs-mountd
# Mount thư mục home trên máy NFS Server tới máy Client
[root@client01 ~]# mount -t nfs server1.vnlab.com.vn:/home /home
[root@client01 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 19G 1.2G 17G 7% /
devtmpfs 489M 0 489M 0% /dev
tmpfs 494M 0 494M 0% /dev/shm
tmpfs 494M 6.7M 487M 2% /run
tmpfs 494M 0 494M 0% /sys/fs/cgroup
/dev/sda1 477M 65M 383M 15% /boot
ln-svr1.eit.local:/home 19G 1.2G 17G 7% /home
[root@client01 ~]# nano /etc/fstab
GNU nano 2.3.1 File: /etc/fstab
#
# /etc/fstab
# Created by anaconda on Tue Aug 5 04:56:38 2014
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
UUID=3613e7c7-d3e1-48a1-aafb-75f1b6a6cc2f / ext4 defaults 1 1
UUID=3650041a-75e0-43dc-aa80-6456474cb391 /boot ext4 defaults 1 2
UUID=239727ef-4693-4734-af76-cebe25140326 swap swap defaults 0 0
server1.vnlab.com.vn:/home /home nfs defaults 0 0
0 Comments