Archive for June, 2009

How to install Mytop in Plesk servers

Mytop is a Perl program which allows to monitor MySQL servers by viewing active threads, queries and overall server performance numbers.

mytop is a `top’ clone for MySQL

mytop is a console-based (non-gui) tool for monitoring the threads and overall performance of MySQL 3.22.x, 3.23.x, and 4.x servers. It runs on most Unix systems which have Perl, DBI, and Term::ReadKey installed. And with Term::ANSIColor installed you even get color. As of version 0.7, it even runs on Windows (somewhat).

INSTALLATION

tar -zxvf mytop-.tar.gz
cd mytop-
perl Makefile.PL
make
make test
make install

Now installation is over. If you run mytop command, it won’t work in Plesk servers. You need to make some configurations in “~/.mytop” file. Create a file called ~/.mytop and add the below entries in “~/.mytop” file.

$ touch ~/.mytop
$ vi ~/.mytop

user=admin
pass=your mysql password
host=localhost
db=psa
delay=5
port=3306
socket=
batchmode=0
header=1
color=1
idle=1

Run the mytop command

$ mytop -u admin -p(Your Mysql password)

Now you can see the overall performance of your MySQL server.

How to enable IPTABLES support in Linux Kernel

You need to recompile kernel to enable IPTABLES support.

Get into the kernel source directory:

# cd /usr/local/src/kernel [download kernel source from kernel.org]
# Copy your current running kernel config.
# make menuconfig

Networking >> Networking options >> Network packet filtering (replaces ipchains) >> IP: Net Filter configurationS >> IP Tables support

# make
# make modules
# make modules_install
# make install

Move to /boot/grub and then modify your current grub config to load the new kernel.

SBDavid

Reinstall Grub Boot Loader

Reinstall Grub Boot Loader

GRUB is a boot loader package from the GNU Project. GRUB is the reference implementation of the Multiboot Specification, which allows a user to have several different operating systems on their computer at once, and to choose which one to run when the computer starts.

You can re-install grub by linux rescue method:

1) Put the 1st bootable linux cd on cdrom.
2) Reboot the system.
3) At boot prompt type “linux rescue” without quotes.
4) You will get a shell prompt.
5) Give command chroot /mnt/sysimage
6) Run: grub-install /dev/hda (primary master)

grub-install /dev/hda

7) Reboot the system

SBDavid

How to mount a linux LVM volume

How to mount a linux LVM volume

You can check the disk that is using the LVM volume by using the command fdisk -l

# fdisk -l

You can run the command “pvs” to get the volume group.

# pvs

You can run lvdisplay /dev/”volume group”
This will display the list of logical volumes in the volume group

#lvdisplay /dev/VolGroup00

The volume group here is VolGroup00

# Mount the partition

mount /dev/VolGroup00/LogVol00 /home

The Logical volume here is LogVol00

SBDavid

Network Address Translation

Network Address Translation

PREROUTING

Address translation occurs before routing.

Facilitates the transformation of the destination IP address to be compatible with the firewall’s routing table.
Used with NAT of the destination IP address, also known as destination NAT or DNAT.

POSTROUTING

Address translation occurs after routing.

This implies that there was no need to modify the destination IP address of the packet as in pre-routing. Used with NAT of the source IP address using either one-to-one or many-to-oneNAT. This is known as source NAT, or SNAT.

« Prev - Next »