filmov
tv
How to Setup NFS Server On Red Hat Enterprise Linux 8 / CentOS 8
![preview_player](https://i.ytimg.com/vi/W1R4p6326uQ/maxresdefault.jpg)
Показать описание
NFS stands for Network File System, helps you to share files and folders between Linux / Unix systems, developed by SUN Microsystems in 1984. NFS enables you to mount a remote share locally.
NFS version 4.2 (RFC 7862) was published in November 2016 with new features including: server-side clone and copy, application I/O advise, sparse files, space reservation, application data block (ADB), labeled NFS with sec_label that accommodates any MAC security system, and two new operations for pNFS (LAYOUTERROR and LAYOUTSTATS).
One big advantage of NFSv4 over its predecessors is that only one UDP or TCP port, 2049, is used to run the service, which simplifies using the protocol across firewalls.
Setting Up NFS Server On RHEL 8 / CentOS 8
# dnf install nfs-utils or yum install nfs-utils
# mkdir -p /mnt/nfs_shares
# chown -R nobody: /mnt/nfs_shares/
# chmod -R 777 /mnt/shares
# vim /etc/exports
/mnt/nfs_shares 10.10.10.2(rw,sync,no_all_squash,root_squash)
# exportfs -arv
# exportfs -s
Firewall Configurations
# firewall-cmd --permanent --add-service=nfs
# firewall-cmd --permanent --add-service=rpc-bind
# firewall-cmd --permanent --add-service=mountd
# firewall-cmd --reload
Setting Up NFS Client on Client Systems
# dnf install nfs-utils nfs4-acl-tools
# showmount -e 10.10.10.1
# mkdir -p /nfs_client
# mount -t nfs 10.10.10.1:/mnt/nfs_shares /nfs_client
# mount | grep nfs
Final TEST
# ls -l /nfs_client/ [On NFS Client]
# umount /mnt/nfs_shares
# exit
NFS version 4.2 (RFC 7862) was published in November 2016 with new features including: server-side clone and copy, application I/O advise, sparse files, space reservation, application data block (ADB), labeled NFS with sec_label that accommodates any MAC security system, and two new operations for pNFS (LAYOUTERROR and LAYOUTSTATS).
One big advantage of NFSv4 over its predecessors is that only one UDP or TCP port, 2049, is used to run the service, which simplifies using the protocol across firewalls.
Setting Up NFS Server On RHEL 8 / CentOS 8
# dnf install nfs-utils or yum install nfs-utils
# mkdir -p /mnt/nfs_shares
# chown -R nobody: /mnt/nfs_shares/
# chmod -R 777 /mnt/shares
# vim /etc/exports
/mnt/nfs_shares 10.10.10.2(rw,sync,no_all_squash,root_squash)
# exportfs -arv
# exportfs -s
Firewall Configurations
# firewall-cmd --permanent --add-service=nfs
# firewall-cmd --permanent --add-service=rpc-bind
# firewall-cmd --permanent --add-service=mountd
# firewall-cmd --reload
Setting Up NFS Client on Client Systems
# dnf install nfs-utils nfs4-acl-tools
# showmount -e 10.10.10.1
# mkdir -p /nfs_client
# mount -t nfs 10.10.10.1:/mnt/nfs_shares /nfs_client
# mount | grep nfs
Final TEST
# ls -l /nfs_client/ [On NFS Client]
# umount /mnt/nfs_shares
# exit
Комментарии