LAMP (software bundle): Difference between revisions
(7 intermediate revisions by the same user not shown) | |||
Line 31: | Line 31: | ||
===Installing PHP=== | ===Installing PHP=== | ||
;Installing php 7.4 on 20.04 | |||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
sudo apt update | sudo apt update | ||
sudo apt install php7. | sudo apt install php7.4 php7.4-fpm | ||
# Install some common extensions | # Install some common extensions | ||
sudo apt install php7. | sudo apt install php7.4-{apcu,bcmath,cli,common,curl,dev,gd,gmp,imagick,imap,intl,mysql,xml,xmlrpc,mbstring,opcache,redis,soap,zip} -y | ||
# Setup Apache to use php7. | # Setup Apache to use php7.4-fpm | ||
sudo a2enmod proxy_fcgi php7. | sudo a2enmod proxy_fcgi setenvif | ||
sudo a2enconf php7.4-fpm | |||
sudo a2dismod php7.4 | |||
sudo a2dismod mpm_prefork | sudo a2dismod mpm_prefork | ||
sudo a2enmod mpm_event | sudo a2enmod mpm_event | ||
sudo | sudo systemctl restart apache2 | ||
</syntaxhighlight> | </syntaxhighlight> | ||
;Important Notes | ;Important Notes | ||
* Always use a version when installing things if you don't want things to break when you do updates | * Always use a version when installing things if you don't want things to break when you do updates | ||
** | ** E.g. <code>php7.4-common</code> instead of <code>php-common</code> | ||
* For Ubuntu 18.04, add the following repository | |||
*:<code>sudo apt install software-properties-common && sudo add-apt-repository ppa:ondrej/php</code> | |||
===Installing MariaDB=== | ===Installing MariaDB=== |