https://github.com/phpenv/phpenv-installer
Install phpenv & php-build and update all of them when you want to
https://github.com/phpenv/phpenv-installer
Last synced: about 1 month ago
JSON representation
Install phpenv & php-build and update all of them when you want to
- Host: GitHub
- URL: https://github.com/phpenv/phpenv-installer
- Owner: phpenv
- License: mit
- Created: 2018-10-05T02:59:19.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-01-13T10:23:11.000Z (over 3 years ago)
- Last Synced: 2025-03-30T02:15:54.561Z (2 months ago)
- Language: Shell
- Size: 11.7 KB
- Stars: 103
- Watchers: 7
- Forks: 10
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# phpenv-installer & doctor scripts
Install [phpenv](https://github.com/phpenv/phpenv) +
[php-build](https://github.com/php-build/php-build) (and
other plugins), updating all of them when you want to!## phpenv-installer
It's the standard way: `phpenv-installer` idempotenttly installs or updates `phpenv` in $HOME/.phpenv (default $PHPENV_ROOT value).
```shell
curl -L https://raw.githubusercontent.com/phpenv/phpenv-installer/master/bin/phpenv-installer \
| bash
```The script will then instruct you to edit your shell initialization files.
### Optional: Installation in other directory (i.e. system-wide)
If you prefer to install `phpenv` in other directory (i.e
`$HOME/myphpenv`), or perhaps system-wide (i.e. `/usr/local/bin/phpenv`),
it's easy: just set $PHPENV_ROOT before the installer command:```shell
# $HOME/myphpenv
curl -L https://raw.githubusercontent.com/phpenv/phpenv-installer/master/bin/phpenv-installer \
| PHPENV_ROOT=$HOME/myphpenv bash
``````shell
# /usr/local/bin/phpenv
curl -L https://raw.githubusercontent.com/phpenv/phpenv-installer/master/bin/phpenv-installer \
| PHPENV_ROOT=/usr/local/bin/phpenv bash
```> Note: depends on the path, you will need superuser (sudo)
permission. You may also want to `sudo chown -R /usr/local/bin/phpenv` so that you can run the phpenv utilities as a regular user. Feel free to ask if you need some help!### Updating
```shell
phpenv update
```### Plugins installed by default
- [php-build/php-build](https://github.com/php-build/php-build): allows `phpenv install`
- [madumlao/phpenv-aliases](https://github.com/madumlao/phpenv-aliases): provides aliases for php versions
- [ngyuki/phpenv-composer](https://github.com/ngyuki/phpenv-composer): automatically installs composer script for php version### Uninstallation
```shell
rm -rf $(phpenv root)
```## phpenv-doctor
You can verify the state of your phpenv installation with:
```shell
curl -L https://raw.githubusercontent.com/phpenv/phpenv-installer/master/bin/phpenv-doctor \
| bash
```
Inspired by [rbenv-installer](https://github.com/fesplugas/rbenv-installer) and [pyenv-installer](https://github.com/yyuu/pyenv-installer)