From 7c4c5b9fe71fb5051aed6b6c317d17165bbb072a Mon Sep 17 00:00:00 2001 From: Oliver Mannion <125105+tekumara@users.noreply.github.com> Date: Tue, 31 Jul 2018 08:09:58 +1000 Subject: [PATCH] add instructions for installing on Amazon Linux from source (#1902) Add instructions for installing on Amazon Linux from source --- INSTALL.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/INSTALL.md b/INSTALL.md index 9b32f8b5bed5..1dcfa7f10bda 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -12,6 +12,7 @@ - [Ubuntu](#ubuntu---source) - [Fedora](#fedora---source) - [openSUSE](#opensuse---source) + - [Amazon Linux](#amazon-linux---source) * [Older Instructions](#older-instructions) ## Kernel Configuration @@ -332,6 +333,51 @@ sudo make install popd ``` +## Amazon Linux - Source + +Tested on Amazon Linux AMI release 2018.03 (kernel 4.14.47-56.37.amzn1.x86_64) + +### Install packages required for building +``` +# enable epel to get iperf, luajit, luajit-devel, cmake3 (cmake3 is required to support c++11) +sudo yum-config-manager --enable epel + +sudo yum install -y bison cmake3 ethtool flex git iperf libstdc++-static python-netaddr gcc gcc-c++ make zlib-devel elfutils-libelf-devel +sudo yum install -y luajit luajit-devel +sudo yum install -y http://repo.iovisor.org/yum/extra/mageia/cauldron/x86_64/netperf-2.7.0-1.mga6.x86_64.rpm +sudo pip install pyroute2 +sudo yum install -y ncurses-devel +``` + +### Install clang 3.7.1 pre-built binaries +``` +wget http://releases.llvm.org/3.7.1/clang+llvm-3.7.1-x86_64-fedora22.tar.xz +tar xf clang* +(cd clang* && sudo cp -R * /usr/local/) +``` + +### Build bcc +``` +git clone https://github.com/iovisor/bcc.git +pushd . +mkdir bcc/build; cd bcc/build +cmake3 .. -DCMAKE_INSTALL_PREFIX=/usr +time make +sudo make install +popd +``` + +### Setup required to run the tools +``` +sudo yum -y install kernel-devel-$(uname -r) +sudo mount -t debugfs debugfs /sys/kernel/debug +``` + +### Test +``` +sudo /usr/share/bcc/tools/execsnoop +``` + # Older Instructions ## Build LLVM and Clang development libs