Installing Redis and Redis extensions under Linux

Source: Internet
Author: User
Tags php redis zts zend

installing redis

download redis

wget http://download.redis.io/releases/redis-2.8.3.tar.gz

Unzip

Tar xzf redis-2.8.3.tar.gz// into the extracted file

CD redis-2.8.3// compilation

Make

Installation Successful

Create a new folder yourself (any location)Mkdir/usr/redis

move redis.conf to the new directory

CP Redis.conf/usr/redis

re-enter the redis installation directory

Cd/redis-2.8.3/src

copy and move the three files to the folder you just created

CP Redis-server Redis-benchmark Redis-cli/usr/redis

End to here , redis installed .

You can test whether the installation was successful

Cd/usr/redis

manually start the redis service and then exit

./redis-server

running the redis client

./redis-cli

Set User root

Get user

Root

-------------

installing the php redis Extension

First download the PHP redis package

Address: Http://pecl.php.net/package/redis

What I download here is:redis-2.2.5.tgz

after the download is successful upload the file to/usr/local/php.

Unzip

TAR-ZXVF phpredis-2.2.5.tgz

Enter the extracted folder

CD phpredis-2.2.5.tgz

generating Configure configuration files with phpize

/usr/local/php/bin/phpize 

The contents are as follows

Configuring for:

PHP Api version:20131106

Zend Module Api no:20131226

Zend Extension Api no:220131226

Configuration

./configure--with-php-config=/usr/local/php/bin/php-config

Install compile make

Make install

return content as follows

Installing Shared extensions:/usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/

Enter to see if the installation was successful redis.so

cd/usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/

then configure php.ini

Vim/usr/local/php/etc/php.ini

Join

Extension=redis.so

: Wq

Restart php-fpm and Nginx | | Apache

and check your phpinfo .

Get!!

Installing Redis and Redis extensions under Linux

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.