Linux安装Redis
环境:Centos 6.2
redis是当前比较热门的NOSQL系统之一,它是一个key-value存储系统。和Memcached类似,但很大程度补偿了memcached的不足,它支持存储的value类型相对更多,包括string、list、set、zset和hash。这些数据类型都支持push/pop、add/remove及取交集并集和差集及更丰富的操作。在此基础上,redis支持各种不同方式的排序。Redis数据都是缓存在计算机内存中,并且会周期性的把更新的数据写入磁盘或者把修改操作写入追加的记录文件。
redis官网地址:http://www.redis.io/
1、下载文件
http://download.redis.io/releases/redis-2.8.3.tar.gz
redis-2.8.3.tar.gz文件下载成功后上传至/usr/local
2、安装
[root@localhost local]# mkdir /usr/local/redis
[root@localhost local]#tar xzf redis-2.8.3.tar.gz
[root@localhost local]#cd redis-2.8.3
[root@localhost redis-2.8.3]#make
3、编译完成后,在Src目录下,有三个可执行文件redis-server、redis-benchmark、redis-cli。然后拷贝到一个目录下。
[root@localhost redis-2.8.3]# cd src
[root@localhost src]# cp redis-server /usr/local/redis
[root@localhost src]# cp redis-benchmark /usr/local/redis
[root@localhost src]# cp redis-cli /usr/local/redis
4、启动服务器的服务
[root@localhost src]# cd /usr/local/redis
[root@localhost redis]# ll
total 13688
-rwxr-xr-x. 1 root root 4156999 Jan 1 23:26 redis-benchmark
-rwxr-xr-x. 1 root root 4229443 Jan 1 23:27 redis-cli
-rwxr-xr-x. 1 root root 5627506 Jan 1 23:26 redis-server
[root@localhost redis]# ./redis-server
[4445] 01 Jan 23:28:56.519 # Warning: no config file specified, using the default config. In order to specify a config file use ./redis-server /path/to/redis.conf
[4445] 01 Jan 23:28:56.520 * Max number of open files set to 10032
_._
_.-``__ ''-._
_.-`` `. `_. ''-._ Redis 2.8.3 (00000000/0) 64 bit
.-`` .-```. ```\/ _.,_ ''-._
( ' , .-` | `, ) Running in stand alone mode
|`-._`-...-` __...-.``-._|'` _.-'| Port: 6379
| `-._ `._ / _.-' | PID: 4445
`-._ `-._ `-./ _.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' | http://redis.io
`-._ `-._`-.__.-'_.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' |
`-._ `-._`-.__.-'_.-' _.-'
`-._ `-.__.-' _.-'
`-._ _.-'
`-.__.-'
[4445] 01 Jan 23:28:56.543 # Server started, Redis version 2.8.3
[4445] 01 Jan 23:28:56.544 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
[4445] 01 Jan 23:28:56.544 * The server is now ready to accept connections on port 6379
5、然后用客户端测试一下是否启动成功。(打开另外一个终端运行,redis客户端)
[root@localhost redis]# cd /usr/local/redis
[root@localhost redis]# ./redis-cli
127.0.0.1:6379> set foo bar
OK
127.0.0.1:6379> get foo
"bar"
127.0.0.1:6379>
Linux安装Redis的更多相关文章
- Linux安装redis服务器
Linux安装redis服务器 初次接触,这里简单的说下我遇到的情况以及安装方法,当然也是参考了诸位大神的. 确定虚拟机的主机IP. 1)首先需要一个linux虚拟机,确定虚拟机的ip ,输入命令:# ...
- Linux 安装Redis<准备>(使用Mac远程访问)
阅读本文需要一定的Linux基础 一 Redis简介 redis是用c语言编写的一款开源的高性能键值对(key-value)数据库 它通过提供多种键值数据类型来适应不同场景下的存储需求 二 Redis ...
- 1.Linux安装redis
Linux安装redis 操作系统是Centos7 1.下载压缩包 2.解压 3.编译 4.启动redis 5.设置redis.conf和防火墙端口开放,外网可以访问 1.下载压缩包 下载地址:htt ...
- Linux安装redis服务器和部署
Linux安装redis和部署 第一步:下载安装包 wget http://download.redis.io/releases/redis-5.0.5.tar.gz 访问https://redis. ...
- Linux安装Redis,在测试阶段即make test出现“You need tcl 8.5 or newer in order to run the Redis test”问题解决方案
Linux安装Redis,在测试阶段即make test出现"You need tcl 8.5 or newer in order to run the Redis test"问题 ...
- Linux安装Redis 6.0.5 ./install_server.sh报错
Linux安装Redis 6.0.5 ./install_server.sh报错 linux 安装Redis6.0.5时 进行到./install_server.sh时报错, This systems ...
- Linux安装Redis步骤和make遇到的坑
Linux安装Redis服务步骤 1.获取redis资源 cd /usr/local wget https://mirrors.huaweicloud.com/redis/redis-6 ...
- linux安装redis(转)
一.Redis介绍 Redis是当前比较热门的NOSQL系统之一,它是一个key-value存储系统.和Memcache类似,但很大程度补偿了Memcache的不足,它支持存储的value类型相对更多 ...
- linux安装redis操作
redis官网地址:http://www.redis.io/ 最新版本:2.8.3 在Linux下安装Redis非常简单,具体步骤如下(官网有说明): 1.下载源码,解压缩后编译源码. $ wget ...
- linux安装redis ,mariadb
linux下安装软件方法 1 rpm (不推荐使用) 2 yum 安装(非常方便快捷) 3 编译安装(需要自定制的时候才使用) 安装mariadb(mysql) 1 使用官方源安装mariadb vi ...
随机推荐
- request.getRequestDispatcher()的两个方法forward()/include()!!!
RequestDispatcher rd = request.getRequestDispatcher("/MyServlet");请求转发: rd.forward( reques ...
- spring task定时器笔记
定时器有两种方式 1.延迟启动 <bean id="timerTaskRunnerChain" class="bingo.uam.task.TimerTaskRun ...
- Oracle计算时间差函数
两个Date类型字段:START_DATE,END_DATE,计算这两个日期的时间差(分别以天,小时,分钟,秒,毫秒): 天: ROUND(TO_NUMBER(END_DATE - START_DAT ...
- RecyclerView和ScrollView嵌套使用
我们的recyclerView有多个layoutmanager,通过重写layoutmanager的方法就可以让recyclerView和ScrollView嵌套了.但是请注意,如果recyclerV ...
- android 圆角按钮和按钮颜色
1. android 设置圆角按钮后,按下按钮后,还能改变按钮的颜色 <?xml version="1.0" encoding="UTF-8"?> ...
- iOS阅读器实践系列(一)coretext纯文本排版基础
前言:之前做了公司阅读类的App,最近有时间来写一下阅读部分的实现过程,供梳理逻辑,计划会写一个系列希望能涉及到尽量多的方面与细节,欢迎大家交流.吐槽.拍砖,共同进步. 阅读的排版用的是coretex ...
- android 显示意图
//显示意图 public void enter(View view) { Intent intent = new Intent();//创建一个空的意图 intent.setClassName(ge ...
- windows 编程中的常见bug
错误 1 : error LNK2001: 无法解析的外部符号 _WTSQueryUserToken@8 解决办法: ——>查看链接器->输入->附加依赖项,依照debug模 ...
- 监听spring加载完成后事件
有这个想法是在很早以前了,那时的我没有接触什么缓存技术,只知道hibernate有个二级缓存.没有用过memcache,也没有使用过redis. 只懂得将数据放到数组里或者集合里,一直不去销毁它(只有 ...
- du df 查看文件和文件夹大小
http://www.cnblogs.com/benio/archive/2010/10/13/1849946.html du -h df -h du -h --max-depth=1 // 查看当 ...