Install phpRedis extension notes under Fedora, fedoraredis_PHP tutorial

Source: Internet
Author: User
Tags php redis vc9
Install phpRedis extension notes under Fedora, fedoraredis. Install phpRedis extension notes under Fedora. fedoraredis 1. install the compilation tool and copy the code as follows: yuminstallwgetmakegccgcc-c ++ zlib-developensslopenssl-develpcre-devel Fedel install php Redis extension notes, fedoraredis

1. install the compilation tool

The 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

The code is as follows:


# Yum install redis php-redis

The installation is successful.

Start redis

The 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

The code is as follows:

#/Usr/bin/phpize

4. Compile and install

The code is as follows:


#./Configure -- with-php-config =/usr/bin/php-config
# Make & make install

5. add the installed redis. so Module

The code is as follows:


# Vim/etc/php. ini


6. restart apache or nginx

7. test

The 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.

Extends Redis extension notes, fedoraredis 1. install the compilation tool code as follows: yum install wget make gcc-c ++ zlib-devel openssl-devel pcre-devel...

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.