0

How to install/configure PHP 8 with Apache in Oracle Linux?

I couldn't find PHP 8 related repos in Oracle Linux.

What i tried so far is:

  1. Installed PHP 8 manually by downloading tar.
  2. installed httpd from repo using sudo dnf install httpd

How to link both?

Now when I am opening a website it is showing PHP code instead of executing it.

How to configure PHP with Apache manually?

What packages should I install?

1 Answer 1

4

PHP 8 is available in Remi's modular repository for EL 8 in the remi-8.0 module stream.

Before you begin you will need to be using Oracle Linux 8 and have BaseOS, AppStream and EPEL repos enabled. You probably have already done this.

Install and enable remi's repositories:

dnf install https://rpms.remirepo.net/enterprise/remi-release-8.rpm 

Reset the PHP module and then enable the remi-8.0 module stream:

dnf -y module reset php dnf -y module enable php:remi-8.0 

Now install PHP normally.

For example:

dnf install httpd php 

If an older version of PHP was already installed from another module stream, then updating will upgrade it to 8.0.

dnf upgrade 
1
  • Thanks this worked. actually EPEL was not enabled which was main issue Commented Dec 24, 2020 at 17:13

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.