How to install beta php8.0 on CentOS8

1 minute read


It seems that php8.0 will be released on November 26, 2020.
A beta version is also available in the repository of remi, so install it and check the operation.

Installation method

Copy and paste to create PHP8 environment with CentOS8, about 100th decoction
How to install Centos8 php8.0

Put the body of php.

dnf install
dnf install
dnf install yum-utils
dnf --enablerepo=remi install php80-php

I want to try connecting to the database, so I put mariadb

dnf install mariadb-server
systemctl start mariadb.service

Insert the php module.

dnf install --enablerepo=remi php80-php-mysqlnd php80-php-mysqli php80-php-gd php80-php-cli php80-php-opcache
dnf install --enablerepo=remi php80-php-pecl-zip php80-php-devel php80-php-pear

Commands such as php, pear, and pecl do not pass the path just by installing them, so find them with find and call them with the full path.

find / -name pear
find / -name pecl
/opt/remi/php80/root/usr/bin/pecl install APCu
/opt/remi/php80/root/usr/bin/pear install Mail_MimeDecode
/opt/remi/php80/root/usr/bin/pear install HTTP_Client
/opt/remi/php80/root/usr/bin/pear install Net_IPv6

Switching versions using alternatives is fine, but this time it’s not a test.
Switch between multiple versions of PHP

Start httpd and php. It seems that php-fpm is usually included these days.

systemctl start httpd.service
systemctl start php80-php-fpm.service

Execute phpinfo (); and check “Loaded Configuration File” to check the path of php.ini.
Added to php.ini.


Restart php.

systemctl restart php80-php-fpm.service


There is no problem with gd and mysqli.
Both OPcache and apcu are working normally.
Fixed Net_IPv6 throwing Fatal error.


#Near line 806
#            $ip{$pos} = '_'; #Before correction
            $ip[$pos] = '_'; #Revised