nfs export on centos7

So I wanted to export my /backup to some machines so I don’t have to scp stuff to it.

On the server:

yum install nfs-utils nfs-utils-lib
systemctl enable nfs-server.service
systemctl enable nfs-lock.service
systemctl enable nfs-rquotad.service
systemctl enable nfs-idmap.service
systemctl enable nfs-mountd.service
systemctl enable rpcbind.service
echo '/backup 192.168.1.1(rw,sync,no_root_squash) 192.168.1.3(rw,sync,no_root_squash)' >/etc/exports
systemctl start rpcbind.service
systemctl start nfs-server.service
systemctl start nfs-lock.service
systemctl start nfs-idmap.service

On the client:

yum install nfs-utils nfs-utils-lib
# mount -t nfs 192.168.1.4:/backup/ /backup/
echo '192.168.1.4:/backup/ /backup/ nfs rw,sync 0 0' >>/etc/fstab
mount /backup

Leave a Reply

Your email address will not be published. Required fields are marked *