User Tools

Site Tools


nfs

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
nfs [2015/12/21 12:28] – created luke7858nfs [2024/05/23 07:26] (current) – external edit 127.0.0.1
Line 12: Line 12:
 | nfs-lock / rpc-statd | NFS file locking. Implemented file lock recovery when an NFS server crashes and reboots | | nfs-lock / rpc-statd | NFS file locking. Implemented file lock recovery when an NFS server crashes and reboots |
 | nfs-idmap | Translates user and group ids into names, and vice-versa | | nfs-idmap | Translates user and group ids into names, and vice-versa |
 +
 +=== Installing (CentOS 7) ===
 +<sxh bash>
 +systemctl enable rpcbind
 +systemctl enable nfs-server
 +</sxh>
 +
 +<sxh bash>
 +systemctl start rpcbind
 +systemctl start nfs-server
 +systemctl start rpc-statd
 +systemctl start nfs-idmapd
 +</sxh>
 +=== Creating NFS Share ===
 +<sxh bash>
 +mkdir -p /nfs/export1
 +</sxh>
 +Now we need to edit /etc/exports to allow for other devices to mount. You will need to replace x.x.x.x with the ip address of the server you wish to allow to connect
 +<sxh bash>
 +vim /etc/exports
 +</sxh>
 +<sxh bash>
 +/nfs/export1 x.x.x.x(rw,sync,no_root_squash)
 +</sxh>
 +\\
 +no_root_squash : By default, any file request made by user root on the client machine is treated as by user nobody on the server. (Exactly which UID the request is mapped to depends on the UID of user “nobody” on the server, not the client.) If no_root_squash is selected, then root on the client machine will have the same level of access to the files on the system as root on the server.
 +\\
 +
 +\\
 +Once you have edited the /etc/exports file you will need to push these changes through:
 +<sxh bash>
 +exportfs -r
 +</sxh>
 +=== Firewall configuration ===
 +<sxh bash>
 +firewall-cmd --permanent --zone public --add-service mountd
 +firewall-cmd --permanent --zone public --add-service rpc-bind
 +firewall-cmd --permanent --zone public --add-service nfs
 +firewall-cmd --reload
 +</sxh>
nfs.1450700924.txt.gz · Last modified: 2024/05/23 07:26 (external edit)

Except where otherwise noted, content on this wiki is licensed under the following license: Public Domain
Public Domain Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki