编译安装PHP及扩展

本文详细介绍了在Linux或Mac OS X环境下手动编译安装PHP及其扩展的步骤,包括下载PHP源码、配置编译选项、安装第三方扩展、配置ini文件、启动php-fpm等关键操作。
摘要由CSDN通过智能技术生成

一、安装PHP
1、下载PHP相应的版本 (http://php.net/
2、命令:tar zxvf +压缩包文件名 解压相应的文件
3、进入PHP版本文件 编译安装:

  • ./configure --prefix=/data/app/php72 --enable-fpm --with-fpm-user=syh --with-fpm-group=staff --disable-ipv6 --with-openssl=/usr/local/Cellar/openssl/1.0.2s --with-pcre-regex --with-zlib=/usr/local/Cellar/zlib/1.2.11 --enable-bcmath --with-curl --enable-exif --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --enable-gd-native-ttf --with-gettext --with-mhash --enable-mbstring --with-mcrypt --with-mysqli --enable-opcache --enable-pcntl --with-pdo-mysql --enable-sockets --with-iconv-dir=/usr/local/Cellar/libiconv/1.16 --with-iconv=/usr/local/opt/libiconv/ --with-libxml-dir --enable-zip --enable-mysqlnd --with-webp-dir=/usr/local/Cellar/webp/1.0.3 --without-gettext --enable-shmop

  • 注意编译扩展注意路径:

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值