Q. How do I install PHP under Red Hat enterprise Linux?
A. PHP (Hypertext Preprocesso) is a server-side web programming language that you can embed into HTML pages. When a user accesses a PHP-based page, PHP dynamically creates a web page that is then passed to the browser.
PHP works with Apache, Lighttpd and other webservers. PHP offers built-in database integration for several commercial and non-commercial database management systems. It also has the ability to perform many useful Web-related tasks using a large set of built-in functions.
PHP generally runs on a web server, taking PHP code as its input and creating Web pages as output, but command-line scripting and client-side GUI applications are part of the three primary uses of PHP as well. PHP can be deployed on any web server and on almost every OS platform free of charge.
Installing PHP is easy these days.
Red Hat enterprise Linux PHP installation
If you would like to install or upgrade PHP use up2date command:
# up2date php
CentOS/Fedora core Linux PHP installation
If you would like to install PHP use yum command
# yum install php
If you would like to upgrade PHP use yum command
# yum update php
Debian / Ubentu Linux PHP installation
If you would like to install or upgrade PHP use atp-get command
# apt-get install php4-cgi php4-cli
# sudo apt-get install php4-cgi php4-cli
To install PHP 5
# apt-get install php5-cgi php5-cli
# sudo apt-get install php5-cgi php5-cli
FreeBSD PHP installation
Use pkg_add command as follows:
# pkg_add -v -r php
Use above command to install Apache or Lighttpd web server.Tweet itFacebook itGoogle+ itPDF itFound an error/typo on this page?