![]() First, disable the current version with the a2dismod command and then enable the one you want with the a2enmod command. To set the PHP version that will work with the Apache web server, use the commands below. $ sudo update-alternatives -set php /usr/bin/php8.0Ĩ. Set PHP 7.1 Version in Ubuntu - Set Default PHP Version 8.0. $ sudo update-alternatives -set php /usr/bin/php7.1 Set PHP 7.0 Version in Ubuntu - Set Default PHP Version 7.1. $ sudo update-alternatives -set php /usr/bin/php7.0 Set PHP 5.6 Version in Ubuntu - Set Default PHP Version 7.0. $ sudo update-alternatives -set php /usr/bin/php5.6 You can set the default PHP version to be used on the system with the update-alternatives command, after setting it, check the PHP version to confirm as follows. $ php -vĬheck Default PHP Version in Ubuntu Set Default PHP Version in Ubuntuħ. Finally, verify your default PHP version used on your system like this. $ sudo apt install php7.3-cli php8.0-xml php8.0-mysqlĦ. $ sudo apt install php7.3-cli php7.4-xml php7.4-mysql $ sudo apt install php7.3-cli php7.3-xml php7.3-mysql $ sudo apt install php7.2-cli php7.2-xml php7.2-mysql $ sudo apt install php7.1-cli php7.1-xml php7.1-mysql $ sudo apt install php7.0-cli php7.0-xml php7.0-mysql $ sudo apt install php5.6-cli php5.6-xml php5.6-mysql Now you can install the most required PHP modules from the list. To install any PHP modules, simply specify the PHP version and use the auto-completion functionality to view all modules as follows. For Apache Web Server $ sudo apt install php5.6 įor Nginx Web Server $ sudo apt install php5.6-fpm Ĥ. Now install different supported versions of PHP as follows. $ sudo apt install software-properties-commonĢ. First start by adding Ondřej Surý PPA to install different versions of PHP – PHP 5.6, PHP 7.x, and PHP 8.0 on the Ubuntu system.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |