install in centos
# Centos 8 Stream
``sudo dnf upgrade --refresh -y``
EPEL
``sudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm``
REMI
``sudo dnf install dnf-utils http://rpms.remirepo.net/enterprise/remi-release-8.rpm``
## if old php is installed
``sudo dnf remove php php-fpm -y``
remove package
``sudo dnf remove php* -y``
reset list
``sudo dnf module list reset php -y``
## enable php8.1
show list
``sudo dnf module list php``
enable remi php8.1
``sudo dnf module enable php:remi-8.1``
basic php for laravel
``dnf install php php-fpm php-opcache php-gd php-curl php-mysqlnd php-mbstring php-dom zip unzip php-zip php-json php-pdo php-pdo_mysql``
other if needed
``php-cli php-intl php-common php-bcmath php-imap php-imagick php-xmlrpc php-json php-readline php-memcached php-redis php-mbstring php-apcu php-xml``
confirm installation
``php -v``
No Comments