1、进入指定目录,将redis安装包扔过去,在此之前,安装上传下载插件

命令:yum  install  lrzsz -y   执行安装lrzsz程序
命令:rz  上传redis安装文件
 
2、解压redis压缩文件
命令:tar -zxvf redis-3.2.8.tar.gz
 
3、由于解压后的文件为  .c  .h后缀,属于C语言工程文件,所以必须进行编译成linux识别文件。
命令:cd redis-3.2.8/deps/ 
命令:make geohash-int hiredis jemalloc linenoise lua
 
4、安装redis install
命令:make && make install
 
5、设置使用的 redis.conf  将绑定的127.0.0.1地址解除绑定。如不解除,将会限制外网其他IP的访问
命令:vi redis.conf (打开进入文件)
命令:protected-mode no(关闭绑定)
保存并退出
命令:    “:wq!”
 
6、如果启动后,外网不能访问,检查是否防火墙未关闭。或者端口被限制
1 关闭防火墙-----service iptables stop
2 启动防火墙-----service iptables start
3 重启防火墙-----service iptables restart
4 查看防火墙状态--service iptables status
5 永久关闭防火墙--chkconfig iptables off
6 永久关闭后启用--chkconfig iptables on
 
7、运行redis,在src目录下执行
命令:src/redis-server  redis.conf
8、查看redis运行状态
命令:ps -ef | grep redis
posted on 2017-03-16 10:51  请叫我端东、  阅读(513)  评论(0编辑  收藏  举报