一、下载解压

wget http://download.redis.io/redis-stable.tar.gz
tar xvzf redis-stable.tar.gz
cd redis-stable

二、查看README

Where to find complete Redis documentation?
------------------------------------------- This README is just a fast "quick start" document. You can find more detailed
documentation at http://redis.io Building Redis
-------------- Redis can be compiled and used on Linux, OSX, OpenBSD, NetBSD, FreeBSD.
We support big endian and little endian architectures. It may compile on Solaris derived systems (for instance SmartOS) but our
support for this platform is "best effort" and Redis is not guaranteed to
work as well as in Linux, OSX, and *BSD there. It is as simple as: % make You can run a 32 bit Redis binary using: % make 32bit After building Redis is a good idea to test it, using: % make test Fixing build problems with dependencies or cached build options
—--------
Redis has some dependencies which are included into the "deps" directory.
"make" does not rebuild dependencies automatically, even if something in the
source code of dependencies is changes. When you update the source code with `git pull` or when code inside the
dependencies tree is modified in any other way, make sure to use the following
command in order to really clean everything and rebuild from scratch: make distclean This will clean: jemalloc, lua, hiredis, linenoise. Also if you force certain build options like 32bit target, no C compiler
optimizations (for debugging purposes), and other similar build time options,
those options are cached indefinitely until you issue a "make distclean"
command. Fixing problems building 32 bit binaries
--------- If after building Redis with a 32 bit target you need to rebuild it
with a 64 bit target, or the other way around, you need to perform a
"make distclean" in the root directory of the Redis distribution. In case of build errors when trying to build a 32 bit binary of Redis, try
the following steps: * Install the packages libc6-dev-i386 (also try g++-multilib).
* Try using the following command line instead of "make 32bit": make CFLAGS="-m32 -march=native" LDFLAGS="-m32" Allocator
--------- Selecting a non-default memory allocator when building Redis is done by setting
the `MALLOC` environment variable. Redis is compiled and linked against libc
malloc by default, with the exception of jemalloc being the default on Linux
systems. This default was picked because jemalloc has proven to have fewer
fragmentation problems than libc malloc. To force compiling against libc malloc, use: % make MALLOC=libc To compile against jemalloc on Mac OS X systems, use: % make MALLOC=jemalloc Verbose build
------------- Redis will build with a user friendly colorized output by default.
If you want to see a more verbose output use the following: % make V=1 Running Redis
------------- To run Redis with the default configuration just type: % cd src
% ./redis-server If you want to provide your redis.conf, you have to run it using an additional
parameter (the path of the configuration file): % cd src
% ./redis-server /path/to/redis.conf It is possible to alter the Redis configuration passing parameters directly
as options using the command line. Examples: % ./redis-server --port 9999 --slaveof 127.0.0.1 6379
% ./redis-server /etc/redis/6379.conf --loglevel debug All the options in redis.conf are also supported as options using the command
line, with exactly the same name. Playing with Redis
------------------ You can use redis-cli to play with Redis. Start a redis-server instance,
then in another terminal try the following: % cd src
% ./redis-cli
redis> ping
PONG
redis> set foo bar
OK
redis> get foo
"bar"
redis> incr mycounter
(integer) 1
redis> incr mycounter
(integer) 2
redis> You can find the list of all the available commands here: http://redis.io/commands Installing Redis
----------------- In order to install Redis binaries into /usr/local/bin just use: % make install You can use "make PREFIX=/some/other/directory install" if you wish to use a
different destination. Make install will just install binaries in your system, but will not configure
init scripts and configuration files in the appropriate place. This is not
needed if you want just to play a bit with Redis, but if you are installing
it the proper way for a production system, we have a script doing this
for Ubuntu and Debian systems: % cd utils
% ./install_server.sh The script will ask you a few questions and will setup everything you need
to run Redis properly as a background daemon that will start again on
system reboots. You'll be able to stop and start Redis using the script named
/etc/init.d/redis_<portnumber>, for instance /etc/init.d/redis_6379. Code contributions
--- Note: by contributing code to the Redis project in any form, including sending
a pull request via Github, a code fragment or patch via private email or
public discussion groups, you agree to release your code under the terms
of the BSD license that you can find in the COPYING file included in the Redis
source distribution. Please see the CONTRIBUTING file in this source distribution for more
information. Enjoy!

README

三、安装

make MALLOC=libc

可能需要

yum install gcc

yum install tcl

四、测试

make test

五、启动(src目录下)

./redis-server &

六、进入客户端模式

./redis-cli

七、存取

set mykey 123456

get mykey

八、关闭服务器

./redis-cli

shutdown

Redis Quick Start [熟练版]的更多相关文章

  1. Redis 3.0正式版发布,正式支持Redis集群

    Redis是一个开源.基于C语言.基于内存亦可持久化的高性能NoSQL数据库,同时,它还提供了多种语言的API.近日,Redis 3.0在经过6个RC版本后,其正式版终于发布了.Redis 3.0的最 ...

  2. 使用.NET简单实现一个Redis的高性能克隆版(二)

    译者注 该原文是Ayende Rahien大佬业余自己在使用C# 和 .NET构建一个简单.高性能兼容Redis协议的数据库的经历. 首先这个"Redis"是非常简单的实现,但是他 ...

  3. 使用.NET简单实现一个Redis的高性能克隆版(三)

    译者注 该原文是Ayende Rahien大佬业余自己在使用C# 和 .NET构建一个简单.高性能兼容Redis协议的数据库的经历. 首先这个"Redis"是非常简单的实现,但是他 ...

  4. 使用.NET简单实现一个Redis的高性能克隆版(四、五)

    译者注 该原文是Ayende Rahien大佬业余自己在使用C# 和 .NET构建一个简单.高性能兼容Redis协议的数据库的经历. 首先这个"Redis"是非常简单的实现,但是他 ...

  5. 使用.NET简单实现一个Redis的高性能克隆版(六)

    译者注 该原文是Ayende Rahien大佬业余自己在使用C# 和 .NET构建一个简单.高性能兼容Redis协议的数据库的经历. 首先这个"Redis"是非常简单的实现,但是他 ...

  6. 使用.NET简单实现一个Redis的高性能克隆版(七-完结)

    译者注 该原文是Ayende Rahien大佬业余自己在使用C# 和 .NET构建一个简单.高性能兼容Redis协议的数据库的经历. 首先这个"Redis"是非常简单的实现,但是他 ...

  7. Redis Quick Start [遇到问题解决问题版]

    http://redis.io/topics/quickstart make test 时的问题: 问题:gcc: Command not found 解决:yum install gcc [root ...

  8. Redis 主从配置(Windows版)

    安装从库 1.复制一份 Redis 文件,当做从库. 2.修改从库文件中 redis.windows.conf 的端口号. 3.安装服务,需要重新设置名称.然后去服务中,开启“redis6380”(此 ...

  9. 使用Spring Data Redis操作Redis(集群版)

    说明:请注意Spring Data Redis的版本以及Spring的版本!最新版本的Spring Data Redis已经去除Jedis的依赖包,需要自行引入,这个是个坑点.并且会与一些低版本的Sp ...

随机推荐

  1. 【monkeyrunner】monkeyrunner脚本录制和回放

    脚本录制 1.连接你已经打开调试模式的ANDROID设备或模拟器,输入adb devices 2.运行录制脚本.在cmd窗口输入 monkeyrunner recorder.py #recorder. ...

  2. ffmpeg+nginx+video实现rtsp流转hls流,通过H5查看监控视频

    一.FFmpeg下载:http://ffmpeg.zeranoe.com/builds/ 下载并解压FFmpeg文件夹,配置环境变量:在“Path”变量原有变量值内容上加上d:\ffmpeg\bin, ...

  3. java websocket @ServerEndpoint注解说明

    http://www.blogjava.net/qbna350816/archive/2016/07/24/431302.html https://segmentfault.com/q/1010000 ...

  4. mysql-5null值处理

    值为null遇到的问题: 1.使用select对数据进行处理时,如果有格值为null,该命令会无法正常工作.如示例一 2.使用where限定条件时,null值不能处理.如示例二 -- 新建一张表,并填 ...

  5. Mysql插入数据报错java.sql.SQLException: Incorrect string value: '\xF0\x9F\x93\x8D\xE6\x88...'

    今天读取solr里面的数据,往mysql插入时报错, Incorrect string value: '\xF0\x9F\x93\x8D\xE8\x88...' for column 'title'  ...

  6. pythonNet day07

    信号 一个进程向另外一个进程通过信号的方式传递某种讯息,接收方在接收到信号后作出相应的处理 查看信号:kill -l kill -signum PID 给PID的进程发送一个信号 信号名称:信号的名字 ...

  7. 0122(本来是想ak的但是因为智障只拿了200。)

    今天考了一场小测试,额,非常非常水,但是智障的我才A掉两道题. T1: 1.暑假作业   (mtime.pas/c/cpp) [问题描述] 暑假作业是必须要写的,越到假期结束前,写作业的效率就越高,小 ...

  8. J.U.C 整体认识

    深入浅出 Java Concurrency (1) : J.U.C的整体认识 去年年底有一个Guice的研究计划,可惜由于工作“繁忙”加上实际工作中没有用上导致“无疾而终”,最终只是完成了Guice的 ...

  9. MySQL GTID (一)

    MySQL GTID 系列之一 一.GTID相关概念 GTID:全局事务标识符,MySQL5.6版本开始在主从复制中推出的重量级特性. 每提交一个事务,当前执行线程都会拿到一个给定复制环境中唯一的GT ...

  10. JAVA_03

    在Java中,理解JDK.JRE.JVM三者的区别是十分重要的; JDK JDK是Java Development Kit(Java开发工具包)的缩写,包含JRE和其他开发工具. JRE JRE是Ja ...