【SystemTap】 Linux下安装使用SystemTap源码安装SystemTap

本文详细介绍了如何从源码独立安装SystemTap,并确保其与elfutils兼容。文章提供了具体的步骤和命令,帮助读者完成安装过程。

文章 http://blog.csdn.net/zklth/archive/2010/09/28/5912785.aspx 介绍的是使用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.

========================

 

 

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值