php7.2 fpm,php-7.2.8 fpm compile

php-7.2.8 fpm compile

配置

./configure \

--prefix=/usr/local/services/php-7.2.8 \

--with-libxml-dir=/usr/local/services/libxml2 \

--with-openssl=/usr/local/services/openssl \

--with-pdo-mysql \

--enable-mbstring \

--enable-sockets \

--enable-pcntl \

--enable-sysvmsg \

--enable-sysvsem \

--enable-sysvshm \

--enable-soap \

--enable-shmop \

--enable-bcmath \

--enable-zip \

--enable-calendar \

--enable-ctype \

--enable-dom \

--enable-filter \

--enable-hash \

--enable-json \

--enable-posix \

--enable-shared \

--enable-simplexml \

--enable-static \

--enable-tokenizer \

--enable-xml \

--enable-xmlwriter \

--enable-pdo \

--enable-fpm \

--enable-mysqlnd

编译

make -j 2

安装

make install

待选项 todo

--enable-inline-optimization

--enable-maintainer-zts

--enable-gd-native-ttf

--with-gd=/usr/local/services/libgd

--with-freetype-dir=/usr/local/services/freetype

--with-png-dir=/usr/local/services/libpng

--with-jpeg-dir=/usr/local/services/jpeg

以扩展的方式编译 gd 库

gd 依赖 libpng、jpegsrc、freetype 库

注意这种安装方式和 php builtin 编译有些不同

builtin 方式,需要先将 gd 的库编译完成,之后才能编译 php

扩展的方式,直接进入 php-src/ext/gd 编译即可,不需要单独编译(为什么?)

安装图片依赖

brew install zlib jpeg libpng libjpeg freetype

编译扩展

cd /data/src/php-7.2.8/ext/gd

phpize

./configure --with-php-config=/usr/local/services/php7/bin/php-config \

--with-freetype-dir=/usr/local/Cellar/freetype/2.9.1 \

--with-jpeg-dir=/usr/local/Cellar/jpeg/9c \

--with-png-dir=/usr/local/Cellar/libpng/1.6.35

make

cp modules/gd.so /usr/local/services/php7/extensions/

修改配置

php.ini 加载 gd.so

启动 php-fpm

配置

cd /usr/local/services/php/etc

mv php-fpm.conf.default php-fpm.conf

mv php-fpm.d/www.conf.default php-fpm.d/www.conf

启动

sudo /usr/local/services/php/sbin/php-fpm

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值