This is short guide on how to install PHP 7.4 on CentOS 7 Server. PHP 7.4.8 has been released for the stabilization version for the developers and for the users to test.
PHP 7.4 comes with the remarkable new features and improvement. You can check out the full list of features and additions on the official RFC page.
Now let’s start with the installation process:-
Step 1: Add EPEL and REMI Repository
Run the following commands below to add php 7 repositories.
sudo yum -y install https://rpms.remirepo.net/enterprise/remi-release-7.rpm
Step 2: Enable PHP 7.4 Remi repository.
Run the following command below to enable PHP 7.4 Remi repository
sudo yum -y install yum-utils sudo yum-config-manager --enable remi-php74
Step 3: Install PHP 7.4 on CentOS 7
sudo yum update sudo yum install php php-cli
Accept installation prompt.
Now you have successfully installed PHP 7.4 on your CentOS 7 Server.
Inorder to install the additional packages you can the caommand as follows:
sudo yum install php-xyz
Inorder to install the most common packages then you use the following command:-
sudo yum install php php-cli php-fpm php-mysqlnd php-zip php-devel php-gd php-mcrypt php-mbstring php-curl php-xml php-pear php-bcmath php-json
To check the version of the PHP use the folowing command
$ php -v PHP 7.4.8 (cli) (built: Jul 06 2020 20:13:36) ( NTS ) Copyright (c) The PHP Group Zend Engine v3.4.0, Copyright (c) Zend Technologies
You have sucessfully install PHP 7.4 on your CentOS 7 server. Enjoy your php development 🙂