NFS_(Network File System) Share:-
----------------------------------
- NFS enables system administrator to share all or a portion of a file system on a network server to make accessible to remote computer users.
- NFS stand Network File System.
- NFS protocol defines an network file system, originally developed for local sharing among UNIX system and released by Sun Microsystems in 1984.
- NFS is an Application Layer protocol.
- NFS latest version is v4 with ACL.
- For NFS Server you must need to install the package of NFS. The package name is nfs-utils which provided a daemon for kernel NFS Server and related tools such as contains the showmount program.
NFS Configuration in RHEL_8 Machine:-
-------------------------------------
The configuration file of NFS server are:
- /etc/nfs.conf:- Main configuration file for the nfs daemon and tools.
- /etc/nfsmount.conf:- NFS mount configuration file.
Step-1) Check nfs-utils package is installed or not
----------------------------------------------------
[root@localhost ~]# rpm -qa |grep nfs
nfs-utils-2.3.3-35.el8.x86_64
libnfsidmap-2.3.3-35.el8.x86_64
sssd-nfs-idmap-2.3.0-9.el8.x86_64
Step-2) Install nfs all package with dependencies package
---------------------------------------------------------
Troubleshoot:- If you face this error "error: db5 error(-30969) from dbenv->open: BDB0091 DB_VERSION_MISMATCH: Database environment version mismatch RPM: error: cannot open Packages index using db5 - (-30969)" Then use this command.
[root@localhost ~]# rpm -vv --rebuilddb
Step-3) Once the installation is completed "start nfs-server" service, "enable" it to automatically start at system boot and they verify via "status" command. You can use "systemctl" command for it.
--------------------------------------------------------------------
[root@localhost ~]# systemctl status nfs-server.service
● nfs-server.service - NFS server and services
Loaded: loaded (/usr/lib/systemd/system/nfs-server.service; disabled; vendor preset: disabled)
Active: inactive (dead)
root@localhost ~]# systemctl start nfs-server.service
[root@localhost ~]# systemctl enable nfs-server.service
Created symlink /etc/systemd/system/multi-user.target.wants/nfs-server.service → /usr/lib/systemd/system/nfs-server.service.
[root@localhost ~]# systemctl restart nfs-server.service
[root@localhost ~]# systemctl status nfs-server.service
● nfs-server.service - NFS server and services
Loaded: loaded (/usr/lib/systemd/system/nfs-server.service; enabled; vendor preset: disabled)
Active: active (exited) since Fri 2024-03-15 15:32:41 IST; 42s ago
Process: 109624 ExecStopPost=/usr/sbin/exportfs -f (code=exited, status=0/SUCCESS)
Step-4) Other service that are required for running NFS server or mounting NFS shares such as "nfsd,nfs-idmapd,rpcbind,rpc.mounted,locked,rpc.statd,rpc.rquotad and rpc.idmapd will be automatically started."
----------------------------------------------------------
[root@localhost ~]# systemctl status rpcbind.service
● rpcbind.service - RPC Bind
Loaded: loaded (/usr/lib/systemd/system/rpcbind.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2024-03-15 16:02:05 IST; 8min ago
Docs: man:rpcbind(8)
Main PID: 866 (rpcbind)
[root@localhost ~]# systemctl start rpcbind.service
Step-5) Firewall Management:-
-----------------------------
[root@localhost ~]# systemctl status firewalld.service
● firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2024-03-15 16:02:16 IST; 12min ago
Docs: man:firewalld(1)
[root@localhost ~]# systemctl stop firewalld.service
Step-6) Creat a Directory with full permission:-
------------------------------------------------
[root@localhost ~]# mkdir /abhishek
[root@localhost ~]# chmod 777 /abhishek
Step-7) Configuration in export files:-
---------------------------------------
[root@localhost ~]# vim /etc/exports
Type this text
/abhishek 192.168.1.0/24(rw,sync)
Now save & exit via :wq! command
[root@localhost ~]# exportfs -avr
No comments:
Post a Comment