======Install PHP======
This page shows how to install PHP on CentOS 6 64bit.
=====Prerequisites=====
You must have a CentOS machine already set up in accordance with the the "[[Install CentOS 6]]" guide.
If you have only installed the minimal system, you will have to run the following command as rootyum -y install wget unzip man policycoreutils-python
=====Install PHP=====
yum -y install php php-mysql php-common php-gd php-mbstring php-soap php-xml
Restart the Apache web server
service httpd restart
If you want to test the installation, run the following command as root and then visit http://hostname/index.php
echo 'PHP Test' > /data/www/html/index.php
=====Install APC for PHP Caching=====
When installing MediaWiki, you may want to install APC.
Install Dependency Packages for APC
yum install -y php-pear php-devel httpd-devel pcre-devel php-intl gcc make
Install APC Using PECL. Accept defaults when asked questions (just press enter)
pecl install apc
Enable APC PHP Extension
echo "extension=apc.so" > /etc/php.d/apc.ini
Restart the Apache web server
service httpd restart