安装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
629

被折叠的 条评论
为什么被折叠?



