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