How to install Mytop 1.9.1 on Cpanel

1
833

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.
/scripts/perlinstaller --force Getopt::Long
/scripts/perlinstaller --force DBI
/scripts/perlinstaller --force DBD::mysql
/scripts/perlinstaller --force Term::ReadKey

Now, we download and install mytop.

wget http://fossies.org/linux/privat/mytop-1.9.1.tar.gz
tar zxpfv mytop-1.9.1.tar.gz
cd mytop-1.9.1
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:
    nano /usr/local/bin/mytop
  3. Do a search for the following:
    (With nano it would be ctrl + w to bring up the search.)
    long|!
  4. Locate the line that looks like:
    "long|!" => \$config{long_nums},
  5. You will want to completely remove the above line and replace it with the following:
    "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.
    mytop

Originally posted 2015-07-02 23:06:38.

1 COMMENT

LEAVE A REPLY

Please enter your comment!
Please enter your name here