Skip to content

Commit

Permalink
Add source installation instructions for Centos 7 (iovisor#2248)
Browse files Browse the repository at this point in the history
Add source installation instructions for Centos 7
  • Loading branch information
ethercflow authored and yonghong-song committed Mar 2, 2019
1 parent eca17a0 commit 552658e
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
- [Ubuntu](#ubuntu---source)
- [Fedora](#fedora---source)
- [openSUSE](#opensuse---source)
- [Centos](#centos---source)
- [Amazon Linux](#amazon-linux---source)
* [Older Instructions](#older-instructions)

Expand Down Expand Up @@ -388,6 +389,55 @@ sudo make install
popd
```

## Centos - Source

For Centos 7.6 only

### Install build dependencies

```
sudo yum install -y epel-release
sudo yum update -y
sudo yum groupinstall -y "Development tools"
sudo yum install -y elfutils-libelf-devel cmake3
sudo yum install -y luajit luajit-devel # for Lua support
```

### Install and compile LLVM

```
curl -LO http:https://releases.llvm.org/7.0.1/llvm-7.0.1.src.tar.xz
curl -LO http:https://releases.llvm.org/7.0.1/cfe-7.0.1.src.tar.xz
tar -xf cfe-7.0.1.src.tar.xz
tar -xf llvm-7.0.1.src.tar.xz
mkdir clang-build
mkdir llvm-build
cd llvm-build
cmake3 -G "Unix Makefiles" -DLLVM_TARGETS_TO_BUILD="BPF;X86" \
-DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr ../llvm-7.0.1.src
make
sudo make install
cd ../clang-build
cmake3 -G "Unix Makefiles" -DLLVM_TARGETS_TO_BUILD="BPF;X86" \
-DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr ../cfe-7.0.1.src
make
sudo make install
cd ..
```

### Install and compile BCC

```
git clone https://github.com/iovisor/bcc.git
mkdir bcc/build; cd bcc/build
cmake .. -DCMAKE_INSTALL_PREFIX=/usr
make
sudo make install
```

## Amazon Linux - Source

Tested on Amazon Linux AMI release 2018.03 (kernel 4.14.47-56.37.amzn1.x86_64)
Expand Down

0 comments on commit 552658e

Please sign in to comment.