PHP 8.2 FPM installieren und in Nginx einrichten
Sourcelist erweitern.
sudo apt update
sudo apt upgrade
sudo apt install python-software-properties
sudo add-apt-repository ppa:ondrej/php
sudo apt update
Alles was mit php8.2 im Paketnamen zu tun hat auflisten, um daraus die gewünschten php8.2 Pakete zu installieren.
sudo apt-cache pkgnames | grep php8.2
Alles was mit php8.2 im Paketnamen zu tun hat installieren (ggf. anpassen).
sudo apt install php8.2 php8.2-fpm php8.2-cli php8.2-cgi php8.2-phpdbg php8.2-yaml php8.2-snmp php8.2-soap php8.2-solr php8.2-vips libphp8.2-embed php8.2-mbstring php8.2-readline php8.2-zstd php8.2-ssh2 php8.2-ast php8.2-bz2 php8.2-xmlrpc php8.2-dba php8.2-dev php8.2-redis php8.2-amqp php8.2-rdkafka php8.2-enchant php8.2-gmp php8.2-oauth php8.2-mongodb php8.2-pinba php8.2-http php8.2-pspell php8.2-mysql php8.2-excimer php8.2-inotify php8.2-tideways php8.2-lz4 php8.2-smbclient php8.2-memcached php8.2-imagick php8.2-psr php8.2-uopz php8.2-rrd php8.2-swoole php8.2-ds php8.2-gd php8.2-xdebug php8.2-ps php8.2-mailparse php8.2-maxminddb php8.2-grpc php8.2-common php8.2-stomp php8.2-uploadprogress php8.2-uuid php8.2-raphf php8.2-xhprof php8.2-tidy php8.2-xml php8.2-xsl php8.2-bcmath php8.2-pcov php8.2-msgpack php8.2-gearman php8.2-gnupg php8.2-zip php8.2-zmq php8.2-igbinary php8.2-sqlite3 php8.2-decimal php8.2-memcache php8.2-mcrypt php8.2-libvirt-php php8.2-opcache php8.2-curl php8.2-ldap php8.2-imap php8.2-intl php8.2-sybase php8.2-interbase libapache2-mod-php8.2 php8.2-odbc php8.2-protobuf php8.2-pgsql
APCu und OPcache installieren und aktivieren.
sudo apt install php8.2-opcache php-apcu
sudo phpenmod apcu opcache
FPM Konfiguration anpassen.
sudo nano /etc/php/8.2/fpm/pool.d/www.conf
Bei user und group den entsprechenden Wert eintragen
[www]
...
user = gb-media
group = gb-media
...
PHP FPM neu starten.
sudo systemctl restart php8.2-fpm
Unix-Socket in der Nginx Site eintragen.
...
location ~ \.php$ {
...
fastcgi_pass unix:/var/run/php/php8.2-fpm.sock;
...
}
...
Nginx Konfigurationen neu einlesen.
sudo systemctl reload nginx