Instalar oci8 php7.4-fpm (Ubuntu)

mkdir /opt/oracle

cd /opt/oracle

ver outras versões
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/

wget https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient18.3-basic-18.3.0.0.0-3.x86_64.rpm
wget https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient18.3-devel-18.3.0.0.0-3.x86_64.rpm

alien -i oracle-instantclient18.3-basic-18.3.0.0.0-3.x86_64.rpm
alien -i oracle-instantclient18.3-devel-18.3.0.0.0-3.x86_64.rpm

sudo apt-add-repository ppa:ondrej/php
sudo apt-get update

sudo apt-get install php7.4-cli php7.4-fpm php7.4-curl php7.4-gd php7.4-mysql php7.4-mbstring php7.4-xml zip unzip

–Caso precise alterar a versão do PHP
sudo update-alternatives --config php

sudo apt-get install php-dev php-pear build-essential libaio1

pecl install oci8

instantclient,/usr/lib/oracle/18.3/client64/lib

echo "extension = oci8.so" >> /etc/php/7.4/fpm/php.ini
echo "extension = oci8.so" >> /etc/php/7.4/cli/php.ini

sudo systemctl restart php7.4-fpm

php -m | grep 'oci8'
caso retorne oci8, a configuração esta correta e pronto para usar