前言:
如今我们对“centos7源码安装php7”大体比较关心,朋友们都需要了解一些“centos7源码安装php7”的相关知识。那么小编同时在网络上收集了一些对于“centos7源码安装php7””的相关知识,希望大家能喜欢,我们一起来学习一下吧!Step1. 手动安装php7
# yum install libpng-devel
# yum install libjpeg-devel
# yum install?libxml2
# yum install?libxml2-devel
# ./configure --prefix=/usr/local/php7 \
--with-gd \
--with-openssl \
--with-apxs2=/usr/local/apache/bin/apxs
# make
# make install
make install之后提示我执行下面这条
#?libtool --finish /usr/local/src/php-7.2.2/libs
Step2. 配置php
# cd /usr/local/php7/src/php-7.2.2/
# cp php.ini-development /usr/local/php7/lib/php.ini
检查httpd.conf配置文件
LoadModule php7_module modules/libphp7.so
SetHandler application/x-httpd-php
SetHandler application/x-httpd-php-source
尝试创建phpinfo.php文件,从浏览器打开看看安装是否成功
标签: #centos7源码安装php7