Search Engine

Loading

Sallar

Sallar
RedhatEnterpriseLinux Blog

Installing and configring nfs-server step by step part 4


Connecting Clients Via NFS
Setting up a client to use NFS is relatively simple when you have the NFS server in place. Let’s set up the Client01 system to use a share on the RHEL01 NFS server.

Installing and configring nfs-server step by step part 3


NFSD Firewall and SELinux Configuration
NFS is one of the many Red Hat services that can take advantage of TCP Wrappers as well as firewall rules for security. We don’t use TCP Wrappers here, but should you run into trouble on the exam with the NFS service not working, don’t forget to check to see whether anything is being filtered by TCP Wrappers. Because you are using NFS version 4 here, you need to create only a single firewall rule.

Installing and configring nfs-server step by step part 2


Now export the file to network
If you already started the services before creating an /etc/exports file, you can also use the exportfs command to manually export any new resources added to the /etc/exports file.
Syntax: exportfs [options]
Options:

Installing and Configring NFS Server step by step Part 1


Installing and Configring NFS Server step by step
Follow these steps to install an NFS server.
Step 1. To begin the NFS server setup, install the required packages:
# yum install -y nfs-utils nfs4-acl-tools
Step 2. Verify the package installation:
# rpm -qa | grep nfs
nfs4-acl-tools-0.3.3-5.el6.x86_64
nfs-utils-1.2.2-7.el6.x86_64
nfs-utils-lib-1.1.5-1.el6.x86_64

Samba Server Configuration


Samba File Sharing
Samba is the file-sharing protocol used by the Microsoft Windows operating system. Because some network environments include more than one operating system, Red Hat Enterprise Linux provides a way to use alternative file-sharing methods. If only sharing between Linux and other UNIX variants, it is recommended that NFS be used instead. For additional information on Samba, refer to the /usr/share/doc/samba-<version>/ directory.

Connecting & Mounting to the NFS Share Folders


Connecting to the NFS Share Folders
There are three ways to mount an NFS export on a client system, assuming the server has given the client permission to do so:
1.     Use the mount command along with the server name, exported directory, and local mount point.
2.     Add the export to /etc/fstab so it is automatically mounted at boot time or is Available to be mounted.
3.     Use the autofs service to mount the share when a user attempts to access it from a client.

Redhat Enterprise linux 5 NFS-Part3


Redhat Enterprise linux 5 NFS-Part2


Redhat Enterprise linux 5 NFS-Part1


Configuring the NFS Server on the Command Line



To configure a Red Hat Enterprise Linux system as an NFS server via the command line, make sure the nfs-utils RPM package is installed.
The server configuration file, /etc/exports, uses the following format:
shared_directory allowed_hosts(options)
where shared_directory is the name of the directory to be shared, allowed_hosts is the IP address range of the allowed clients, and options is a list of NFS options for the exported directory. Obviously, the exported directory must exist. You must be root to modify this file.

NFS and SELinux Configuration


NFS and SELinux
In Red Hat Enterprise Linux 5 & 6, NFS is protected by the default Security-Enhanced Linux (SELinux) policy, known as the targeted policy. By default, this targeted policy allows NFS connections to the server by setting the nfs_export_all_ro and nfs_export_all_rw SELinux booleans to 1.
If you are sharing home directories over NFS while using SELinux, you must set
use_nfs_home_dirs boolean to 1 on each client connecting to the NFS server sharing the home directories. Execute the following command as root:

What is NFS server


Network File Sharing
In an enterprise computing environment, it is common to share files between computers or allow several users to access the same set of files on a central server and have all changes be visible to all users immediately. In a pure UNIX environment, including those consisting solely of Red Hat Enterprise Linux systems, this can be achieved via Network File System (NFS). If sharing files between Red Hat Enterprise Linux and Microsoft Windows systems is desired, Samba can be used to achieve connectivity.

Powered by Blogger.

Ads

 
Copyright © Redhat Enterprise linux. Original Concept and Design by My Blogger Themes
My name is Abdul Razaq but people call me Raziq. Here is my home page: www.redhatenterpriselinux.blogspot.com I live in Quetta, Pakistan and work as an IT-Engineer.