centos安装redis-3.2.3
这次介绍的是在虚拟机centos下安装redis-3.2.3
首先进入官网http://redis.io/download
我们可以进行下载 然后通过文件上传到centos下面 也可以直接在centis里面直接下载安装包
因为我的centos是刚新安装的 所以在运行
wget http://download.redis.io/releases/redis-3.2.3.tar.gz
出现了错误 wget: command not found
这个是因为我们没有安装了wget软件包
解决方法 yum -y install wget
当redis下载成功后
开始进行解压tar xzf redis-3.2.3.tar.gz
进入目录cd redis-3.2.3
系统没有安装gcc环境,需要安装gcc,为了方便,这里我选择用yum进行安装。
进行编译 make
解决方案 :yum install gcc
启动
src/redis-server
大致的流程就是这样的
下面截图 我的执行结果
这个是我的centos的网络ip 我采用一个工具xshell来连接centos的环境
解压编译
打开服务器
我们可以看到这个服务器已经打开了 后面打开了一个窗口 进入到了src下面
测试结果 ok
该命令可以查看 端口是否被占用
netstat -tunpl |grep 6379
查看redis的进程
ps -ef|gref redis
关闭服务器
./redis-cli shutdown pkill redis-server
![](data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAy8AAAA6CAIAAAA2vPHSAAARk0lEQVR4nO2d2YGrMAxF0xPtUAy9uBZKSR/vIyxarmwZSELm3fM18XiRZWHLC+bxeDGWeRoe24/ns4yPjWGaxX9x4DitP0zqYZrl77E8VbKiStKIuPufIsUwzU8vGC5p+aXyWf8cpnnJUwTWyChkzRjU76DqLkquctAq9BkklJHDt/uzjCZ4LGVailxaWQu6tZGSaizPUpwZ7fFtTfb0fe2uc4zydDWKrFu0jq2RLarTPq2gcagLC4WPbYkQQsiVjOW5oZynpwuHgcM0LwF+ZDnojclMRSxRfCUtGLTnadhzLEVEWENVYFNNdYX4ukcxk6o7n1z8R7tgT5tBVKPD2ObY3MBd+mcZN8mcNyYi2gYayzM22afLZzzU7irnMj7iPE2NIoZpnqepmBoh4XvltD5WkKf63xYWCE9vjBBCyOdoeIfkj/L5dr9y4ZEQQgj5fYapbNuXHCL/H77Z7vTGCCGEEM26QcMB8v/ie+1Ob4wQQgghhBBCCCGE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