CentosInstallMytop

How to install mytop on Centos

The mytop utility is a very interesting top-like program for Mysql. It is programmed in Perl and provides

Yes, mysql, I know. Yuck.

But, hey, if users whine long enough and loud enough, I have to install it, and deal with the consequences the best I can. Such is the bane of system administrators everywhere.

So, without further ado:

1. Install mytop dependencies

mytop requires the following Perl packages:

These packages provide you - in my opinion - the best experience for mytop.

As root, run the CPAN function of Perl to install all these automatically:

# perl -MCPAN -eshell
cpan[1]> install DBI Term::ReadKey Term::AnsiColor Term::HiRes

After quite a little while (CPAN may ask you to update it -- happens all the time, but it takes a wgile), you should have all the libraries needed to run mytop.

2. Modify the mytop source code and install the software

Here is where it starts to get complicated: the latest version of mytop is 1.6, and has not been developped since 2007. Which means the source code cannot compile "out of the box".

Here is the line to be modified:

"long|!" => \$config{long_nums},

And it should be modified into this:

"long|long_nums|l!" => \$config{long_nums},

The rest is a classic:

$ perl Makefile.PL
$ make
$ make test
$ sudo make install

And there it is! mytop now works and displays... well... an empty screen:

http://www.gilandre.net/pix/running_mytop.png

See Also: