How to configure Network File System (NFS) on Linux

The Network File System protocol (NFS) is used when disks need to be shared between Linux servers. Basic configuration is fairly simple, and this chapter will explain all the essential steps.
You should follow some general rules when configuring NFS.
1. Only export directories beneath the / directory.
2. Do not export a subdirectory of a directory that has already been exported. The exception being when the subdirectory is on a different physical device. Likewise, do not export the parent of a subdirectory unless it is on a separate device.
3. Only export local filesystems.

Install package of NFS
1. Check package of NFS
[root@localhost ~]# rpm -qa|grep nfs

2. Example we create folder "software" in folder "mnt" and create file in folder "software"
- Create folder software
[root@localhost ~]# cd /mnt
[root@localhost mnt]# mkdir software
- Create files
[root@localhost mnt]# cd /software
[root@localhost software]# touch test1

3. Edit exports files
[root@localhost ~]# vi /etc/exports
It will show dialog
- /mnt/software: is directory of folder that we want to share.
- 192.168.100.111/255.255.255.0: is IP address of machine that we want to share.

4. Restart service NFS
[root@localhost ~]# service nfs restart

5. Export folder that shared to network
[root@localhost ~]# exportfs –a
- Show information shared
[root@localhost ~]# exportfs

6. Mount or Map drive: To get folder shared from server to store in client
[root@localhost ~]# mount -t nfs 192.168.100.100:/mnt/software /mnt/test
- 192.168.100.100 : is IP address of server that shared folder
- /mnt/software : is directory of folder shared from server
- /mnt/test : is directory of folder on client for store file shared from server

7. Open File Browser and browse to folder "mnt" we will see result
open folder test
Complete configuring NFS.

How to configure Dynamic Host Configuration Protocol Server (DHCP) on Linux

DHCP is a network protocol that among other things can dynamically distribute IP addresses and other network setting to computers. With DHCP, the process of connecting a new client to the network is as easy as plugging it in.
This section covers the basic interaction between a client and DHCP server to assign an IP address to a client on the network.
1. A DHCP transaction begins when a client sends out a DHCP DISCOVER packet. This is usually a broadcast packet. At minimum, the packet will contain only the client's hardware address.
2. The server receives the DHCP DISCOVER packet. If an IP address on the client subnet is available and the server is willing to grant a lease, it makes an offer by sending a DHCP OFFER packet to the client. The offer packet contains the:
- Proposed IP address for client
- Server's name
- Server's IP address
- Other configuration information
3.The client receives the DHCP OFFER packet. The client might receive more than one offer if you have more than one DHCP server on the network. HP strongly recommends that you have only one DHCP server on the network. If the client likes the offer, it sends a DHCPREQUEST packet to the server. This indicates a formal request to lease the IP address offered by the server.
4. The DHCP server receives the DHCPREQUEST packet and grants the client its request to lease the IP address. The server sends a DHCPACK to the client. This is the official notification that the address has been granted.
5. Before the lease time expires, the DHCP client requests to extend the lease by sending a DHCPREQUEST packet to the server. The server then updates and extends the lease time. It sends a DHCPACK to the client to notify it that the lease has been extended. These updates and lease extensions continue as long as the client is powered on. If the lease expires and the client is not powered on, and not able to request an extension on the lease, the IP address is recycled.
6. The DHCP server sends DHCPACK to extend the lease on the IP address.
Install the DHCP Package
Most RedHat and Fedora Linux software products are available in the RPM format. Downloading and installing RPMs aren't hard.

1. Check packet of DHCP
[root@localhost ~]# rpm –qa|grep dhcp

2. Browse software of DHCP in CD
[root@localhost ~]# cd /media/CentOS_5.3_Final/CentOS/
[root@localhost CentOS]# ls *dhcp*

3. Install package that selected in picture above
[root@localhost CentOS]# rpm -ihv dhcp-3.0.5-23.el5.i386.rpm

4. Check package that installed
[root@localhost ~]# rpm –qa|grep dhcp

5. Restart service of dchp
[root@localhost ~]# service dhcpd restart

6. By picture above it is not processed, so we copy file in path "/usr/share/doc/dhcp-3.0.5/dhcpd.conf.sample" to "/etc/dhcpd.conf"
[root@localhost ~]#cp /usr/share/doc/dhcp-3.0.5/dhcpd.conf.sample /etc/dhcpd.conf

7. Edit configuration file of dhcp
[root@localhost ~]# vi /etc/dhcpd.conf

It will show dialog

8. Restart service of dhcp again
[root@localhost ~]# service dhcpd restart

9. Test on client
Success for configure DHCP Server on Linux.

How to configure Virtual Network Computing Server (VNC)

Virtual Network Computing Server (VNC) is a desktop protocol to remotely control another computer. It transmits the keyboard presses and mouse clicks from one computer to another relaying the screen updates back in the other direction, over a network.
To assign IP Address we must practice bellow:
First we must open Terminal and type command bellow:
[root@linuxsvr ~]# system-config-network
Then it will show Network Configuration that we can create new network card:
Click New to create new Network card
Select Ethernet connection and click Forward
Select Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE] (eth0) and click
Forward
Click Statically set IP address: to assign IP address and Subnet mask and click Forward
Click Apply to get IP and Subnet mask:
Click Activate
Click Yes
Click OK
Before configure VNS Server we must check package of vnc by type command as bellow:
[root@linuxsvr ~]# rpm –qa|grep vnc
If service of vnc (vnc-4.1.2-14.el5.i386.rpm) have not we must install. To install please go to place of package that have in DVD-ROM and do as bellow:
[root@linuxsvr ~]# cd /media/CentOS_5.3_Final/CentOS/
[root@linuxsvr CentOS]# rpm -ihv vnc-4.1.2-14.el5.i386.rpm
When package of vnc processed already we must restart service vncserver
[root@linuxsvr ~]#service vncserver restart
Next service of vnc is started success we create section in server
[root@linuxsvr ~]#vncserver
On Client (Microsoft Windows) must have vncviewer to Remote Desktop from Server
Run vncviewer.exe file to run vnc client. When it will show Connection detail. We type IP and section of nvcserver that we are created.
Click OK
Type password of vncserver and click OK
We will saw client remote desktop from server.