You will need to install the following installation packages, which can be found in the CD-ROM data source. Yum Installation
Yum install perl* freetype libpng* libxm2 libxm2-devel Curl Curl-devel libjpeg*
Manual Download Installation Jpegsrc.v8c.tar libmcrypt-2.5.8.tar.gz
Installing JPEGSRC
# TAR-XVZF jpegsrc.v8c.tar# cd jpeg-8c#./configure--prefix=/usr/local/jpeg# make && make install
Installing Libmcrypt
# TAR-XVZF libmcrypt-2.5.8.tar.gz# cd libmcrypt-2.5.8#./configure--prefix-/usr/local/libmcrypt# Make && Makeinstall
Install PHP
# TAR-XVZF php-5.5.10.tar.gz# cd php-5.5.10#./configure--prefix=/usr/local/php-with-apxs2=/usr/local/httpd/bin/ Apxs--with-curl--with-mcrypt--with-mbstring# make && make install
Configure Apache to support PHP
Modify the/usr/local/apache/conf/httpd.conf file
After the LoadModule entry, add:
LoadModule Php5_module modules/libphp5.so
Join in between <ifmodule mime_module></ifmodule>
AddType application/x-httpd-php. php. Phtmladdtype application/x-httpd-php-source. Phpsaddhandler application/ x-httpd-php. php
Restart Apache Service
Execute Command # apachectl restart
Test PHP
Writing probe files under the site root directory
# VI phpinfo.php
Input:
<?phpphpinfo ();? >
Browser address bar Input http://192.168.23.131/phpinfo.php
Displays the following information: The PHP installation was successful.