This page shows how to install PHP on CentOS 6 64bit.
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 root
yum -y install wget unzip man policycoreutils-python
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 '<html><head><title>PHP Test</title></head><body><?php phpinfo(); ?></body></html>' > /data/www/html/index.php
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