nfs/setup-client.sh

raw link view readme
1 SERVERNAME=$1
2
3 yum install nfs-utils -y
4
5 mkdir /mnt/server01
6 cat >> /etc/fstab << EOF
7 $SERVERNAME:/var/nfs /mnt/server01 nfs rw,sync,hard,noatime 0 0
8 EOF
9
10 cat > /root/connect_and_modify.sh << EOF
11 mount -a
12 touch /mnt/server01/taco
13 echo another test file > /mnt/server01/file02.txt
14 cat /mnt/server01/file01
15 EOF
16 chmod +x /root/connect_and_modify.sh
17