-
-
Save daniloaldm/a6ad842240a8916fbcf3d98a761216bb to your computer and use it in GitHub Desktop.
Altera versão do PHP
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
clear; | |
php -v | |
echo ''; | |
echo "Versão atual: " | |
read current; | |
echo "Alterar para a versão: "; | |
read version; | |
echo "Alterando da versão $urrent para a versão $version"; | |
echo ''; | |
sudo a2dismod php$current | |
sudo a2enmod php$version | |
sudo update-alternatives --set php /usr/bin/php$version | |
sudo update-alternatives --set phar /usr/bin/phar$version | |
sudo update-alternatives --set phar.phar /usr/bin/phar.phar$version | |
sudo service apache2 restart | |
echo 'Pronto!' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment