centos6.2 installation of Redis and Phpredis extensions, pro-test

Source: Internet
Author: User
Tags zts install redis

To install Redis:

Download: http://www.redis.io/download

Redis-2.6.2.tar.gz

]# TAR-ZXF redis-2.6.2.tar.gz

]# CD redis-2.6.2

Direct compilation, no configuration required

] #make

Enter the SRC directory for installation

] #cd src && make install

Easy to manage, move related files

] #mkdir-P/usr/local/redis/bin

] #mkdir-P/usr/local/redis/etc

Move the files in the Redis directory you just unzipped.

]# mv/lamp/redis-2.6.2/redis.conf/usr/local/redis/etc

]# CD/LAMP/REDIS-2.6.2/SRC

]# mv mkreleasehdr.sh redis-benchmark redis-check-aof redis-check-dump redis-cli redis-server/usr/local/redis/bin

The file moved well is basically good, edit the Redis.con configuration file change the following to Yes

Daemonize Yes

To start Redis:

]#/usr/local/redis/bin/redis-server/usr/local/redis/etc/redis.conf

Go to the Redis console

]#/usr/local/redis/bin/redis-cli

OK, so I've got the Redis installed.

Installation of the Phpredis extension

Download: Https://github.com/nicolasff/phpredis

] #unzip Phpredis-master.zip

] #cd Phpredis-master

]#/usr/local/php/bin/phpize

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

] #make && make install

If there is a redis.so in this directory/usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/this step,

And then the editor php.ini.

] #vi/usr/local/php/etc/php.ini

#查找extension_dir, modified to

Extension_dir = "/usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/"//This step, I did not change this, using the default value can also

#添加redis

Extension = redis.so

The Nginx or Apache, PHP-FPM and so on the restart, see Phpinfo, the following description is OK

centos6.2 installation of Redis and Phpredis extensions, pro-test

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.