`

How to install innotop on centos

    博客分类:
  • SQL
 
阅读更多
转自
http://blog.chinaunix.net/uid-24086995-id-3199333.html,非常感谢,另外所需安装都在附件里
引用
#各种依赖包下载地址
http://www.cpan.org/modules/by-module

#一共要安装的依赖包:Time::HiRes,Term::ReadKey,DBI,DBD::mysql

#下载,解压缩
[bzuo@devdb7 ~]$ wget http://innotop.googlecode.com/files/innotop-1.8.0.tar.gz
[bzuo@devdb7 ~]$ tar zxvf innotop-1.8.0.tar.gz

#安装,报错
[bzuo@devdb7 innotop-1.8.0]$ perl Makefile.PL
Can't locate ExtUtils/MakeMaker.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at Makefile.PL line 1.
BEGIN failed--compilation aborted at Makefile.PL line 1.

#下载依赖包
[bzuo@devdb7 ~]$ wget http://files.directadmin.com/services/9.0/ExtUtils-MakeMaker-6.31.tar.gz
[bzuo@devdb7 ~]$ tar zxvf ExtUtils-MakeMaker-6.31.tar.gz

#安装依赖包报错
[bzuo@devdb7 ~]$ cd ExtUtils-MakeMaker-6.31
[bzuo@devdb7 ExtUtils-MakeMaker-6.31]$ perl Makefile.PL
Checking if your kit is complete...
Looks good
Could not open '': No such file or directory at lib/ExtUtils/MM_Unix.pm line 2697.

#yum安装依赖包
[root@devdb7 ExtUtils-MakeMaker-6.31]# yum install perl-ExtUtils-MakeMaker

[root@devdb7 ExtUtils-MakeMaker-6.31]# perl Makefile.PL
Writing Makefile for ExtUtils::MakeMaker

#安装,提示报错
[root@devdb7 innotop-1.8.0]# perl Makefile.PL
Warning: prerequisite DBD::mysql 1 not found.
Warning: prerequisite DBI 1.13 not found.
Warning: prerequisite Term::ReadKey 2.1 not found.
Writing Makefile for innotop

#安装DBD,需要先安装DBI
[root@devdb7 bzuo]# wget http://search.cpan.org/CPAN/authors/id/C/CA/CAPTTOFU/DBD-mysql-4.020.tar.gz
[root@devdb7 bzuo]# tar zxvf DBD-mysql-4.020.tar.gz
[root@devdb7 bzuo]# cd DBD-mysql-4.020
[root@devdb7 DBD-mysql-4.020]# perl Makefile.PL
Can't locate DBI/DBD.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at Makefile.PL line 25.

#安装DBI,提示没有安装gcc,yum 安装gcc
[root@devdb7 bzuo]# wget http://www.cpan.org/modules/by-module/DBI/DBI-1.618.tar.gz
[root@devdb7 bzuo]# tar zxvf DBI-1.618.tar.gz
[root@devdb7 bzuo]# cd DBI-1.618
[root@devdb7 DBI-1.618]# perl Makefile.PL
[root@devdb7 DBI-1.618]# make
/bin/sh: gcc: command not found
make: *** [Perl.o] Error 127
[root@devdb7 DBI-1.618]# yum install gcc
[root@devdb7 DBI-1.618]# make && make install (正常了)

#在安装inotop,发现对DBI的提示没有了
[root@devdb7 innotop-1.8.0]# perl Makefile.PL
Warning: prerequisite DBD::mysql 1 not found.
Warning: prerequisite Term::ReadKey 2.1 not found.

#再安装DBD,正常了,
[root@devdb7 DBD-mysql-4.020]# perl Makefile.PL
[root@devdb7 DBD-mysql-4.020]# make
[root@devdb7 DBD-mysql-4.020]# make install

#安装innotop只提示一个依赖包没有了
[root@devdb7 innotop-1.8.0]# perl Makefile.PL
Warning: prerequisite Term::ReadKey 2.1 not found.
Writing Makefile for innotop

#下载TermReadKey
[root@devdb7 bruce]# wget http://www.cpan.org/modules/by-module/Term/TermReadKey-2.30.tar.gz
[root@devdb7 bruce]# tar zxvf TermReadKey-2.30.tar.gz
[root@devdb7 bruce]# cd TermReadKey-2.30
[root@devdb7 TermReadKey-2.30]# perl Makefile.PL
[root@devdb7 TermReadKey-2.30]# make && make install

#再来运行makefile.pl,就没报错了
[root@devdb7 innotop-1.8.0]# perl Makefile.PL
Writing Makefile for innotop
[root@devdb7 innotop-1.8.0]# make && make install

#运行innotop 提示缺少HiRes
[root@devdb7 innotop-1.8.0]# innotop --help
Can't locate Time/HiRes.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /usr/local/bin/innotop line 1354.
BEGIN failed--compilation aborted at /usr/local/bin/innotop line 1354.


#安装Time-HiRes
[root@devdb7 bruce]# wget http://www.cpan.org/modules/by-module/Time/Time-HiRes-1.9725.tar.gz
[root@devdb7 bruce]# tar zxvf Time-HiRes-1.9725.tar.gz
[root@devdb7 bruce]# cd Time-HiRes-1.9725
[root@devdb7 Time-HiRes-1.9725]# perl Makefile.PL
[root@devdb7 Time-HiRes-1.9725]# make && make install

#到此安装完成
[root@devdb7 Time-HiRes-1.9725]# innotop --help
Usage: innotop <options> <innodb-status-file>

  --[no]color -C Use terminal coloring (default)
  --config -c Config file to read
  --count Number of updates before exiting
  --delay -d Delay between updates in seconds
  --help Show this help message
  --host -h Connect to host
  --[no]inc -i Measure incremental differences
  --mode -m Operating mode to start in
 
#运行报错
[root@devdb7 Time-HiRes-1.9725]# innotop -uroot -pondemand -hlocalhost
/usr/bin/perl: symbol lookup error: /usr/local/lib64/perl5/auto/DBD/mysql/mysql.so: undefined symbol: mysql_init

#解决办法
mkdir /tmp/mysql-static
  cp /usr/lib64/mysql/*.a /tmp/mysql-static
  perl Makefile.PL --libs="-L/tmp/mysql-static -lmysqlclient"
  make
  make test
  make install
  rm -rf /tmp/mysql-static

#至此,运行正常了
[root@devdb7 DBD-mysql-4.020]# innotop
[RO] Query List (? for help) localhost, 00:00, 0 QPS, 0/0/0 con/run/cac thds, !localhost

When Load QPS Slow Se/In/Up/De% QCacheHit KCacheHit BpsIn BpsOut
Total 0/ 0/ 0/ 0 0.00% 0.00%
localhost: Access denied for user 'root'@'localhost

http://www.linuxidc.com/Linux/2008-08/14678.htm
http://www.perlmonks.org/?node_id=128077
转自http://blog.chinaunix.net/uid-26446098-id-3410139.html
分享到:
评论

相关推荐

    How To Install nginx on CentOS 6 with yum

    如果您看到“Welcome to nginx”的页面,那么您已经成功安装了 Nginx 服务器。现在,您可以继续安装 Lemp Stack 或设置 FTP 服务器等。 小结 在本教程中,我们学习了如何在 CentOS 6 上使用 yum 安装 Nginx 服务器...

    How to install VNC server on Centos 7

    如何在CentOS 7上安装VNC服务器 一、引言 VNC(Virtual Network Computing)是一种用于远程访问和控制桌面环境的图形化系统。它允许用户通过客户端软件(如VNC Viewer)来连接并控制远程计算机上的桌面环境。本文将...

    Install Cobbler on CentOS 7 -.mp4

    Install Cobbler on CentOS 7 Install Cobbler on CentOS 7 Install Cobbler on CentOS 7 Install Cobbler on CentOS 7

    Install of MS2019 on centos8.2

    1. Centos8.2启动盘制作;2. Centos8.2系统安装;3. Centos8.2系统环境设置;4. MS2019环境设置;5. 普通用户安装

    英文原版-CentOS Bible 1st Edition

    This is one of the first, if not the first comprehensive guide to the CentOS Linux operating system.First find out how to install and configure CentOS. From there, you’ll cover a wealth of Linux and ...

    Auto install Mysql on CentOS

    1,将下载的镜像文件放到./usr/local 2,创建目录/data/mysql #mkdir -p /data/mysql 3,修改脚本内容,将“MYSQL='mysql-5.7.35-linux-glibc2.12-x86_64.tar.gz'” 改成对应的镜像名 4,sudo ln -s /usr/lib64/...

    Install of Zacros on centos8.2

    在搭建Zacros环境和安装过程中,首先需要确认操作系统版本,这里使用的是CentOS Linux release 8.2.2004 (Core),属于CentOS 8系列。CentOS是Red Hat Enterprise Linux(RHEL)的免费替代版本,它是由社区驱动的,...

    install kaltura

    how to install kaltura in centos

    linux uuid source and how to install in linux

    另外,`how to install.txt`文件可能包含了更详细的安装指南,建议你阅读这个文件以获取更具体的步骤或特殊要求。 了解和使用UUID对于Linux系统管理员来说至关重要,因为许多自动化脚本和配置文件都会用到UUID来...

    Learn CentOS Linux Network Services

    You will learn how to install CentOS, and manage basic administration. You’ll then move onto understanding networking, and how to set up your required services. Each chapter is written in an easy-to...

    install ntop-ng 5.4 on centos 7.5 step by step

    install ntop-ng 5.4 on centos 7.5 step by step: 1. tar -xf ntop-ng5.4-centos7.tar 2. cd ng 3. yum install *.rpm 4. service redis start 5. ntopng -i interface-name -w 3000 5. open admin web in chrome ...

    openstack install guid for Linux,CentOS,Fedora

    how to install OpenStack by using packages available through Fedora 20 as well as on Red Hat Enterprise Linux and its derivatives through the EPEL repository. Explanations of configuration options and...

    Oracle11g install on CentOS 6.x

    1. TXT文档安装可直接拷贝 2. word文档供查看 3. 含打补丁步骤

    Install_Oracle9204_on_CentOS4.2

    【标题】"Install_Oracle9204_on_CentOS4.2" 指的是在 CentOS 4.2 操作系统上安装 Oracle 9i Release 2 (9.2.0.4) 数据库的过程。Oracle 9i 是 Oracle 公司在 2001 年发布的数据库产品,它提供了数据存储、管理和...

    Install of cp2k on centos8.2.pdf

    CP2K is a quantum chemistry and solid state physics software package that can perform atomistic simulations of solid state, liquid, molecular, periodic, material, crystal, and biological systems.

    CentOS 7 Server Deployment Cookbook

    What You Will Learn * See how to deploy CentOS easily and painlessly, even in multi-server environments * Configure various methods of remote access to the server so you don't always have to be in ...

    Installation OpenMeetings 4.0.10 on Centos 7.pdf

    安装的 Apache的 OpenMeetings 4.0.10在CentOS 7。Openmeetings提供视频会议,即时消息传递,白板,协作文档编辑和其他组件软件工具。它使用Media Server的API函数进行远程处理和流传输(Red5或Kurento)。

Global site tag (gtag.js) - Google Analytics