一、下载解压

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. Centos下telnet的安装和配置

    Centos下telnet的安装和配置 首先为Centos配置地址(192.168.0.1/24) 一.查看本机是否有安装telnetrpm -qa | grep telnetrpm -q telne ...

  2. C#多线程编程之:异步事件调用

    当一个事件被触发时,订阅该事件的方法将在触发该事件的线程中执行.也就是说,订阅该事件的方法在触发事件的线程中同步执行.由此,存在一个问 题:如果订阅事件的方法执行时间很长,触发事件的线程被阻塞,长时间 ...

  3. 二、jdk命令之javah命令(C Header and Stub File Generator)

    目录 一.jdk工具之jps(JVM Process Status Tools)命令使用 二.jdk命令之javah命令(C Header and Stub File Generator) 三.jdk ...

  4. Bootstrap-Plugin:折叠(Collapse)插件

    ylbtech-Bootstrap-Plugin:折叠(Collapse)插件 1.返回顶部 1. Bootstrap 折叠(Collapse)插件 折叠(Collapse)插件可以很容易地让页面区域 ...

  5. c语言个人财务管理系统

    这个是我的一个网上朋友写的,仅供大家参考: 在这里留个记录 #include<stdio.h>#include<string.h>#define null 0#define m ...

  6. IDA python使用笔记

    pattern='20 E5 40 00' addr=MinEA() for x in range(0,5):     addr=idc.FindBinary(addr,SEARCH_DOWN,pat ...

  7. Nginx rewrite使用

    转自: https://www.cnblogs.com/czlun/articles/7010604.html

  8. 【转】TCP、UDP数据包大小的限制

    来自:https://blog.csdn.net/caoshangpa/article/details/51530685 1.概述 首先要看TCP/IP协议,涉及到四层:链路层,网络层,传输层,应用层 ...

  9. col标签的相关实验

    col上有width属性,如果对应值没有单位,默认是像素 <!DOCTYPE html> <html> <head> <title>col相关实验< ...

  10. cluster DNS

    [root@mhc1 dns]# pwd/root/test/k8s/kubernetes/cluster/addons/dns [root@mhc1 dns]# export DNS_SERVER_ ...