I have Oracle Linux 7.7 instance on Oracle cloud. I want to install PHP 7.2 on it. Previously I have installed PHP 7 on different Linux flavors but I could not find proper documentation, tutorial or how to guide for Oracle Linux.

I have installed PHP 7.2 using following command sudo yum install rh-php72 but when I run

php --version it is not working.

Has someone installed php 7 on Oracle Linux on cloud?

I have following repos enabled


Can you please tell me a reference or give steps to install PHP 7 Thanks in advance.

  • php is installed in /opt/rh/rh-php72/root/usr/bin/php --version and it runs if I give full path.
    – Silkograph
    Sep 21 '19 at 9:03
  • 3
    You installed a Software Collection. Do you know how to use Software Collections? Sep 21 '19 at 9:06
  • No I don't know, I am checking the link you have shared. Thanks.
    – Silkograph
    Sep 21 '19 at 9:08
  • That's great Michael, I ran scl enable rh-php72 bash and it is working :-)
    – Silkograph
    Sep 21 '19 at 9:13
  • It works only as cli not working in Apache.
    – Silkograph
    Sep 21 '19 at 13:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.