Setting up NTP server

Setting up NTP is very important for a host of application especially clusters and applications like DBs requiring all the servers to be critically time-wise synced. Install NTP on Red Hat and CentOS 6 $ yum install ntp $ chkconfig ntpd on $ ntpdate pool.ntp.org $ service ntpd start Install NTP on Ubuntu $ apt-get…

Setup default gateway with route command Linux

Display default route The following three commands display the current routing table: # route Output: Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.1.0 * 255.255.255.0 U 0 0 0 ra0 default dsl-router 0.0.0.0 UG 0 0 0 ra0 # /sbin/route Output: Kernel IP routing table Destination Gateway Genmask Flags Metric…

Installing iostat in CentOS with yum

Iostat is a very powerful tool for monitoring the throughput of your storage subsystems. Especially to locate bottle necks and pinpoint possible upgrade scenarios. Not immediately visible here is how to install it on Centos 5.x and 6.x. We shall use the whatprovides tool in yum to locate the packages that provide iostat  

Installing vim editor.

To install vim [root@testarossa-00-0c-29-47-8f-35 ~]# yum whatprovides vim-enhanced Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirror.crazynetwork.it * epel: fr2.rpmfind.net * extras: mirror.crazynetwork.it * updates: mirror.crazynetwork.it 2:vim-enhanced-7.0.109-7.el5.i386 : A version of the VIM editor which includes : recent enhancements. Repo : base Matched from: [root@testarossa-00-0c-29-47-8f-35 ~]# yum install vim-enhanced-7.0.109-7.el5.i386 Loaded plugins: fastestmirror…

VIM cheat sheet

< The list of Vim commands > Working with files Vim command Action :e filename Open a new file. You can use the Tab key for automatic file name completion, just like at the shell command prompt. :w filename Save changes to a file. If you don’t specify a file name, Vim saves as the file name…

List interfaces and IPs neatly

The following command gives a neat list of the Devices and their IPs / details without all the gruesome details. ifconfig | egrep  "Link|inet" A sample result would be: [root@testarossa-00-0c-29-47-8f-35 vm]# ifconfig | egrep "Link|inet" eth0 Link encap:Ethernet HWaddr 00:0C:29:47:8F:2B inet addr:192.168.47.135 Bcast:192.168.47.255 Mask:255.255.255.0 eth1 Link encap:Ethernet HWaddr 00:0C:29:47:8F:35 inet addr:192.168.1.71 Bcast:192.168.1.255 Mask:255.255.255.0 lo Link…

Dsabling SElinux In Centos

Sometimes and with some DB platforms especially when you are testing and want to reduce the number of variables during development, testing etc.. you don not want SELinux watching your back. While it is a must to enable SELinux in hardened production systems it can be quite a pain to handle. Sometimes it needs disabling…

Slash notation lookup table

Total-addresses: how many unique addresses can be represented. To determine how many are available to be assigned to devices you need to subtract 2 from the provided number to allow for the ‘network’ and ‘broadcast’ address. A further one of these may need to be assigned to a router. Net bits Subnet mask Total-addresses /20 255.255.240.0 4096 /21…

Introduction to APT (advanced package Tools)

Advanced Packaging Tool Ubuntu — and all Debian-based distros — includes the Advanced Packaging Tool (APT), which can be used to easily download and install software for the operating system. This article looks at APT, and how it is used. Topics : Table of Contents Installing Software on a Computer Installing Software on Windows Installing Software on…