Skip to content

Instantly share code, notes, and snippets.

@matheusfaustino
Created December 10, 2018 00:48
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matheusfaustino/14b94b357d527bd1974a39b7d79e1ed3 to your computer and use it in GitHub Desktop.
Save matheusfaustino/14b94b357d527bd1974a39b7d79e1ed3 to your computer and use it in GitHub Desktop.
PHPBrew + PHP 7 (PHP 7.0/7.1/7.2/7.3) + Raspberry Pi 3
# How to install phpbrew
# https://github.com/phpbrew/phpbrew
curl -L -O https://github.com/phpbrew/phpbrew/raw/master/phpbrew
chmod +x phpbrew
sudo mv phpbrew /usr/local/bin/phpbrew
# build openssl in your raspberry (it takes some time): https://raspberrypi.stackexchange.com/a/66788
git clone git://git.openssl.org/openssl.git
cd openssl
./config
make
make test
sudo make install
# then, install these packages (for default installation)
sudo apt install libbz2-dev
sudo apt install libcurl4-gnutls-dev
sudo apt install libcurl4-openssl-dev
sudo apt install libreadline-dev
sudo apt install libxslt-dev
# install phpbrew with extensions and set it as default
# eg: phpbrew install -j $(nproc) 7.2 +default +openssl && phpbrew switch 7.2
phpbrew install -j $(nproc) <version> +default +openssl && phpbrew switch <version>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment