Basic NFS Configuration

In this config will guide you trough a quick and basic configuration of NFS server on RHEL7 Linux system. We do not take any security concerns into the consideration, nor we will be concerned with fine tuning and access control. In our scenario we define two hosts:
  • NFS Server, IP 10.1.1.100
  • NFS Client, IP 10.1.1.18
Assuming your already have a running Redhat 7 Linux system in order to setup NFS server you will need to install few additional packages:

NFS Server configuration

Run the below commands to begin the NFS Server installation:
[nfs-server ]# yum install nfs-utils rpcbind

To sync a correct time on your Redhat server with a NTP publicly available time servers first you need to install ntpdate package:
[root@rhel7 ~]# yum install ntpdate
To check your current time use date command:
[root@rhel7 ~]# date
Thu Sep  4 17:20:42 WST 2014
Next, we can use pool.ntp.org timeserver to synchronize our time. This is be done with ntpdate command:
[root@rhel7 ~]# ntpdate pool.ntp.org
11 Dec 06:08:13 ntpdate[2225]: step time server 173.230.144.109 offset 8426822.014383 sec

Changing a timezone on Redhat 7 Linux server is a easy task which can be done on a command line with a few commands. First find your timezone using timedatectl command. The following linux command will list all timezones:
[root@rhel7 ~]# timedatectl list-timezones
To narrow down the search you can use grep to search for a specific city. For example:
[root@rhel7 ~]# timedatectl list-timezones | grep -i bratislava
Europe/Bratislava

In order to install of PIP the Python packaging tool on RHEL 7 Linux we first need to install its only pre-requisite and that is setuptools package otherwise we will get a following error message:
Downloading/unpacking pip
  Cannot fetch index base URL https://pypi.python.org/simple/
  Could not find any downloads that satisfy the requirement pip
Cleaning up...
No distributions at all found for pip
Storing debug log for failure in /root/.pip/pip.log
From this reason we first install setuptools:
[root@rhel7 ~]# wget https://pypi.python.org/packages/source/s/setuptools/setuptools-7.0.tar.gz --no-check-certificate
[root@rhel7 ~]# tar xzf setuptools-7.0.tar.gz
[root@rhel7 ~]# cd setuptools-7.0
[root@rhel7 ~]# python setup.py install
...
Installed /usr/lib/python2.7/site-packages/setuptools-7.0-py2.7.egg
Processing dependencies for setuptools==7.0
Finished processing dependencies for setuptools==7.0

The following config will help you to configure a virtual network interface to allow you to have multiple additional network IP address on a single hardware network interface. For example our RHEL server has currently a single hardware network interface called eth0. This interface is used as a master network interface with an IP address of 10.1.1.110. To this network interface we will attach two additional virtual network interfaces eth0:0 - 10.1.1.111 and eth0:1 - 10.1.1.112. Let's get started by showing a current network configuration:
[root@rhel7 ~]# ip addr show
Show network configuration on RHEL7 linux
From the above output we can see that currently we have configured eth0 network interface only. Next, we are going to locate a corresponding network interface configuration file for eth0:
# grep -l DEVICE.*eth0 /etc/sysconfig/network-scripts/*

ARE YOU LOOKING FOR A LINUX JOB?
Submit your RESUME, create a JOB ALERT or subscribe to RSS feed on LinuxCareers.com.
LINUX CAREER NEWSLETTER
Subscribe to NEWSLETTER and receive latest news, jobs, career advice and tutorials.
DO YOU NEED ADDITIONAL HELP?
Get extra help by visiting our LINUX FORUM or simply use comments below.