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