Skip to content

Instantly share code, notes, and snippets.

@swooningfish
Last active August 17, 2022 19:35
Show Gist options
  • Select an option

  • Save swooningfish/4489632fc118f618c0e84f67d740fd0d to your computer and use it in GitHub Desktop.

Select an option

Save swooningfish/4489632fc118f618c0e84f67d740fd0d to your computer and use it in GitHub Desktop.

Revisions

  1. swooningfish revised this gist Aug 17, 2022. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions php8.0-fpm-nginx-ubuntu-20.04
    Original file line number Diff line number Diff line change
    @@ -26,3 +26,8 @@ systemctl status php8.0-fpm
    sudo systemctl restart nginx
    sudo systemctl restart php8.0-fpm


    # set default cli on ubuntu
    # Source: https://stackoverflow.com/questions/42619312/switch-php-versions-on-commandline-ubuntu-16-04
    sudo update-alternatives --set php /usr/bin/php8.0

  2. swooningfish created this gist Aug 17, 2022.
    28 changes: 28 additions & 0 deletions php8.0-fpm-nginx-ubuntu-20.04
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,28 @@
    # source : https://linuxize.com/post/how-to-install-php-8-on-ubuntu-20-04/

    # Enableging the PHP Repo

    sudo apt install software-properties-common
    sudo add-apt-repository ppa:ondrej/php


    # Nginx cconfig to specify which php fpm sock to use.
    /etc/nginx/sites-enabled/site.local

    fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
    fastcgi_pass unix:/var/run/php/php8.0-fpm.sock;


    # Show installed php packages

    dpkg --get-selections | grep php

    # Install PHP 8.0-fpm and extensions

    sudo apt install php8.0-fpm php8.0-mysql php8.0-gd php8.0-mbstring php8.0-curl php8.0-dom php8.0-imagick

    systemctl status php8.0-fpm

    sudo systemctl restart nginx
    sudo systemctl restart php8.0-fpm