IT Help Desk > Server Management

How to install Mytop 1.9 on Cpanel


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: ---/scripts/realperlinstaller --force Getopt::Long
/scripts/realperlinstaller --force DBI
/scripts/realperlinstaller --force DBD::mysql
/scripts/realperlinstaller --force Term::ReadKey
--- End code ---

Now, we download and install mytop.

--- Code: ---wget
tar zxpfv mytop-1.9.tar.gz
cd mytop-1.9
perl Makefile.PL && make && make install
--- End code ---

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: ---nano /usr/local/bin/mytop
--- End code ---

3. Do a search for the following:
(With nano it would be ctrl + w to bring up the search.)

--- Code: ---long|!
--- End code ---

4. Locate the line that looks like:

--- Code: ---"long|!" => \$config{long_nums},
--- End code ---

5. You will want to completely remove the above line and replace it with the following:

--- Code: ---"long|long_nums|l!" => \$config{long_nums},
--- End code ---

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: ---mytop
--- End code ---



[0] Message Index

Go to full version