In this tutorial we will show you how to install and configuration of PHP 7.4 on CentOS 8. For those of you who didn’t know, PHP (PHP: Hypertext Preprocessor) is a server-side scripting language designed for web development but also used as a general-purpose programming language. PHP code is interpreted by a web server with a PHP processor module, which generates the resulting web page: PHP commands can be embedded directly into an HTML source document rather than calling an external file to process data.
This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple. I will show you through the step by step installation PHP 7.4 in CentOS 8 server.
Install PHP 7.4 on CentOS 8
Step 1. First let’s start by ensuring your system is up-to-date.
Step 2. Add EPEL and Remi Repositories.
You need to enable Remi and EPEL yum repositories on your system:
Now, enable php:remi-7.4 module to install PHP using the following command:
Once the PHP remi-7.4 module has been enabled, you can then proceed and install PHP using the command below:
Once it is completed, you can ensure that the latest stable release of PHP 7.4 is installed on your system by using the command:
# php -v
To test PHP, create a test file named info.php with he content below. Save the file, then browse to it to see if PHP is working:
Congratulation’s! You have successfully installed PHP 7. Thanks for using this tutorial for installing PHP 7.3 on your CentOS 8 system. For additional help or useful information, we recommend you to check the official PHP website.