You can get simple and understandable steps to install PHP on CentOS. Before we move into the installation, let’s have a brief look on PHP.
What is this PHP? Let me tell you. PHP means Hypertext Processor, which is a programming language for web development. You can create dynamic web page contents or images as you wish.
CentOS is a Community Enterprise Operating System. It is an open-source platform for non-productive developmental work. For production concern, those works can be migrated to RHEL (Payable) Linux distribution platform.
For now, we can focus on PHP 5.6, which will be the basic version widely used. Later will explain to you how to install any version of PHP on CentOS.
Let’s have a quick look on PHP 5.6 features and versions available.
Reduced Memory, due to the reuse of
By default PHP 5.4 version is available in CentOS software package repositories. But we can update packages with latest versions of PHP.
Complete Version list of PHP -> PHP 1.0 , PHP 2.0, PHP 3.0, PHP 4.0, PHP 4.1, PHP 4.2, PHP 4.3, PHP 4.4, PHP 5.0, PHP 5.1, PHP 5.2, PHP , PHP 5.3, PHP 5.4, PHP 5.5, PHP 5.6, PHP 6.X, PHP 7.0, PHP 7.1, PHP 7.2, PHP 7.3, PHP 7.4, PHP 8.0.
Please make sure that remi:repo file was enable. i.e Enable=1 (inside remi:repo file) .
Next point is to check the package was having required version for installation.
Here We Go:
Let’s start the installation. The first click on the browser window, you could see the terminal and start executing the below commands in the mentioned order.
Type the below command to install the rpm release packages. This will help you to install the packages of PHP version you wish to install.
Next important step will be the utilities. This
Enter ‘y’ after the utils command execution completed.
Next step will be the most important program provided by utilities is configuration manager, through which the activation of ‘Remi repository’ will happen. This will be the default manipulating repository settings provided by utilities. This will help us to install any version of PHP.
In the end of command you can see two digits, which represents the version number.
Eg: 56 for PHP 5.6 , 74 for PHP 7.4
Below command will enable you the selected version.
We are going to install the PHP of required version. You can use any extension from the list given below with respect to your library files.
Finally, To make sure that you have enabled correct version, use below command and check the version.
After Installation of PHP:
To check the installation, First you can restart your apache package, using below command.
Here you go…!! We successfully installed the PHP on CentOS.
You can now start working on PHP!!
Today, we learned about “What is PHP”, “Basics of PHP and CentOS
Hope it helped you in an easy way to install PHP with more understanding. Please let us know in the comment section if you have any concern.
You can also share with your friends, who need to install PHP.
Thanks for your time, to know about me.
Hello I Am Vijay Poshiya. 🙂
Here’s My little description of your attention on Me and My blog. I am here to help you with PHP programming. I can give you a cake walkthrough platform where a complex program can make it easier for you. I will also provide you with the rare collections of task sets over the internet.
I hope you will find your solutions in better understanding shape within my blog.
You can read more about PHPAdvices at the “About” page.