autofs/install-server.sh

raw link view readme
1
2 yum install firewalld -y
3 systemctl start firewalld
4 firewall-cmd --permanent --add-interface=eth0 --zone=public
5 firewall-cmd --permanent --add-service=nfs --zone=public
6 firewall-cmd --reload
7
8 yum install nfs-utils -y
9
10 systemctl start nfs-server
11 systemctl enable nfs-server
12
13 mkdir /var/nfs
14 chown nobody:nobody /var/nfs
15 chmod 755 /var/nfs
16
17 cat >> /etc/exports << EOF
18 /var/nfs $CLIENTNAME(rw,sync,no_root_squash)
19 EOF
20
21 echo data from alpha > /var/nfs/file01
22
23 exportfs -a
24