文章 http://www.linuxidc.com/Linux/2011-03/33415.htm 介绍的是使用CentOS默认的SystemTap,这里介绍使用SystemTap源码独立安装SystemTap.
源码下载地址SystemTap: ftp://sources.redhat.com/pub/systemtap/
SystemTap: ftp://sources.redhat.com/pub/systemtap/releases/
elfutils: https://fedorahosted.org/releases/e/l/elfutils/
SystemTap需要elfutils的支持,并且相应的 elfutils 版本还不能太老,否则执行SystemTap的 ./configure 时会出现如下错误:error: elfutils, libdw too old, need 0.126+但是安装SystemTap之前并不是要首先安装 elfutils ,而是在配置 SystemTap 时指定与 elfutils 相关的参数,使得在编译安装SystemTap时自动编译--------------------------------------------------cd /local/zkl/systemtap-1.1
./configure --with-elfutils=/local/zkl/elfutils-0.137 --prefix=/local/zkl/SystemTap
( 配置systemtap安装参数,指定 elfutils 的源码目录以及SystemTap的安装路径 )
make
make install执行完毕,SystemTap安装在 /local/zkl/SystemTap 下--------------------------------------------------[root@hdfs05 SystemTap]# ls
bin etc include lib libexec share[root@hdfs05 SystemTap]# bin/stap -V
SystemTap translator/driver (version 1.1/0.137 non-git sources)
Copyright (C) 2005-2009 Red Hat, Inc. and others
This is free software; see the source for copying conditions.系统默认安装的SystemTap可以不用卸载,因为卸载时可能会卸载一些其它相关的包,以下是查看系统默认安装的 systemtap,
[root@hdfs05 SystemTap]# rpm -q systemtap
systemtap-0.6.2-1.el5我们只需要通过配置环境变量就能使执行命令时首先在我们安装的SystemTap中查找命令:
vim ~/.bashrc
export PATH=/local/zkl/SystemTap/bin:$PATH
source ~/.bashrc[root@hdfs05 SystemTap]# stap -V
SystemTap translator/driver (version 1.1/0.137 non-git sources)
Copyright (C) 2005-2009 Red Hat, Inc. and others
This is free software; see the source for copying conditions.CentOS 5.4 final下Systemtap的安装CentOS 5.5 下编译内核 Linux 2.6.3x相关资讯 CentOS SystemTap
- 在Ubuntu上安装使用Systemtap (02月28日)
- CentOS虚拟机NAT静态IP设置 (07/04/2013 17:09:32)
- CentOS 格式化新硬盘并设置开机自 (07/04/2013 16:50:50)
| - CentOS 5.8 上安装 SystemTap-2.6 (06/09/2015 16:11:42)
- CentOS /usr/libexec/gconf-sanity (07/04/2013 17:07:42)
- 为什么我们选择CentOS而不是Debian (06/06/2013 06:19:40)
|
本文评论 查看全部评论 (0)