This document will help you compile and build the package file.
Prepare PHP and Rust environments.
For Debian user:
sudo apt install php-cli php-dev
For MacOS user:
brew install php
Install Rust globally.
export RUSTUP_HOME=/opt/rustup export CARGO_HOME=/opt/cargo curl https://sh.rustup.rs -sSf | sudo -E sh -s -- --no-modify-path sudo ln -s $CARGO_HOME/bin/rustup /usr/local/bin/rustup sudo ln -s $CARGO_HOME/bin/rustc /usr/local/bin/rustc sudo ln -s $CARGO_HOME/bin/cargo /usr/local/bin/cargo
For Debian user:
sudo apt install gcc make libclang protobuf-compiler
For MacOS user:
brew install protobuf
If you clone codes from https://github.com/apache/skywalking-php
git clone --recursive https://github.com/apache/skywalking-php.git cd skywalking-php phpize ./configure make sudo make install
If you download package tar from https://skywalking.apache.org/downloads/
sudo pecl install skywalking_agent-x.y.z.tgz
The extension file skywalking_agent.so
is generated in the php extension folder, get it by run php-config --extension-dir
.