Install PHP redis extension Note under Fedora, fedoraredis_php tutorial

Source: Internet
Author: User
Tags php redis vc9 install redis

Install PHP redis extension Note under Fedora, Fedoraredis


First, install the compilation tool
Copy the Code code as follows:
Yum install wget make gcc gcc-c++ zlib-devel OpenSSL openssl-devel pcre-devel kernel keyutils Patch Perl

Second, the installation of Redis Php-redis
Copy the Code code as follows:
# yum Install Redis Php-redis

So the installation is successful.

Start Redis
Copy the Code code as follows:
# sudo redis-server/etc/redis.conf

1. Download Php-redis Zip installation package

Https://github.com/nicolasff/phpredis

2. Find the PHP installation path

Command Whereis phpize and Whereis php-config find phpize and php-config paths

3. Generate Configure

Copy the Code code as follows: #/usr/bin/phpize

4. Compile and install
Copy the Code code as follows:
#./configure--with-php-config=/usr/bin/php-config
# Make && make install

5, add the installed redis.so module
Copy the Code code as follows:
# Vim/etc/php.ini

6. Restart Apache or Nginx

7. Testing

Copy the Code code as follows:
$redis = new Redis ();
$redis->connect (' 127.0.0.1 ', 6379);
$redis->set (' Test ', ' Hello world! ');
echo $redis->get (' Test ');


Adding Redis extensions to PHP

To see the error log ~

PHP Installation Redis extension error

Your PHP is VC6 compiled.

Your php_redis.dll is VC9 compiled.
Cause incompatibility.
Find a VC6 php_redis.dll.
Or
Reload PHP with a VC9
All can.

http://www.bkjia.com/PHPjc/874115.html www.bkjia.com true http://www.bkjia.com/PHPjc/874115.html techarticle Install the PHP redis extension Note under Fedora, Fedoraredis. Install the Compile tool copy code code as follows: Yum install wget make gcc gcc-c++ zlib-devel OpenSSL openssl-de Vel pcre-devel ...

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