autofs/install-server.sh

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