Thursday, 3 July 2014

Configuring NFS on Linux

Installing NFS Server and NFS Client

We need to install NFS packages (nfs-utils and nfs-utils-lib ) which contains all required NFS services  on our NFS Server as well as on NFS Client machine. We can install it via “yum” (Red Hat Linux) and “apt-get” (Debian and Ubuntu) package installers.

[root@nfsserver ~]# yum install nfs-utils nfs-utils-lib

[root@nfsserver ~]# yum install portmap (not required with NFSv4)

Start the services on both machines and enable auto start at boot time.

[root@nfsserver ~]# /etc/init.d/portmap start

[root@nfsserver ~]# /etc/init.d/nfs start

[root@nfsserver ~]# chkconfig --level 35 portmap on

[root@nfsserver ~]# chkconfig --level 35 nfs on

Thursday, 26 June 2014

Network File System (NFS) Services

NFS Services

All NFS versions rely on Remote Procedure Calls (RPC) between clients and servers. RPC services under Red Hat Enterprise Linux 6 are controlled by the rpcbind service. To share or mount NFS file systems, the following services work together.


(portmap in older versions of Linux) The primary daemon upon which all the others rely, rpcbind manages connections for applications that use the RPC specification. By default, rpcbind listens to TCP port 111 on which an initial connection is made. This is then used to negotiate a range of TCP ports, usually above port 1024, to be used for subsequent data transfers. You need to run rpcbind on both the NFS server and client. This is not used with NFSv4.

Tuesday, 24 June 2014

NFS Server - Configuration Files

Configuration Files of NFS Server in Linux

Main configuration files to set up an NFS server is /etc/exports.

Other two file required to restrict IP address are /etc/hosts.allow, and /etc/hosts.deny.


This file contains a list of directory that is shared and its options.

An entry in /etc/exports is like


Here /nfsdir is directory that you want to share. If you share a directory, then all directories under it within the same file system will be shared as well.

Monday, 23 June 2014

NFS Server in Linux - Concepts

NFS (Network File System)

NFS stands for Network File System, a file system developed by Sun Microsystems, Inc. A Network File System (NFS) allows remote hosts to mount file systems over a network and interact with those file systems as though they are mounted locally. For example, if you were using a computer linked to a second computer via NFS, you could access files on the second computer as if they resided in a directory on the first computer.

NFS is used for sharing of files and folders between Linux/UNIX like systems. It allows user to mount their local file systems over a network and remote hosts to interact with them as they are mounted locally on the same system. With the help of NFS, we can set up file sharing between UNIX and Linux systems.

Sunday, 15 June 2014

Login Process in Linux

When Linux booting process is completed it display the login prompt. There are different process running in Linux when any user login to their shell. these processes are as follows.

Login process steps

Init starts getty process

getty process initiates login prompt on terminal

login command check user credentials from /etc/passwd

getty starts user shell process

shell reads the system wide files /etc/profile, /etc/bashrc

Shell reads user specific files .profile, .login

Now it reads shell specific configuration file .bashrc

Shell displays the default prompt