Key points of php compilation and installation

Source: Internet
Author: User
Tags mcrypt
Key points of php compilation and installation Php version:

Php-5.6.8.tar.bz2

Common parameters
-- Prefix =/usr/local/php # Location
-- With-mysql =/usr/local/mysql # php depends on mysql
-- With-openssl # openssl support
-- With-mysqli =/usr/local/mysql/bin/mysql_config # mysqli another php-mysql interaction method
-- With-freetype-dir # automatically reference the font on the webpage
-- With-jpeg-dir # image compression format
-- With-png-dir # Image storage format
-- With-zlib # common network format compression library
-- With-libxml-dir =/usr # libxml extension Markup Language Library
-- Enable-mbstring # supports Chinese characters or languages that are not expressed in one byte
-- Enable-xml
-- Enable-sockets # supports socket communication
-- With-mcrypt # mcrypt encryption extension
-- With-config-file-path =/etc # configuration file path/etc/php. ini
-- With-config-file-scan-dir =/etc/php. d # configuration file path/etc/php. d/*. ini
-- With-bz2 # compression format
-- With-apxs2 =/usr/local/apache/bin/apxs # Change to: -- enable-fpm in the mode of Fastcgi in the module mode

-- Enable-maintainer-zts # indicates that apache works in the thread mode, that is, the event/worker mode)

As an apache Module

1: configuration file

  • Cp php. ini-production/etc/php. ini

2: configuration file

In Fastcgi mode

1: php main configuration file

  • Cp php. ini-production/etc/php. ini # Check the fpm configuration file.

The following directories are relative to/usr/local/php:

2: Start the script sapi/f'p' m/init. d. php-fpm and copy it directly.

3: fpm configuration file/etc/php-fpm.conf.default, copy the name of the php-fpm.conf to the same path can be

Configure the fpm configuration file as needed and enable the pid file

Enable php-fpm

4: httpd configuration file

  • Enable reverse generation to enable the following two modules

Dedicated modules for Fastcgi after httpd 2.4

  • Turn on reverse proxy: send the request to another host to obtain the returned result.

ProxyPass: only URLs can be converted by proxy.

ProxyPassMatch: a regular expression can be used.


  • Other settings and modules are the same.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.