Install Docker On Rhel 8



PHP is a popular open-source server-side scripting language that is integral in developing dynamic webpages. PHP 8.0 is finally out and was released on November 26th, 2020. It promises lots of improvements and optimizations which are set to streamline how developers write and interact with PHP code.

In this guide, you will learn how to install PHP 8.0 on CentOS 8/7 and RHEL 8/7.

Install Docker CE on CentOS 8 Option 1: Skip Packages with Broken Dependencies An efficient solution is to allow your CentOS 8 system to install the version that meets the criteria best, using the -nobest command. In this article I will share the steps to install GNMOE desktop to enable GUI mode in RHEL/CentOS 8 Linux. There are different GUI Desktop Environment in RHEL/CentOS 8. RHEL/CentOS 8 Desktop Environment. By default RHEL and CentOS 8 supports below GNOME Desktop Environments. Server with GUI; Workstation. Install Docker from Base Repository. Docker is available in the standard repository of CentOS, so we don’t have to search for the package. For RHEL 7, you must have a valid Redhat subscription to enable Extras rpm’s repository on the server. Start with the installation of the Apache Web server. We have a comprehensive guide on how to install Apache httpd on RHEL 8: How to Install Apache with modssl & modhttp2 on RHEL 8. If you need quick commands to install Apache on RHEL / CentOS 8, use below: sudo dnf -y install @httpd. Start and enable httpd service to start at boot.

Step 1: Enable EPEL and Remi Repository on CentOS/RHEL

Right off the bat, you need to enable the EPEL repository on your system. EPEL, short for Extra Packages for Enterprise Linux, is an effort from the Fedora team that provides a set of additional packages that are not present by default on RHEL & CentOS.

Rhel

Remi repository is a third-party repository that provides a wide range of PHP versions for RedHat Enterprise Linux. To install the Remi repository, run the command:

Step 2: Install PHP 8 on CentOS/RHEL

Once the installation is complete, proceed and list the available php module streams as shown:

Right at the bottom, be sure to notice the remi-8.0 php module.

We need to enable this module before installing PHP 8.0. To enable php:remi-8.0, execute:

Once enabled, install PHP 8.0 for Apache or Nginx web server as shown:

Install PHP 8.0 for Apache

To install PHP 8 on the installed Apache web server, run:

Install PHP 8.0 for Nginx

If you are using Nginx in your development stack, consider installing php-fpm as shown.

Setup Docker On Rhel 8

Install Docker On Rhel 8

Yum Install Docker On Centos 8

Step 3: Verify PHP 8.0 on CentOS/RHEL

There are two ways that you can use to verify the PHP version. On command-line, issue the command.

Additionally, you can create a sample php file in the /var/www/html folder as shown:

Then add the following PHP code which will populate the version of PHP alongside installed modules.

Install docker on rhel 8

Save and exit. Be sure to restart the Apache or Nginx web server as shown.

Next, head over to your browser and go to the address shown:

Install Docker On Rhel 8.3

Install docker on aws ec2 redhat 8

The webpage displays a wealth of information regarding the version of PHP installed such as build date, build system, Architecture, and a host of PHP extensions.

Step 3: Install PHP 8.0 Extensions in CentOS/RHEL

Install Docker Ee On Redhat 8

PHP extensions are libraries that provide added functionality to PHP. To install a php extension, use the syntax:

Installing Docker On Rhel 8

For example, to enable PHP to seamlessly work with MySQL, you can install the MySQL extension as shown.

Docker

Finally, you can verify the installed extensions using the command:

To verify if a specific extension is installed, execute:

For example:

In the end, we hope that you can now comfortably install PHP 8.0 alongside various php extensions on CentOS/RHEL 8/7.