Compile php parameters at a time

Source: Internet
Author: User
Tags mcrypt

1.

First compile and install apache2 in/home/nouse

2.

Compile php under/home/nouse

. /Configure -- prefix =/home/nouse/php -- with-apxs2 =/home/nouse/apache2/bin/apxs -- with-mysql =/usr/lib64/mysql -- with-curl = /home/curl -- with-config-file-path =/home/php/etc -- enable-ftp -- enable-bz2 -- with-gettext -- enable-calendar -- enable-mbstring -- enable- bcmatch -- enable-sockets -- enable-exif -- enable-soap -- enable-sysvmsg -- enable-wddx -- with-openssl =/usr -- with-gd -- with-jpeg-dir =/ usr -- with-png-dir =/usr -- with-mcrypt =/usr/local/lib -- with-freetype-dir =/usr/local/include -- enable-zip


Note: The parameter locations of prefix and apxs2 must be specified to/home/nouse. This folder does not play a major role in generating libphp. so

3.

Save apache2/modules/libphp5.so

4.

Php for compilation

Parameters except prefix and apxs2 are different. For example

. /Configure -- prefix =/home/php -- with-apxs2 =/usr/bin/apxs2 -- with-mysql =/usr/lib64/mysql -- with-curl =/home/curl -- -config-file-path =/home/php/etc -- enable-ftp -- enable-bz2 -- with-gettext -- enable-calendar -- enable-mbstring -- enable-bcmatch -- enable-sockets -- enable-exif -- enable-soap -- enable-sysvmsg -- enable-wddx -- with-openssl =/usr -- with-gd -- with-jpeg-dir =/usr -- with-png- dir =/usr -- with-mcrypt =/usr/local/lib -- with-freetype-dir =/usr/local/include -- enable-zip

5.

Overwrite libphp. so to/usr/lib/apache2/modules.

6.

Place the php. ini-dist in the php source package under/home/php/etc to load the configuration file.


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.