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 :

  • https://www.tecmint.com/install-php-on-centos-8/
  • https://www.cyberciti.biz/faq/install-php-7-x-on-centos-8-for-nginx/
  • https://www.linuxtechi.com/install-php-on-centos-8-rhel-8/