Home >Backend Development >PHP Tutorial >Linux+php+apache+oracle environment construction: source code compilation and installation of PHP under CentOS
First you need to install the following installation packages. You can find the following installation packages in the CD-ROM data source. yum installation
yum install perl* freetype libpng* libxm2 libxm2-devel curl curl-devel libjpeg*
Manually download and install jpegsrc.v8c.tar libmcrypt-2.5.8.tar.gz
Install jpegsrc
# tar -xvzf jpegsrc.v8c.tar # cd jpeg-8c # ./configure --prefix=/usr/local/jpeg # make && make install
Install 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
Add after the LoadModule item:
LoadModule php5_module modules/libphp5.so
Add
AddType application/x-httpd-php .php .phtml AddType application/x-httpd-php-source .phps AddHandler application/x-httpd-php .php
between
<?php phpinfo(); ?>
Enter http://192.168.23.131/phpinfo.php