---
title: "ubuntu 12.04 安装redis"
author: "SwordShadow"
date: "2013-12-15T21:30:52Z"
tags: ["DB", "Linux", "NoSQL", "Redis"]
categories: ["开源软件"]
slug: "ubuntu-12-04-redis"
draft: false
lastmod: "2013-12-16T19:43:29Z"
id: 1990018
url: "https://swordshadow.iteye.com/blog/1990018"
---

Redis是一个开源的,免费的,基于内存、键值对存储数据库，相比于memcached只支持简单的值，Redis支持非常丰富的值集，其中包括字符串、列表、集以及散列。最新的稳定版为2.8.3

 

安装十分简单，根据官网的示例

下载：

 

```
$ wget http://download.redis.io/releases/redis-2.8.3.tar.gz
$ tar xzf redis-2.8.3.tar.gz
$ cd redis-2.8.3
$ make
$ sudo make install   #这时Redis的可执行文件被放到了/usr/local/bin
```

 

 

启动服务：

 

```
$ src/redis-server
```

启动成功后会输出 

 

**The server is now ready to accept connections on port 6379**

 

打开客户端

 

```
$ src/redis-cli
redis> set foo bar
OK
redis> get foo
"bar"
```

 

快速入门：[http://redis.io/topics/quickstart](http://redis.io/topics/quickstart)

 

 

 不得不感叹下linux对于开发人员来说的功能强大，可惜桌面太渣，阻碍了linux桌面的普及