X

Rate Us :



Share with Friends :

Menu

Network :


Hostname :

It is a logical name to identify the system in a network.


Fully Qualified Domain Name(FQDN) :

It identifies the Hostname within the DNS namespace hierarchy.

FQDN = Hostname + Domain Name

Example : mail.algovalley.com mail - Hostname algovalley.com - Domain Name

To assign the hostname temporary - [root@localhost~]#hostname nfsserver.algovalley.com To assign the hostname permanently - [root@localhost~]#vi /etc/hostname The hostname file will be opened, go to insert mode by pressing i/I/o/O/a/A (any one of them) then write : nfsserver.algovalley.com Then go to Ex: mode by pressing Esc then Shift + : and type wq to save and exit. Check the system IP address - [root@localhost~]#ifconfig Add system hostname with IP address - [root@localhost~]#vi /etc/hosts The hosts file will be opened, go to insert mode by pressing i/I/o/O/a/A (any one of them) then write : 127.0.0.1 localhost.localdomain localhost 192.168.0.210 nfsserver.algovalley.com nfsserver Then go to Ex: mode by pressing Esc then Shift + : and type wq to save and exit. [reboot the system to apply changes] To check the system name - [root@localhost~]#hostname -s To check the domain name - [root@localhost~]#hostname -d Ping with the system name - [root@localhost~]#ping nfsserver.algovalley.com [Ctrl + c to stop]


Network File System(NFS) :

A network file system is any computer file system that supports sharing of files over a computer network.

It is a centralized file storage system.

The client cannot differentiate whether the file is stored locally or remotely.

Generally, NFS configure in LAN network.

The NFS environment contains the following components :

X

LAN :

A local area network (LAN) is a computer network that interconnects computers within a limited area such as a residence, school, laboratory, or office building.

  • NFS server :-
  • A system that contains the file resources to be shared with other systems over the network.


  • NFS client :-
  • A system that mounts the file resources over the network and presents the file resources as if they were local.


Requirements :


Installation packages : nfs*.rpm , rpcbind*.rpm Port numbers : 2049 (nfs) , 111 (rpcbind) Configuration file : /etc/exports Services : nfs , rpcbind Daemons : nfsd , mountd , statd , lockd


To configure NFS server :


Server System : Check the system IP address - [root@localhost~]#ifconfig [Let say, IP address - 192.168.0.180] Install the packages for NFS server - [root@localhost~]#yum install nfs* rpcbind* -y Create a directory with full permission - [root@localhost~]#mkdir -m 777 /dir1 Edit the configuration file - [root@localhost~]#vi /etc/exports The exports file will be opened, go to insert mode by pressing i/I/o/O/a/A (any one of them) then write : /dir1 192.168.0.0/24(rw,sync) Then go to Ex: mode by pressing Esc then Shift + : and type wq to save and exit. Update the service - [root@localhost~]#service nfs restart Client System : Check the system IP address - [root@localhost~]#ifconfig [Let say, IP address - 192.168.0.192] Create a directory - [root@localhost~]#mkdir /dir2 Mount NFS dir1 - [root@localhost~]#mount 192.168.0.180:/dir1 /dir2 Enter into mount point and create a file - [root@localhost~]#cd /dir2 [root@localhost~/dir2]#touch file1 Go to server system and check the file - [root@localhost~]#ls /dir1 [file1 will be available in server system which was created in client system]