Install php Redis extension notes under Fedora, fedoraredis

Source: Internet
Author: User

Install php Redis extension notes under Fedora, fedoraredis

1. Install the compilation tool
Copy codeThe Code is as follows:
Yum install wget make gcc-c ++ zlib-devel openssl-devel pcre-devel kernel keyutils patch perl

Ii. Install redis php-redis
Copy codeThe Code is as follows:
# Yum install redis php-redis

The installation is successful.

Start redis
Copy codeThe Code is as follows:
# Sudo redis-server/etc/redis. conf

1. Download the php-redis zip installation package

Https://github.com/nicolasff/phpredis

2. Find the PHP installation path.

Command whereis phpize and whereis php-config to find the phpize and php-config paths

3. Generate configure

Copy codeThe Code is as follows: #/usr/bin/phpize

4. Compile and install
Copy codeThe Code is as follows:
#./Configure -- with-php-config =/usr/bin/php-config
# Make & make install

5. Add the installed redis. so Module
Copy codeThe Code is as follows:
# Vim/etc/php. ini

6. Restart apache or nginx

7. Test

Copy codeThe Code is as follows:
$ Redis = new Redis ();
$ Redis-> connect ('2017. 0.0.1 ', 127 );
$ Redis-> set ('test', 'Hello world! ');
Echo $ redis-> get ('test ');


Add redis extension in php

Check the error log ~

An error occurred while installing redis extension in php.

Your php is compiled by VC6.

Your php_redis.dll is compiled by VC9.
This causes incompatibility.
Find php_redis.dll of VC6.
Or
Reinstall php of VC9
Yes.

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.