Skip to content

Instantly share code, notes, and snippets.

@ronanchilvers
Last active April 24, 2018 20:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ronanchilvers/eff6306806c92b10a5bc777828e913f7 to your computer and use it in GitHub Desktop.
Save ronanchilvers/eff6306806c92b10a5bc777828e913f7 to your computer and use it in GitHub Desktop.
Install phpenv on ubuntu
# Steps for installing phpenv
# Install dependencies
sudo apt-get install build-essential autoconf git bison re2c pkg-config libbz2-dev libcurl4-openssl-dev libxml2-dev libssl-dev libjpeg9-dev libpng-dev libmysqlclient-dev libmcrypt-dev libreadline-dev libtidy-dev libxslt-dev
# Install phpenv
git clone git://github.com/madumlao/phpenv.git ~/.phpenv
echo 'export PATH="$HOME/.phpenv/bin:$PATH"' >> ~/.bash_profile
exec $SHELL -l
# Add php-build
git clone https://github.com/php-build/php-build $(phpenv root)/plugins/php-build
# List available php versions
phpenv install -l
# Install a version
phpenv install 7.0.29
# Rehash phpenv shims
phpenv rehash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment