Skip to main content

Install PHP versi pilihan CentOS 8

Pre Configure

yum install epel-release yum-utils -y
nano /etc/selinux/config

Disabled selinux jika dibutuhkan

Install HTTPD

yum install httpd
systemctl enable httpd
systemctl start httpd

Izinkan httpd di firewall CentOS

firewall-cmd --add-service=http --permanent
firewall-cmd --add-service=https --permanent
firewall-cmd --list-all
firewall-cmd --reload

Install PHP

Repo CentOS 8 tersedia php7.2, php7.3, php7.4, dan php8.0

remi-7.4 pada command di bawah dapat disesuaikan dengan versi yang dibutuhkan.

yum install https://rpms.remirepo.net/enterprise/remi-release-8.rpm
yum module list php
yum module enable php:remi-7.4
yum install php php-cli php-common php-devel php-mysql php-pdo php-pear php-xml php-gd php-zip

Sumber :