Sunday, August 9, 2020

Setup NFS

For Server: https://codingbee.net/rhce/nfs-set-up-an-nfs-server-on-centos-rhel-7


Server

yum install nfs-utils
setsebool -P nfs_export_all_rw 1
setsebool -P nfs_export_all_ro 1

[root@unica12node1 unica]# vi /etc/exports

[root@unica12node1 unica]# ls -l
total 581508
-rwxr-xr-x 1 root root       283 Jul 29 11:29 cleanunica-Node.sh
-rw-r--r-- 1 root root       387 Jul 29 11:29 db2rtcl_nr.rsp
drwxr-xr-x 5 root root       185 Aug 10 18:06 jre
-rwxr-xr-x 1 root root       115 Aug  5 19:16 test.sh
-rw-r--r-- 1 root root 595448188 Jul 29 11:25 v10.5fp7_linuxx64_client.tar.gz

[root@unica12node1 unica]# systemctl enable nfs-server
Created symlink from /etc/systemd/system/multi-user.target.wants/nfs-server.service to /usr/lib/systemd/system/nfs-server.service.

[root@unica12node1 unica]#  systemctl restart nfs-server

[root@unica12node1 unica]# exportfs -avr
exporting *:/docker




Client


Add in /etc/fstab
192.168.1.152:/docker   /docker nfs     soft,timeo=100,_netdev,rw       0       0


mount -a


No comments:

Post a Comment