Fedora下安装php Redis扩展笔记
Redis  /  管理员 发布于 5年前   234
一、安装编译工具 这样就安装成功了 启动redis 1、下载php-redis zip安装包 https://github.com/nicolasff/phpredis 2、找到PHP安装路径 命令whereis phpize和whereis php-config 找到phpize和php-config路径 3、生成configure 4、编译安装 5、加入安装的redis.so模块 7、测试 122 在 123 在 原梓番博客 在 博主 在 1111 在
Copyright·© 2019 侯体宗版权所有·
粤ICP备20027696号
yum install wget make gcc gcc-c++ zlib-devel openssl openssl-devel pcre-devel kernel keyutils patch perl
二、安装redis php-redis
复制代码 代码如下:
# yum install redis php-redis
# sudo redis-server /etc/redis.conf
# ./configure --with-php-config=/usr/bin/php-config
# make && make install
# vim /etc/php.ini
6、重启apache或nginx
$redis = new Redis();
$redis->connect('127.0.0.1',6379);
$redis->set('test','hello world!');
echo $redis->get('test');
您可能感兴趣的文章: