Created
January 12, 2020 15:52
-
-
Save kelvysmoura/25fe62d04bf7a95fa23565c26f524892 to your computer and use it in GitHub Desktop.
Altera versão do PHP
This file contains 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