首页  >  文章  >  后端开发  >  编译安装PHP的方法

编译安装PHP的方法

不言
不言原创
2018-04-28 15:42:202135浏览

这篇文章主要介绍了关于编译安装PHP的方法,有着一定的参考价值,现在分享给大家,有需要的朋友可以参考一下

编译安装PHP

#安装依赖
yum install gcc bison bison-devel zlib-devel libmcrypt-devel mcrypt mhash-devel openssl-devel libxml2-devel libcurl-devel bzip2-devel readline-devel libedit-devel sqlite-devel jemalloc jemalloc-devel

#进入解压后的php源码目录下
#编译命令,执行后在源码目录的父目录下生成编译后的子目录
./configure --prefix=/ \
--with-config-file-path=/ \--enable-inline-optimization \--disable-debug \--disable-rpath \--enable-shared \--enable-opcache \--enable-fpm \--with-mysqli \--with-pdo-mysql \--with-gettext \--enable-mbstring \--with-iconv \--with-mcrypt \--with-mhash \--with-openssl \--enable-bcmath \--enable-soap \--with-libxml-dir \--enable-pcntl \--enable-shmop \--enable-sysvmsg \--enable-sysvsem \--enable-sysvshm \--enable-sockets \--with-curl \--with-zlib \--enable-zip \--with-bz2 \--with-gd \--with-freetype-dir \--with-jpeg-dir \--with-png-dir##如果出现 libpng not found
yum install libpng
yum -y install libpng-devel


##如果出现 libjpeg not found
yum install libjpeg
yum -y install libjpeg-devel

##如果出现 freetype-config not found.
yum -y install freetype-devel.x86_64


#清理编译
make clean

#编译安装
make && make install
#或 
make all install

相关推荐:

yum安装php

           

以上是编译安装PHP的方法的详细内容。更多信息请关注PHP中文网其他相关文章!

声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn