Author Topic: How to install Mytop 1.9 on Cpanel  (Read 984 times)


  • Guest
How to install Mytop 1.9 on Cpanel
« on: April 20, 2013, 11:46:28 PM »
How to install Mytop 1.9 on Cpanel

MyTop is one of the best MySQL monitoring tools available, written by a MySQL guru, Jeremy Zawodny.

Its vital for monitoring your MySQL health, especially in a shared hosting environment.

Installation on a CentOS (for cPanel) server is quite straight forward with this guide.
First off, we need a few perl modules, cPanel’s realperlinstaller comes in handy, if you aren’t on cPanel, you’ll need to CPAN or manually install these modules.

Code: [Select]
/scripts/realperlinstaller --force Getopt::Long
/scripts/realperlinstaller --force DBI
/scripts/realperlinstaller --force DBD::mysql
/scripts/realperlinstaller --force Term::ReadKey

Now, we download and install mytop.

Code: [Select]
tar zxpfv mytop-1.9.tar.gz
cd mytop-1.9
perl Makefile.PL && make && make install

A problem I have run across with MyTop is the following error: MyTop Error: Error in option spec: “long|!” – which keeps MyTop from starting at all.

This can be easily fixed:
1. You will want to connect to your system via SSH or console as root and perform the following.
2. Open mytop with your favorite editor, in this case we will use nano:

Code: [Select]
nano /usr/local/bin/mytop
3. Do a search for the following:
(With nano it would be ctrl + w to bring up the search.)

Code: [Select]
4. Locate the line that looks like:

Code: [Select]
"long|!" => \$config{long_nums},
5. You will want to completely remove the above line and replace it with the following:

Code: [Select]
"long|long_nums|l!" => \$config{long_nums},
6. Save your edits and exit.
(With nano it would be ctrl + x to begin the exit phase and you will want to save it on exit.)

7. Once you have done the above you will be set to run mytop and it should start up without issue for you by running the following command.

Code: [Select]