- Download PHP Source: http://php.net/downloads.php (currently the latest version 5.6.7)
- TAR-XF Php-xx.tar
- CD PHP-XX
- ./configure--with-apxs2=/usr/local/apache2/bin/apxs--with-mysql
See all configurable options: 1. Run the autoconf command after running the PHP source code directory./configure--help
2. See GNU Configure:http://www.airs.com/ian/configure/
5. Make
6. Make Install
7. CP php.ini FILE: CP Php.ini-development/usr/local/bin/php.ini
8. Edit the httpd.conf file to make sure the Loadmodules php5_module modules/libphp5.so available
9. Tell Apache to parse the file for a specific extension into PHP. For example, Add. php:
Added in httpd.conf: <filesmatch \.php$>
SetHandler application/x-httpd-php
</FilesMatch>
10. Restart Apache:service httpd-k restart or/usr/local/apache2/bin/apachectl-k restart
Reference Document: PHP Official document Http://php.net/manual/zh/install.unix.apache2.php
Lamp installation note of the source code to install PHP