Created
May 9, 2020 04:46
-
-
Save dialogbox/d5c7e26d724ae0e52e3f62ff4570e59c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# bcc | |
sudo apt-get update | |
sudo apt-get install -y git cmake bison flex python clang libclang-dev libelf-dev arping iperf3 \ | |
libluajit-5.1-dev zlib1g-dev linux-headers-$(uname -r) | |
sudo apt-get install -y python3-distutils | |
git clone https://github.com/iovisor/bcc.git /tmp/src/bcc | |
mkdir /tmp/src/bcc/build; pushd /tmp/src/bcc/build; | |
cmake .. | |
make | |
sudo make install | |
cmake -DPYTHON_CMD=python3 .. | |
pushd src/python/ | |
make | |
sudo make install | |
popd | |
popd | |
sudo ldconfig | |
sudo rm -rf /tmp/src/bcc | |
# bpftrace | |
# It doesn't work on debian 9 because it requires cmake > 3.8 | |
git clone https://github.com/iovisor/bpftrace /tmp/src/bpftrace | |
mkdir /tmp/src/bpftrace/build; pushd /tmp/src/bpftrace/build; | |
cmake -DCMAKE_BUILD_TYPE=Release .. | |
make -j8 | |
sudo make install | |
popd | |
sudo rm -rf /tmp/src |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
bash -c "$(curl -sSL -H "Cache-Control: no-cache" https://gist.github.com/dialogbox/d5c7e26d724ae0e52e3f62ff4570e59c/raw)"