sudo apt install apache2
sudo ufw app list
sudo ufw allow in "Apache"
sudo ufw status
sudo a2enmod headers deflate rewrite expires
PostgreSQL 12 is use as default version on Ubuntu 20.04
sudo apt install postgresql postgresql-contrib -y
sudo -i -u postgres
Now change admin's password
ALTER USER postgres WITH PASSWORD 'SECRETPASSWORd';
Change postgres' user type to match password changing
sudo vi /etc/postgresql/14/main/pg_hba.conf
Change this line
local all postgres peer
to
local all postgres md5
sudo service postgresql restart
psql -U postgres
CREATE DATABASE db_name
We use Ondrej's PPA in order if we use another version in the future.
sudo add-apt-repository ppa:ondrej/php
sudo apt update
sudo apt install -y php8.2 php8.2-fpm php8.2-curl php8.2-gd php8.2-mbstring php8.2-mysql php8.2-opcache php8.2-xml php8.2-xmlrpc php8.2-common php8.2-imagick php8.2-pgsql php8.2-xdebug
sudo service php8.2-fpm start
sudo a2enconf php8.2-fpm
sudo service apache2 restart
opa, testei por aqui. Porém em docker, mais mesmo assim nao consigo rodar o php info.