标签:with git dev unp bsp 配置 local bin dash
下载:wget http://download.redis.io/releases/redis-5.0.5.tar.gz
解压:tar -zxvf redis-5.0.5.tar.gz
进入redis目录
指定安装目录:make PREFIX=/usr/local/redis install
复制配置:
cd redis-5.0.5
mkdir -p /usr/local/redis/etc
cp redis.conf /usr/local/redis/etc
启动脚本:
vim utils/redis_init_script 修改:
制作软链:ln -s /usr/local/redis/etc/redis.conf /etc/redis/6379.conf
cp redis_init_script /etc/init.d/redis
启动:/etc/init.d/redis start
自启动redis需要修改conf文件:
vim /etc/redis/6379.conf
查看redis是否启动:netstat -tunpl | grep 6379
系统重启后,启动redis:
vim /etc/init.d/redis
输入命令:
chkconfig --add redis
chkconfig redis on
service redis stop
service redis start
php –m : 查看php目前的扩展
php的redis扩展:https://github.com/phpredis/phpredis
下载:wget https://github.com/phpredis/phpredis/archive/develop.zip
解压:unzip
进入目录打:phpize
运行:./configure --with-php-config=/usr/local/php/bin/php-config
安装:make && make install
存放位置:
将路径加入php.ini:
vim /www/server/php/71/etc/php.ini
extension_dir = "/www/server/php/71/lib/php/extensions/no-debug-non-zts-20160303/"
extension=redis.so
重启php
标签:with git dev unp bsp 配置 local bin dash
原文地址:https://www.cnblogs.com/jackzhuo/p/11888301.html