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

高洛峰
Release: 2023-03-04 17:56:01
Original
1449 people have browsed it

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
Copy after login

Install libmcrypt

# tar -xvzf libmcrypt-2.5.8.tar.gz
# cd libmcrypt-2.5.8
# ./configure --prefix-/usr/local/libmcrypt
# make && makeinstall
Copy after login

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
Copy after login

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
Copy after login

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
Copy after login

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();
?>
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!