Home  >  Article  >  Backend Development  >  Linux+php+apache+oracle environment construction: source code compilation and installation of PHP under CentOS

Linux+php+apache+oracle environment construction: source code compilation and installation of PHP under CentOS

高洛峰
高洛峰Original
2017-01-10 14:38:231404browse

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

Linux+php+apache+oracle environment construction: source code compilation and installation of PHP under CentOS

Add

AddType application/x-httpd-php .php .phtml
AddType application/x-httpd-php-source .phps
AddHandler application/x-httpd-php .php

between

Linux+php+apache+oracle environment construction: source code compilation and installation of PHP under CentOSLinux+php+apache+oracle environment construction: source code compilation and installation of PHP under CentOS

##Restart the Apache service


Execute the command# apachectl restart


Test PHP


Write the probe file in the site root directory


# vi phpinfo.php

Input:

<?php
phpinfo();
?>

Linux+php+apache+oracle environment construction: source code compilation and installation of PHP under CentOS

Enter http://192.168.23.131/phpinfo.php


in the browser address bar to display the following information : Indicates that PHP is installed successfully.


Linux+php+apache+oracle environment construction: source code compilation and installation of PHP under CentOS

For more related articles on source code compilation and installation of PHP under CentOS under Linux+php+apache+oracle environment construction, please pay attention to the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn