March 28, 2024
How-to-install-php7.4-on-centos7

How To Install PHP 7.4 on CentOS 7

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 🙂

Vedant Kumar

Currently I'm working as an Implementation Engineer, Started my career as an System Administrator - Linux. Additionally loves to explore new technologies and research about new open-source software that ease the development cycle.

View all posts by Vedant Kumar →

9 thoughts on “How To Install PHP 7.4 on CentOS 7

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.

close

Ad Blocker Detected!

VEDANT EXPLAINS
We've noticed that you are using an ad blocker. Advertising helps fund our server cost and keep it truly independent. It helps to build our content creator team. So please disable your ad blocker, and help us to keep providing you with free- great content - for free. Thank you for your support.

Refresh