php安装完后还需要安装一些常用的扩展,以下是php7版本的redis和yaf的安装:

1. 安装redis框架:

unzip phpredis-php7.zip

cd phpredis-php7

/app/php7.0.4/bin/phpize

./configure --with-php-config=/app/php7.0.4/bin/php-config

make

make install


2. 安装yaf框架:

wget https://pecl.php.net/get/yaf-2.3.5.tgz

tar zxvf yaf-2.3.5.tgz 

cd yaf-2.3.5/

/app/php7.0.4/bin/phpize

./configure --with-php-config=/app/php7.0.4/bin/php-config

make

make install


3. 编辑php.ini文件,在文件末尾添加以下命令:

extension = redis.so

extension = yaf.so


4. 使用以下命令重启服务并检查是否安装成功:

/server/scripts/php-fpm restart

php -m|grep redis

php -m|grep yaf