Archive for July, 2009

SBDavid

SNMP community user

SNMP community user

We know that any monitoring tool (like Nagios , Mrtg etc ) installation needs SNMP to be configured.

In case you find any queries related to “snmp community user”, you can follow the steps below:

Command to use SNMP community user:

net-snmp-config –create-snmpv3-user -ro -a MD5 -A PASSWORD USERNAME

Example:

If I want to create a SNMP community user “admin” with password “tree321″,
then the command will be:

net-snmp-config –create-snmpv3-user -ro -a MD5 -A admin tree321

Note:

Encrypted password of SNMP community user will be stored
in /var/net-snmp/snmpd.conf.

Config file for SNMP : /etc/snmp/snmp.conf

In case you can’t find the command “net-snmp-config”, don’t get panic:)

Just install net-snmp-devel using yum or up2date.

SBDavid

Turn on DMA mode on a hard drive

Turn on DMA mode on a hard drive

DMA

Direct memory access (DMA) allows certain hardware subsystems within the computer to access system memory for reading and/or writing independently of the central processing unit. It uses a procedure called cycle stealing, where the central processor memory access cycles are delayed for very short times to intersperse DMA controller memory access cycles. DMA is used for transferring data between the local memory and the main memory.

You can turn On DMA mode on a hard drive

You can check whether DMA is enabled on a hard drive for the IDE harddrive.

hdparm -iv /dev/hda

If DMA is on, the output should contain the following line,

using_dma = 1 (on)

If it is off you can enable it as follows,

hdparm -d /dev/hda

This will toggle the value of “using_dma” (It will turn off the value of “using_dma” if it was already on).

How to change the local timezone in Linux.

It is easy to change the timezone in Linux server. Replace your /etc/localtime file with the appropriate timezone data file from /usr/share/zoneinfo. For example, to set everything to Greenwich Mean Time (GMT), get a shell prompt and replace your /etc/localtime with /usr/share/zoneinfo/GMT by typing the following shell commands:

# date
# cd /etc
# ln -sf /usr/share/zoneinfo/GMT localtime
# date

The first ‘date’ command will show you the current date/time before you change the timezone. The final ‘date’ command shows you current date/time in the timezone that you chose, which in this example is GMT.

There are many timezone data files in the zoneinfo directory and you can use any of them that you wish. To see them all, do:

$ ls /usr/share/zoneinfo

So, symbolic linking /etc/localtime to any of those files, will change the time on server to that timezone.

SBDavid

Install Memcache

Install Memcache

You can use the following steps to install Memcache in the server.

Before installing Memcache module, first you need to check the ‘libevent’ which is an essential :dependency for memcache module. You can follow the following steps:

cd /usr/local/src
wget http://monkey.org/~provos/libevent-1.3e.tar.gz
tar -zxf libevent-1.3e.tar.gz
cd libevent-1.3e
./configure
make
make install

The output of “make install” is very important as it lets you know where the compiled module was installed. The default library location is
/usr/local/lib. Open the configuration file;

vi /etc/ld.so.conf.d/libevent.conf (add the entry ‘/usr/local/lib’ )
Check whether the libevent is completely installed.
ldconfig -v |grep libevent

Now you can install the “Memcache” module.

wget http://danga.com/memcached/dist/memcached-1.2.4.tar.gz
tar zxvf memcached-1.2.4.tar.gz
cd memcached-1.2.4
./configure
make
make install

Now you can check whether the Memcache module has properly installed.

which memcached
/usr/local/bin/memcached -d
memcached -d -m 256 -u nobody -p 11211 -l 192.x.x.x (Server IP)
ps -ax |grep memcached
netstat -plan |grep memcached

Uninstalling VMware Workstation on a Linux Host.

Usually problem occurs when VMware is removed manually from Linux server. The easiest way to get it removed is by using the script or Redhat packet manager.

If you used the RPM installer to install VMware Workstation, remove the software from your system by running

If you cant find the package try

rpm -qa | grep VMware*

It will list the installed VMware package. Then perform

rpm -e package_name

If you used the source to install VMware Workstation, remove the software from your system by running

vmware-uninstall.pl

« Prev - Next »