Linux under the PHP installation Redis extension Method _ Server Other

Source: Internet
Author: User
Tags redis

The example in this article describes the Linux installation Redis extension of Php method. Share to everyone for your reference, specific as follows:

Note: Directory Permissions CHOMD 777-r

1. Installation Redis

Download: https://github.com/nicolasff/phpredis/archive/2.2.4.tar.gz

Upload phpredis-2.2.4.tar.gz to/usr/local/src directory

CD/USR/LOCAL/SRC #进入软件包存放目录
tar zxvf phpredis-2.2.4.tar.gz #解压
cd phpredis-2.2.4 #进入安装目录
/usr/local/php/ Bin/phpize #用phpize生成configure配置文件
./configure--with-php-config=/usr/local/php/bin/php-config #配置 make
# Compile make
install #安装

After the installation is complete, the following installation path appears

/usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/

2. Configure PHP Support

Vi/usr/local/php/etc/php.ini #编辑配置文件, add the following on the last line

Add to

extension= "Redis.so"

: wq! #保存退出

3 Restart Service

sudo service nginx restart
sudo/etc/init.d/php-fpm restart

I hope this article will help you with your Linux server configuration.

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.