Linux support Laravel and Apache PHP source code compilation

Source: Internet
Author: User
Tags apache php mcrypt php source code

Method:

1) wgethttp://mirrors.sohu.com/php/php-5.6.9.tar.gz

2) Enter the extracted PHP source directory, execute./configure--enable-fpm--enable-mbstring--with-apxs2=/usr/local/apache2/bin/apxs-- With-mcrypt--with-pdo_mysql--with-openssl--disable-fileinfo

3) Execute make && make install

Description

1)--ENABLE-FPM is designed to be able to start PHP php-fpm way, which can be better than php-cgi way to manage fastcgi. (The latter is easy to automatically hang up, pay special attention to the above configuration to write at once, if the individual in order to use PHP-FPM and just add --enable-fpm to compile a version, it is possible to make the compilation version inconsistency caused a lot of problems)

2)--with-apxs2=/usr/local/apache2/bin/apxs This is related to Apache, be sure to configure, so that the compilation of the resulting libphp5.so will automatically add to Apache over there.

3)--with-mcrypt--with-pdo_mysql--with-openssl These are the laravel necessary.

4)--disable-fileinfo to add, or compile may error: Virtual memory Exhausted:cannot Allocate memory

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Linux support Laravel and Apache PHP source code compilation

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.