1、安装redis编译的c环境

yum install gcc-c++

2、将redis-5.0.5.tar.gz上传到/usr/local下

3、解压redis-5.0.5.tar.gz

tar -zxvf redis-5.0.5.tar.gz

4、进入redis-5.0.5目录 使用make命令编译redis

make

5、在redis-5.0.5目录中使用make PREFIX=/usr/local/redis install命令安装redis到/usr/local/redis中

make PREFIX=/usr/local/redis install

6、拷贝redis-5.0.5中的redis.conf到安装目录redis中

cd /usr/local/redis-5.0.5
cp redis.conf /usr/local/redis/bin/

修改redis.conf文件中daemonize为yes

vim redis.conf

7、启动redis在bin下执行命令

./redis-server redis.conf

查看进程

ps aux|grep redis

停止进程

pkill redis

8、进入客户端操作,在bin下执行命令

./redis-cli

9、关闭客户端操作,在bin下执行命令

./redis-cli shutdown

10、远程链接

./redis-cli –h 192.168.74.135 –p 6379

 

posted on 2019-06-29 21:43  df-xfz  阅读(114)  评论(0编辑  收藏  举报