ssh <server>
# ~/.bash_profile
...
export PATH=/usr/local/php70/bin:$PATH
...
source .bash_profile
Confim PHP CLI version:
php -v
Update .bashrc
# .bashrc
...
source .bash_profile
...
mkdir -p ~/.php/7.0 && cd ~/.php/7.0
nano phprc
Enable phar
and fileinfo
extensions:
# phprc
extension = phar.so
extension = fileinfo.so
suhosin.executor.include.whitelist = phar
memory_limit = 512M
upload_max_filesize = 100M
post_max_size = 105M
max_execution_time = 500
max_input_time = 500
Confim Phar
:
php -m | grep Phar
mkdir -p ~/.php/composer
cd ~/.php/composer
curl -sS https://getcomposer.org/installer | php
# Rename executable
mv ~/.php/composer/composer.phar ~/.php/composer/composer
Add composer to $PATH:
# .bash_profile
...
export PATH=~/.php/composer:$PATH
...
source ~/.bash_profile