This article describes how to install the phpRedis extension in ORA. This article uses the compilation and installation method to install the phpRedis extension. if you need it, refer to the next section to install the compilation tool.
yum install wget make gcc gcc-c++ zlib-devel openssl openssl-devel pcre-devel kernel keyutils patch perl
II. install redis php-redis
# yum install redis php-redis
The installation is successful.
Start redis
# 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
# /usr/bin/phpize
4. Compile and install
# ./configure --with-php-config=/usr/bin/php-config# make && make install
5. add the installed redis. so Module
# vim /etc/php.ini
6. restart apache or nginx
7. test
$redis = new Redis();$redis->connect('127.0.0.1',6379);$redis->set('test','hello world!');echo $redis->get('test');
For more articles about how to install php Redis extension notes under Fedora, refer to PHP Chinese network!