Centos7安装Redis3.2.8
一、系统环境和版本说明
Redis的版本选取目前的官网版本redis-3.2.8
。
二、Redis的安装步骤
2.1 在线下载Redis的安装包
- [root@localhost lzh]# wget http://download.redis.io/releases/redis-3.2.8.tar.gz
- --2017-04-18 09:37:12-- http://download.redis.io/releases/redis-3.2.8.tar.gz
- 正在解析主机 download.redis.io (download.redis.io)... 109.74.203.151
- 正在连接 download.redis.io (download.redis.io)|109.74.203.151|:80... 已连接。
- 已发出 HTTP 请求,正在等待回应... 200 OK
- 长度:1547237 (1.5M) [application/x-gzip]
- 正在保存至: “redis-3.2.8.tar.gz”
- 100%[=====================================================>] 1,547,237 315KB/s 用时 5.6s
- 2017-04-18 09:37:20 (268 KB/s) - 已保存 “redis-3.2.8.tar.gz” [1547237/1547237])
2.2 解压下载Redis源码压缩包,生成新的目录redis-3.2.8
- $ tar xzf redis-3.2.8.tar.gz
2.3 进入目录,执行make编译
- $ cd redis-3.2.8
- $ make
- 需要一段时间编译,直到看到
注意:make命令执行完成编译后,会在src目录下生成6个可执行文件,分别是
redis-server、redis-cli、redis-benchmark、redis-check-aof、redis-check-rdb、redis-sentinel。
新版本 redis-check-dump改成redis-check-rdb
三、Redis安装配置
3.1 安装Redis,执行make install。会将make编译生成的6个可执行文件拷贝到/usr/local/bin目录下;
- [root@localhost redis-3.2.8]# make install
- cd src && make install
- make[1]: 进入目录“/home/lzh/redis-3.2.8/src”
- Hint: It's a good idea to run 'make test' ;)
- INSTALL install
- INSTALL install
- INSTALL install
- INSTALL install
- INSTALL install
- make[1]: 离开目录“/home/lzh/redis-3.2.8/src”
3.2 执行./utils/install_server.sh配置Redis配置之后Redis能随系统启动。执行期间会让你选择端口,文件名称等,我都选默认。
3.3 查看开机启动列表
- [root@localhost redis-3.2.8]# chkconfig --list
- 注意:该输出结果只显示 SysV 服务,并不包含原生 systemd 服务。SysV 配置数据可能被原生 systemd 配置覆盖。
- 如果您想列出 systemd 服务,请执行 'systemctl list-unit-files'。
- 欲查看对特定 target 启用的服务请执行
- 'systemctl list-dependencies [target]'。
- netconsole 0:关 1:关 2:关 3:关 4:关 5:关 6:关
- network 0:关 1:关 2:开 3:开 4:开 5:开 6:关
- redis_6379 0:关 1:关 2:开 3:开 4:开 5:开 6:关
四、Redis服务查看、开启、关闭
4.1 通过ps -ef|grep redis命令查看Redis进程
- [root@localhost redis-3.2.8]# ps -ef|grep redis
- root 12831 1 0 10:21 ? 00:00:01 /usr/local/bin/redis-server 127.0.0.1:6379
- root 13100 4090 0 10:29 pts/0 00:00:00 grep --color=auto redis
4.2 关闭Redis服务操作通过/etc/init.d/redis_6379 stop命令,也可通过(service redis_6379 stop)
4.3 开启Redis服务操作通过/etc/init.d/redis_6379 start命令,也可通过(service redis_6379 start)
也可以用redis-server命令启动
- $ src/redis-server
五、Redis测试
[root@localhost bin]# redis-cli
127.0.0.1:6379> flushdb --清空当前选择的数据库
OK
127.0.0.1:6379> set testkey 2
OK
127.0.0.1:6379> get testkey
"2"
Centos7安装Redis3.2.8的更多相关文章
- centos7安装redis3.0和phpredis扩展详细教程(图文)
整理一下centos7安装redis3.0和phpredis扩展的过程,有需要的朋友可以拿去使用. 一.安装redis3.0 1.安装必要的包 yum install gcc 2.centos7安装r ...
- centos7安装redis3.2.5
安装redis 1官方介绍 Installation Download, extract and compile Redis with: $ wget http://download.redis.io ...
- Centos7 安装redis3.2.3 过程
1:安装wget: yum install wget2:安装pip: 1:sudo yum -y install epel-release 2:sudo yum -y install py ...
- centOS7 安装redis-3.2.6
0.下载tar.gz包并解压到某个位置,然后cd进入解压后的目录(redis-3.2.6)下 1.安装 make MALLOC=libc 关于为什么这样做,参考redis-3.2.6目录下的READM ...
- centos7安装redis3.2.5集群
安装参照 https://blog.csdn.net/mingliangniwo/article/details/54600640 https://blog.csdn.net/u013820 ...
- Centos7安装Redis3.X
本文只是简单搭建Redis,为了整合ELK用,后面会详细写. Redis:REmote DIctionary Server(远程字典服务器) 是完全开源免费的,用C语言编写的,遵守BSD协议,是一个高 ...
- centos7安装redis3.2.12
1.准备安装包,放在/usr/local/src/ 2.解压安装包,解压到/usr/local/ tar zxf redis-3.2.12.tar.gz -C /usr/local/ 3.cd /us ...
- centos7安装PHP7的redis扩展
前言: 在本篇博客中,我将给大家介绍如何在Centos7上安装PHP-Redis扩展,关于如何在Centos上安装redis的,可以参考另外一篇博客:Centos7安装redis 想要在php中操作r ...
- HP服务器 hp 360g5 centos7安装问题
HP服务器 hp 360g5 centos7安装问题 一 :启动盘无法识别硬盘 1.进入安装光盘,用上下键选择安装centos--Install Centos7(注意不可按Enter键),如图: 2 ...
随机推荐
- 鹅场offer已Get,下周签约,终于能静下心来总结总结
2015年9月20号下午,接到腾讯总部的电话,确定了offer相关信息,算是正式get了鹅场的offer,坐等下个周一周二的签约会. 心路篇 2015年2月:已经2月份了,自己在大学的时光已经来到了比 ...
- 使用JCrop进行图片裁剪,裁剪js说明,裁剪预览,裁剪上传,裁剪设计的图片处理的工具类和代码
1.要想制作图片裁剪功能,可以使用网上的裁剪工具JCrop,网址是:https://github.com/tapmodo/Jcrop/ 案例效果如下: 2.引入JCrop的js代码,具体要引入那 ...
- Learning ROS for Robotics Programming Second Edition学习笔记(十) indigo Gazebo rviz slam navigation
中文译著已经出版,详情请参考:http://blog.csdn.net/ZhangRelay/article/category/6506865 moveit是书的最后一章,由于对机械臂完全不知,看不懂 ...
- 从硬件竞争到软实力PK——电视媒体竞争观察
本文观点及数据摘自中广研究<三网融合月度精粹>第26期(2013年2月版),详细参考对应在线简版(http://doc.sarft.net/index.php?f=2013/02/2013 ...
- 如何解决Asp.Net中不能上传压缩文件的问题
在使用Asp.Net自带的服务器端控件Fileupload上传文件时,可能会出现不能上传压缩文件的问题,此时可以通过下面的方法解决: 在<system.web>中添加: <httpR ...
- CMake命令行添加编译参数
CMake命令行添加编译参数 学习自 coroserver 例程: https://github.com/windoze/coroserver coroserver 是一个应用 Boost.Asio ...
- 【nginx】4xx,5xx 保持自定义header
问题 nginx使用中,如果请求返回的状态code类似404或者50x这种,仍然返回自定义的header. 分析和解决 nginx文档中关于 add_header的部分 有这么一句 Adds the ...
- 在linux下搭建STM32工程
转载自康神博客:http://blog.csdn.net/u013298300/article/details/50243935 在LINUX下开始一个STM32工程 在LINUX下开始一个STM32 ...
- ubuntu下ruby文件执行蛋疼的一个问题
ubuntu下面用sublime打开非常简单的一段代码(其实不算代码,因为没有实际语句): #!/usr/bin/ruby 在shell下加入x权限:chmod u+x doit.rb,然后运行 ./ ...
- CentOS 7 下安装mosquitto
简介 MQTT(Message Queuing Telemetry Transport,消息队列遥测传输)是IBM开发的一个即时通讯协议,有可能成为物联网的重要组成部分.该协议支持所有平台,几乎可以把 ...