Required modules:
Curses
DBI Distributed as Bundle: DBI:
DBD: mysql
Getopt: Long (Distributed with Perl 5)
Net: Domain Part of libnet:
# Perl-e use Curses
# Perl-e use DBI
# Perl-e use DBD: mysql
# Perl-e use Getopt: Long
# Perl-e use Net: Domain
If there is no output, the module is installed. If there is an error, the corresponding module is not installed.
You can download the latest version of the corresponding module from the address given above.
Install the required Perl module:
# Tar zxvf Curses-x.xx.tar.gz
# Cd Curses *
# Perl Makefile. PL
# Make
# Make install
The yum repository contains perl-DBI, so you can directly install yum
# Yum-y install perl-DBI
Because MySQL is compiled and installed, you need to add the lib path to ld. so. conf.
# Vi/etc/ld. so. conf
/Usr/local/mysql/lib/mysql
# Ldconfig
Although the yum repository contains perl-DBD-MySQL, it depends on mysql, so it is still compiled and installed.
# Tar zxvf DBD-mysql-x.xxxx.tar.gz
# Cd DBD-mysql *
# Perl Makefile. PL -- mysql_config =/usr/local/mysql/bin/mysql_config
# Make
# Make install
Install mtop:
# Tar zxvf mtop-0.6.6.tar.gz
# Cd mtop-0.6.6
# Perl Makefile. PL
# Make
# Make install
Add the corresponding MySQL Database User:
# Mysql-uroot-pPASSWORD
Mysql> grant reload, PROCESS, super on *. * to identified by mtop;
Mysql> flush privileges;
Mysql> exit
Run:
Because you have customized the location of mysql. sock, you need to make a link to mtop to run it,
# Ln-s/var/run/mysqld/mysql. sock/tmp/mysql. sock
# Mtop -- dbuser = mtop -- password = mtop