How to install mytop

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).

a) cd /tmp
b) wget
c) tar -zxvf mytop-1.6.tar.gz
d) cd mytop-1.6
e) perl Makefile.PL
f) make
g) make test
h) make install

[root@localhost ~]# cd /tmp
[root@localhost tmp]# wget
--2012-11-12 09:14:42--
Connecting to||:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 19720 (19K) [application/x-gzip]
Saving to: `mytop-1.6.tar.gz'

100%[======================================>] 19,720 --.-K/s in 0.1s

2012-11-12 09:14:43 (130 KB/s) - `mytop-1.6.tar.gz' saved [19720/19720]

[root@localhost tmp]# tar -zxvf mytop-1.6.tar.gz
[root@localhost tmp]# cd mytop-1.6
[root@localhost mytop-1.6]# perl Makefile.PL
Checking if your kit is complete...
Looks good
Writing Makefile for mytop
[root@localhost mytop-1.6]# make
cp mytop blib/script/mytop
/usr/bin/perl "-MExtUtils::MY" -e "MY->fixin(shift)" blib/script/mytop
Manifying blib/man1/mytop.1
[root@localhost mytop-1.6]# make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-Iblib/lib" "-Iblib/arch"
ok 1
[root@localhost mytop-1.6]# make install
Installing /usr/share/man/man1/mytop.1
Installing /usr/bin/mytop
Writing /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/auto/mytop/.packl
Appending installation info to /usr/lib/perl5/5.8.8/i386-linux-thread-multi/perl
[root@localhost mytop-1.6]#

If you get something similar to following, you will need to take care of the prerequisites:

Looks good
Warning: prerequisite Term::ReadKey 2.1 not found.
Writing Makefile for mytop

Just because they are warnings does not mean you ignore them. So let us install those prerequisites.

Method 1
a) perl -MCPAN -eshell
b) install Term::ReadKey
c) install DBI

Method 2
a) yum install perl-TermReadKey

[root@localhost ~]# yum install perl-TermReadKey
Loaded plugins: fastestmirror, protectbase, security
Loading mirror speeds from cached hostfile
* base:
* extras:
* rpmforge:
* updates:
0 packages excluded due to repository protections
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package perl-TermReadKey.i386 0:2.30-3.el5.rf set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

Package Arch Version Repository Size
perl-TermReadKey i386 2.30-3.el5.rf rpmforge 55 k

Transaction Summary
Install 1 Package(s)
Upgrade 0 Package(s)

Total download size: 55 k
Is this ok [y/N]: y
Downloading Packages:
perl-TermReadKey-2.30-3.el5.rf.i386.rpm | 55 kB 00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : perl-TermReadKey 1/1

perl-TermReadKey.i386 0:2.30-3.el5.rf


b) yum install perl-DBI

Related Post

, ,

No comments yet.

Leave a Reply