Linux installation php-7.0.16, complete PHP and Apache configuration
Version: php-7.0.16.tar.gz,libxml2-2.9.2.tar.gz (PHP needs its support, install it first)
Description: Install Apache blog, complete PHP and Apache configuration, on a blog address: http://blog.csdn.net/forrest_ou/article/details/60769087
LIBXML2 Download Address: www.xmlsoft.org
During the installation of libxml2-2.9.2.tar.gz, there were two errors about Python, because I didn't use it, I put him there, still installed in the OPT/DAAS/LAPW folder
PHP Download Address: www.xmlsoft.org
Install php-7.0.16.tar.gz
The third step: decompression, two times operation Gzip-d php-7.0.16.tar.gz
TAR-XF Php-7.0.16.tar
php-7.0.16 This folder is more than the folder
Step Fourth: Install, CD php-7.0.16, enter the php-7.0.16 folder, and then execute the following command
./CONFIGURE-PREFIX=/OPT/DAAS/LAPW/PHP7--WITH-LIBXML-DIR=/OPT/DAAS/LAPW/LIBXML2
--with-apxs2=/opt/daas/lapw/apache/bin/apxs
Make
Make Intall
Description:-PREFIX=/OPT/DAAS/LAPW/PHP7 Specifies the installation directory and installs the PHP7 folder under the LAPW folder
--WITH-LIBXML-DIR=/OPT/DAAS/LAPW/LIBXML2--with-apxs2=/opt/daas/lapw/apache/bin/apxs Specify dependencies
Step Fifth: Test whether the installation is successful, configure httpd.conf (apache/conf/httpd.conf) before testing, and modify the configuration in httpd.conf as follows
Search LoadModule, add later: LoadModule php7_module modules/libphp7.so (not added, will appear to run PHP file into download). followed by the add:
<filesmatch "\.ph (p[2-6]?| tml) $ ">
SetHandler Application/x-httpd-phpaddtype application/x-compress. Z
AddType application/x-gzip. GZ tgz
</FilesMatch>
Search for DirectoryIndex and add index.php to the back index.phtml
Found it
AddType application/x-compress. Z
AddType application/x-gzip. GZ tgz
Add at a later
AddType application/x-httpd-php. php
AddType Application/x-httpd-php-source. Php7
The above httpd.conf file modification complete
Add test file phpinfo.php to Apache/htdocs directory
Content of phpinfo.php:
<?php
Phpinfo ();
?>
Restart Apache, test the Apache path with/phpinfo.php before the browser is entered, and the PHP page appears to be installed successfully