NFS

From AlphaBook
Revision as of 13:54, 14 March 2019 by Admin (talk | contribs) (Created page with "== Install == * yum info nfs-utils * yum install nfs-utils -y == Configurate Service == * systemctl start rpcbind nfs-server * systemctl enable rpcbind nfs-server == exports...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Install

  • yum info nfs-utils
  • yum install nfs-utils -y

Configurate Service

  • systemctl start rpcbind nfs-server
  • systemctl enable rpcbind nfs-server

exports

  • vi /etc/exports
  • /backup 192.168.1.0/24(rw,sync)
  • exportfs -rv
  • showmount -e localhost

Firwall

  • firewall-cmd --permanent --add-service=nfs
  • firewall-cmd --permanent --add-service={nfs3,mountd,rpc-bind}
  • firewall-cmd --reload

Mount NFS on another system (manually)

  • mount -t nfs 192.168.1.100:/backup /nfs/backup -o rw
  • umount /nfs/backup

Mount NFS on another system (auto - fstab)

  • vi /etc/fatab
  • 192.168.1.100:/backup /nfs/backup nfs defaults 0 0
  • man fstab
  • man nfs

Mount NFS on another system (auto - autofs)