Linux PHP Redis Extensions installation

Source: Internet
Author: User

Installing the Redis service side

1 access to the software download path
Cd/soft
wget http://download.redis.io/redis-stable.tar.gz
TAR-ZXVF redis-stable.tar.gz
CD redis-stable.tar.gz
Make
Make install

Start Redis
/usr/local/bin/redis-server/etc/redis/6379.conf
Available NETSTAT–ATLN View port is a successful boot installation
Netstat–atln | grep 6379

Turn off Redis
/usr/local/bin/redis-cli-h 127.0.0.1-p 6379 shutdown

/usr/local/bin/redis-cli-h 127.0.0.1-p 6379 to interact
Set name MyName
Get Name

PHP Installation Redis Extensions
2 PHP Installation Redis extensions support Redis
wget https://github.com/nicolasff/phpredis/downloads
TAR-ZXVF phpredis-2.2.4.tar.gz
CP Phpredis-2.2.4/usr/local/php5.3/ext
cd/usr/local/php5.3/ext/phpredis-2.2.4
/opt/app4www/php5.3/bin/phpize
./configure--with-php-config=/usr/local/php5.3/bin/php-config
Make
Make install

Edit php.ini file Join
Extension=redis.so

Restart PHP-FPM
KILL-USR2 ' Cat/usr/local/php5.3/var/run/php-fpm.pid '
Re-start Nginx

See if Redis is supported in Phpinfo

Linux PHP Redis Extensions installation

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.