配置apache2支持PHP7
Posted heshengjun
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了配置apache2支持PHP7相关的知识,希望对你有一定的参考价值。
[email protected]:/etc/apache2# sudo apt-get install libapache2-mod-php*
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting ‘libapache2-mod-php5filter‘ for glob ‘libapache2-mod-php*‘
Note, selecting ‘libapache2-mod-php‘ for glob ‘libapache2-mod-php*‘
Note, selecting ‘libapache2-mod-php5‘ for glob ‘libapache2-mod-php*‘
Note, selecting ‘libapache2-mod-phpfilter‘ for glob ‘libapache2-mod-php*‘
Note, selecting ‘libapache2-mod-php7.0‘ for glob ‘libapache2-mod-php*‘
Suggested packages:
php-pear
The following NEW packages will be installed:
libapache2-mod-php libapache2-mod-php7.0
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 1,232 kB of archives.
After this operation, 4,344 kB of additional disk space will be used.
Get:1 http://mirrors.aliyun.com/ubuntu xenial-updates/main amd64 libapache2-mod-php7.0 amd64 7.0.18-0ubuntu0.16.04.1 [1,229 kB]
Get:2 http://mirrors.aliyun.com/ubuntu xenial/main amd64 libapache2-mod-php all 1:7.0+35ubuntu6 [2,960 B]
Fetched 1,232 kB in 1s (1,058 kB/s)
Selecting previously unselected package libapache2-mod-php7.0.
(Reading database ... 111438 files and directories currently installed.)
Preparing to unpack .../libapache2-mod-php7.0_7.0.18-0ubuntu0.16.04.1_amd64.deb ...
Unpacking libapache2-mod-php7.0 (7.0.18-0ubuntu0.16.04.1) ...
Selecting previously unselected package libapache2-mod-php.
Preparing to unpack .../libapache2-mod-php_1%3a7.0+35ubuntu6_all.deb ...
Unpacking libapache2-mod-php (1:7.0+35ubuntu6) ...
Setting up libapache2-mod-php7.0 (7.0.18-0ubuntu0.16.04.1) ...
Creating config file /etc/php/7.0/apache2/php.ini with new version
Module mpm_event disabled.
Enabling module mpm_prefork.
apache2_switch_mpm Switch to prefork
apache2_invoke: Enable module php7.0
Setting up libapache2-mod-php (1:7.0+35ubuntu6) ...
[email protected]:/etc/apache2#
以上是关于配置apache2支持PHP7的主要内容,如果未能解决你的问题,请参考以下文章