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');
Check the error log~
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
.
http://www.bkjia.com/PHPjc/874115.htmlwww.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...