php72 安装protobuf2扩展

安装PHP72的过程不细说,这个网上文档都有,在此可以简要列一下个人的安装过程,步骤不细述

系统:centos6 64位

yum -y install https://mirrors.tuna.tsinghua.edu.cn/remi/enterprise/remi-release-6.rpm
yum install php72-php-json php72-php-phpiredis php72-php-mysqlnd php72-runtime php72-php-common php72-php php72-php-pdo php72 php72-php-xml php72-php-cli php72-php-fpm php72-php-mbstring php72-php-pecl-zip php72-php-devel -y

我采用的protobuf2是allegro维护的版本,不是Google官网的,如果从Google官方维护的版本,可以从这个地址下载

git clone https://github.com/allegro/php-protobuf/
cd php-protobuf
/opt/remi/php72/root/usr/bin/phpize
./configure --with-php-config=/opt/remi/php72/root/usr/bin/php-config
make -j 4
make -j 4 install
# 然后编辑 /etc/opt/remi/php72/php.ini 文件,添加如下行
extension=/opt/remi/php72/root/usr/lib64/php/modules/protobuf.so

# 重载php72
/etc/init.d/php72-php-fpm reload

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值