Skip to main content

Posts

Showing posts from September, 2013

How to install DHCP server in Centos and Redhat

The  dhcp ( Dynamic Host Configuration Protocol)   package contains an Internet Systems Consortium (ISC) DHCP server.  DHCP is used to assign IP addresses and other stuff like gateway and DNS details automatically to the clients. we need a DHCP server configured for offering ipaddress to the clients when it is required.  First, install the package as the superuser: # yum install dhcp Installing the dhcp package creates a file, /etc/dhcp/dhcpd.conf, which is merely an empty configuration file: cat /etc/dhcp/dhcpd.conf # # DHCP Server Configuration file. #   see /usr/share/doc/dhcp*/dhcpd.conf.sample The sample configuration file can be found at /usr/share/doc/dhcp-<version>/dhcpd.conf.sample . You should use this file to help you configure /etc/dhcp/dhcpd.conf , which is explained in detail below. DHCP also uses the file  /var/lib/dhcpd/dhcpd.leases  to store the client lease database. After installing dhcp server ...

Network Monitoring tools in Linux

Network monitoring tools are used to monitor the network, systems present on the network, various service running on the network, traffic etc. Ping: Ping command is used to check if the system is in the network or not. To check if the host is operating. e.g. ping ip_address [root@server1 ~]# ping 172.26.128.132 PING 172.26.128.132 (172.26.128.132) 56(84) bytes of data. 64 bytes from 172.26.128.132: icmp_seq=0 ttl=58 time=3.27 ms 64 bytes from 172.26.128.132: icmp_seq=1 ttl=58 time=3.12 ms 64 bytes from 172.26.128.132: icmp_seq=2 ttl=58 time=1.92 ms 64 bytes from 172.26.128.132: icmp_seq=3 ttl=58 time=3.10 ms 64 bytes from 172.26.128.132: icmp_seq=4 ttl=58 time=2.14 ms --- 172.26.128.132 ping statistics --- 5 packets transmitted, 5 received, 0% packet loss, time 4006ms rtt min/avg/max/mdev = 1.922/2.715/3.279/0.564 ms, pipe 2 [root@server1 ~]# When the command is executed, it returns a detailed summary of the host. Packets sent, received, lost by...

How to keep a script running even after logging out of the system

There are times when we need to do some job or run some script which takes a lot of time. During this the connection can get aborted which results in the job getting killed. There is simple solution for this, Use NOHUP. The command syntax is easy:- nohup <command>  & here  <command> is the command or script you're running. An & is need to put the command in the background as nohup doesn't do this itself. For example, when you log-in to the remote server using ssh. # ssh user@remoteserver now you want to run a backup script rsync_script.sh  which takes a long time, then you can run, # nohup rsync_script.sh & you can now logout from the terminal & the script will continue to run until its completed.