Home > Backend Development > PHP Tutorial > Notes on installing php Redis extension under Fedora, fedoraredis_PHP tutorial

Notes on installing php Redis extension under Fedora, fedoraredis_PHP tutorial

WBOY
Release: 2016-07-13 10:19:28
Original
777 people have browsed it

Notes on installing php Redis extension under Fedora, fedoraredis

1. Install compilation tools

Copy code The code is as follows:

yum install wget make gcc gcc-c++ zlib-devel openssl openssl-devel pcre-devel kernel keyutils patch perl

2. Install redis php-redis
Copy code The code is as follows:

# yum install redis php-redis

The installation is successful

Start redis

Copy code 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

Copy code The code is as follows:
# /usr/bin/phpize

4. Compile and install

Copy code The code is as follows:

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

5. Add the installed redis.so module

Copy code The code is as follows:

# vim /etc/php.ini

6. Restart apache or nginx

7. Test

Copy code The code is as follows:

$redis = new Redis();
$redis->connect('127.0.0.1',6379);
$redis->set('test','hello world!');
echo $redis->get('test');

php adds redis extension

Check the error log~

php installation redis extension error

Your php is compiled with VC6

Your php_redis.dll is compiled with VC9
leading to incompatibility.
Find a VC6 php_redis.dll
or
reinstall a VC9 php
.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/874115.htmlTechArticleNotes on installing php Redis extension under Fedora, fedoraredis 1. Install the compilation tool and copy the code. The code is as follows: yum install wget make gcc gcc-c++ zlib-devel openssl openssl-devel pcre-devel...
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template