php 安装yar扩展

git:https://github.com/laruence/yar

先克隆 如果没有 git 需要先安装

yum install git

然后 克隆

git clone https://github.com/laruence/yar.git

然后 进入yar 目录

cd yar

开始编译安装

phpize
 ./configure --with-php-config=/usr/bin/php-config
make && make install

然后把扩展添加到 php配置文件中

cd /etc/php.d
vim yar.ini

写入:

extension=yar.so

保存退出。

重启php nginx

原文地址:https://www.cnblogs.com/phpshen/p/6223260.html