环境: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的更多相关文章

  1. Linux安装redis服务器

    Linux安装redis服务器 初次接触,这里简单的说下我遇到的情况以及安装方法,当然也是参考了诸位大神的. 确定虚拟机的主机IP. 1)首先需要一个linux虚拟机,确定虚拟机的ip ,输入命令:# ...

  2. Linux 安装Redis<准备>(使用Mac远程访问)

    阅读本文需要一定的Linux基础 一 Redis简介 redis是用c语言编写的一款开源的高性能键值对(key-value)数据库 它通过提供多种键值数据类型来适应不同场景下的存储需求 二 Redis ...

  3. 1.Linux安装redis

    Linux安装redis 操作系统是Centos7 1.下载压缩包 2.解压 3.编译 4.启动redis 5.设置redis.conf和防火墙端口开放,外网可以访问 1.下载压缩包 下载地址:htt ...

  4. Linux安装redis服务器和部署

    Linux安装redis和部署 第一步:下载安装包 wget http://download.redis.io/releases/redis-5.0.5.tar.gz 访问https://redis. ...

  5. 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"问题 ...

  6. 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 ...

  7. Linux安装Redis步骤和make遇到的坑

    Linux安装Redis服务步骤 1.获取redis资源 ​​​​​​​cd /usr/local wget https://mirrors.huaweicloud.com/redis/redis-6 ...

  8. linux安装redis(转)

    一.Redis介绍 Redis是当前比较热门的NOSQL系统之一,它是一个key-value存储系统.和Memcache类似,但很大程度补偿了Memcache的不足,它支持存储的value类型相对更多 ...

  9. linux安装redis操作

    redis官网地址:http://www.redis.io/ 最新版本:2.8.3 在Linux下安装Redis非常简单,具体步骤如下(官网有说明): 1.下载源码,解压缩后编译源码. $ wget ...

  10. linux安装redis ,mariadb

    linux下安装软件方法 1 rpm (不推荐使用) 2 yum 安装(非常方便快捷) 3 编译安装(需要自定制的时候才使用) 安装mariadb(mysql) 1 使用官方源安装mariadb vi ...

随机推荐

  1. [Architecture Pattern] Singleton Locator

    [Architecture Pattern] Singleton Locator 目的 组件自己提供Service Locator模式,用来降低组件的耦合度. 情景 在开发系统时,底层的Infrast ...

  2. playframework中多附件上传注意事项

    playframework中多附件上传注意事项 2013年09月24日 play 暂无评论 //play版本问题 经确认,1.0.3.2版本下控制器中方法参数  List<File> fi ...

  3. webservice 的wsdl文件生成客户端java类

    提供两个方法: 第一个: 发布webservice项目后, 地址栏地址  http://localhost:8888/lxitedu.webservice.cxf-ch2/services/userS ...

  4. ListView嵌套出现的问题

    项目中一个列表子项中也需要用到列表,这就不由得使我想到ListView的嵌套,其实这个东西想想也只是复杂了一点,并没有什么难的地方,可是却依然在这里狠狠滴栽个跟头.问题出在子列表动态展开的操作上.可能 ...

  5. 关灯游戏源码(iOS)

    就是点一下灯 它本身和周围4盏灯会变色 ViewController.m文件 #import "ViewController.h" #import "UIView+cha ...

  6. iOS UIWebView和网页的交互(OC中调执行JS)

    UIWebView和网页的交互(OC中调执行JS)- (void)viewDidLoad{[super viewDidLoad];// 1.webViewUIWebView *webView = [[ ...

  7. iOS开发笔记12:iOS7上UITextField限制字数输入导致崩溃问题

    在一些场景中,需要限制用户的输入字数,例如在textField里进行控制(textView也类似,崩溃原因也相同),如图所示 系统会监听文本输入,需要注意的第一点是输入法处于联想输入还未确定提交的时候 ...

  8. iOS之地理位置及定位系统 -- 入门笔记(用Swift)

    前言:关于地理位置及定位系统,在iOS开发中也比较常见,比如美团外面的餐饮店铺的搜索,它首先需要用户当前手机的位置,然后在这个位置附近搜索相关的餐饮店铺的位置,并提供相关的餐饮信息,再比如最常见的就是 ...

  9. C++中的常量折叠

    先看例子: #include <iostream> using namespace std; int main() { ; int * p = (int *)(&a); *p = ...

  10. celery 快速入门教程 celery 定时器

    当然首先得安装celery和rabbitmq-server,如果有redis需要安装redis 安装Redis $ yum install redis 启动 Redis $redis-server 检 ...