How To Install PHP on Centos

by lifeLinux on November 25, 2010

PHP: Hypertext Preprocessor is a widely used, general-purpose scripting language that was originally designed for web development to produce dynamic web pages. For this purpose, PHP code is embedded into the HTML source document and interpreted by a web server with a PHP processor module, which generates the web page document. As a general-purpose programming language, PHP code is processed by an interpreter application in command-line mode performing desired operating system operations and producing program output on its standard output channel. It may also function as a graphical application. PHP is available as a processor for most modern web servers and as a standalone interpreter on most operating systems and computing platforms. (

PHP works with apache, lighttpd, nignx and other webservers and PHP is very easy to install.

Installing PHP on CentOS

if you would like to install PHP on CentOS use yum command

yum install php

Updating PHP on CentOS

if you would like to update PHP on CentOS use yum command

yum update php

Install & Update PHP latest version

Default the system will be installed php with stable version, but if you wanted to install or update PHP with latest version then you need to create /etc/yum.repos.d/centos-test.repo and enter following lines in it:

name=CentOS-5 Testing

Related Posts:

Previous post:

Next post: