Skip to content

Instantly share code, notes, and snippets.

@larytet
Last active September 29, 2017 06:09
Show Gist options
  • Save larytet/67bc9853e787467e86abf74f0954bc53 to your computer and use it in GitHub Desktop.
Save larytet/67bc9853e787467e86abf74f0954bc53 to your computer and use it in GitHub Desktop.

Usage: Ubuntu

Install SystemTap (see also https://wiki.ubuntu.com/Kernel/Systemtap#Where_to_get_debug_symbols_for_kernel_X.3F for Ubuntu)

apt-get install linux-image-$(uname -r)-dbgsym build-essential systemtap systemtap-runtime linux-headers-$(uname -r)
stap-prep

./configure
make

Usage: CentOS 6

# Install SCL environment
yum -y install rpm-build git  zlib zlib-devel libjpeg libjpeg-devel zlib zlib-devel libjpeg libjpeg-devel wget which tar systemtap scl-utils centos-release-scl stap-prep
# Edit file /etc/yum.repos.d/CentOS-Debuginfo.repo - enable the debug info
yum -y install  kernel-devel-$(uname -r) kernel-$(uname -r) kernel-debuginfo-$(uname -r) kernel-debuginfo-common-$(uname -r)
# Install GCC toolchain 5.3  
yum -y install devtoolset-4-gcc* python27 python27-python-devel.x86_64
scl enable devtoolset-4 bash                                                                                  
source /opt/rh/python27/enable                                                                          
# Make sure that python exists 
python --version
./configure
make

Usage: CentOS 7

# Install SCL environment
yum -y install rpm-build git  zlib zlib-devel libjpeg libjpeg-devel zlib zlib-devel libjpeg libjpeg-devel wget which tar systemtap scl-utils centos-release-scl
stap-prep 
yum -y group install "Development Tools"
# Edit file /etc/yum.repos.d/CentOS-Debuginfo.repo - enable the debug info
yum -y install  kernel-devel-$(uname -r) kernel-$(uname -r) kernel-debuginfo-$(uname -r) kernel-debuginfo-common-$(uname -r)
yum -y install python27 python27-python-devel.x86_64
yum install epel-release
yum -y update
yum -y install python-pip
# Make sure that python exists 
python --version
./configure
make
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment