ubuntu安装php的redis扩展

下载安装扩展

首先下载包,http://pecl.php.net/package/redis

sudo aptitude install php5-dev
sudo wget http://pecl.php.net/get/redis-2.2.5.tgz
sudo tar zxf redis-2.2.5.tgz 
cd redis-2.2.5/
sudo phpize
sudo ./configure
sudo make
sudo make install

修改ini配置

sudo vim /etc/php5/fpm/conf.d/redis.ini

extension=redis.so

测试运行

sudo php5-fpm -t
sudo php5-fpm -m
sudo service php5-fpm reload

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax

*

code