1、Redis的获取与安装,目前最新稳定版本为4.0.10
- Redis: https://redis.io/download
- GitHub: https://github.com/antirez/redis
- Google Code: https://code.google.com/p/redis/downloads/list?can=1
- Windows :https://github.com/dmajkic/redis/downloads
2、Redis版本号命名规则
主版本号.次版本号.补丁版本号
在次版本号的位置上,偶数代表稳定发布版本,如2.8,3.2,4.0,奇数代表测试版本
3、下载源码后,编译安装即可
##以centos7.4 x64bit为例
$ wget http://download.redis.io/releases/redis-4.0.10.tar.gz
$ tar xzf redis-4.0..tar.gz
$ cd redis-4.0.
$ make
4、安装过程
0x00-上传源码,解压
[root@centos7 ~]# ls
all.sql Desktop Downloads Music Public Templates
anaconda-ks.cfg Documents initial-setup-ks.cfg Pictures redis-4.0..tar.gz Videos [root@centos7 ~]# tar -xvf redis-4.0..tar.gz
redis-4.0./
redis-4.0./.gitignore
redis-4.0./-RELEASENOTES
redis-4.0./BUGS
redis-4.0./CONTRIBUTING
redis-4.0./COPYING
redis-4.0./INSTALL
redis-4.0./MANIFESTO
redis-4.0./Makefile
redis-4.0./README.md
redis-4.0./deps/
redis-4.0./deps/Makefile
redis-4.0./deps/README.md
redis-4.0./deps/hiredis/
redis-4.0./deps/hiredis/.gitignore
redis-4.0./deps/hiredis/.travis.yml
redis-4.0./deps/hiredis/CHANGELOG.md
redis-4.0./deps/hiredis/COPYING
redis-4.0./deps/hiredis/Makefile
redis-4.0./deps/hiredis/README.md
redis-4.0./deps/hiredis/adapters/
redis-4.0./deps/hiredis/adapters/ae.h
redis-4.0./deps/hiredis/adapters/glib.h
redis-4.0./deps/hiredis/adapters/ivykis.h
redis-4.0./deps/hiredis/adapters/libev.h
redis-4.0./deps/hiredis/adapters/libevent.h
redis-4.0./deps/hiredis/adapters/libuv.h
redis-4.0./deps/hiredis/adapters/macosx.h
redis-4.0./deps/hiredis/adapters/qt.h
redis-4.0./deps/hiredis/appveyor.yml
redis-4.0./deps/hiredis/async.c
redis-4.0./deps/hiredis/async.h
redis-4.0./deps/hiredis/dict.c
redis-4.0./deps/hiredis/dict.h
redis-4.0./deps/hiredis/examples/
redis-4.0./deps/hiredis/examples/example-ae.c
redis-4.0./deps/hiredis/examples/example-glib.c
redis-4.0./deps/hiredis/examples/example-ivykis.c
redis-4.0./deps/hiredis/examples/example-libev.c
redis-4.0./deps/hiredis/examples/example-libevent.c
redis-4.0./deps/hiredis/examples/example-libuv.c
redis-4.0./deps/hiredis/examples/example-macosx.c
redis-4.0./deps/hiredis/examples/example-qt.cpp
redis-4.0./deps/hiredis/examples/example-qt.h
redis-4.0./deps/hiredis/examples/example.c
redis-4.0./deps/hiredis/fmacros.h
redis-4.0./deps/hiredis/hiredis.c
redis-4.0./deps/hiredis/hiredis.h
redis-4.0./deps/hiredis/net.c
redis-4.0./deps/hiredis/net.h
redis-4.0./deps/hiredis/read.c
redis-4.0./deps/hiredis/read.h
redis-4.0./deps/hiredis/sds.c
redis-4.0./deps/hiredis/sds.h
redis-4.0./deps/hiredis/sdsalloc.h
redis-4.0./deps/hiredis/test.c
redis-4.0./deps/hiredis/win32.h
redis-4.0./deps/jemalloc/
redis-4.0./deps/jemalloc/.autom4te.cfg
redis-4.0./deps/jemalloc/.gitattributes
redis-4.0./deps/jemalloc/.gitignore
redis-4.0./deps/jemalloc/COPYING
redis-4.0./deps/jemalloc/ChangeLog
redis-4.0./deps/jemalloc/INSTALL
redis-4.0./deps/jemalloc/Makefile.in
redis-4.0./deps/jemalloc/README
redis-4.0./deps/jemalloc/VERSION
redis-4.0./deps/jemalloc/autogen.sh
redis-4.0./deps/jemalloc/bin/
redis-4.0./deps/jemalloc/bin/jemalloc-config.in
redis-4.0./deps/jemalloc/bin/jemalloc.sh.in
redis-4.0./deps/jemalloc/bin/jeprof.in
redis-4.0./deps/jemalloc/config.guess
redis-4.0./deps/jemalloc/config.stamp.in
redis-4.0./deps/jemalloc/config.sub
redis-4.0./deps/jemalloc/configure
redis-4.0./deps/jemalloc/configure.ac
redis-4.0./deps/jemalloc/coverage.sh
redis-4.0./deps/jemalloc/doc/
redis-4.0./deps/jemalloc/doc/html.xsl.in
redis-4.0./deps/jemalloc/doc/jemalloc.
redis-4.0./deps/jemalloc/doc/jemalloc.html
redis-4.0./deps/jemalloc/doc/jemalloc.xml.in
redis-4.0./deps/jemalloc/doc/manpages.xsl.in
redis-4.0./deps/jemalloc/doc/stylesheet.xsl
redis-4.0./deps/jemalloc/include/
redis-4.0./deps/jemalloc/include/jemalloc/
redis-4.0./deps/jemalloc/include/jemalloc/internal/
redis-4.0./deps/jemalloc/include/jemalloc/internal/arena.h
redis-4.0./deps/jemalloc/include/jemalloc/internal/atomic.h
redis-4.0./deps/jemalloc/include/jemalloc/internal/base.h
redis-4.0./deps/jemalloc/include/jemalloc/internal/bitmap.h
redis-4.0./deps/jemalloc/include/jemalloc/internal/chunk.h
redis-4.0./deps/jemalloc/include/jemalloc/internal/chunk_dss.h
redis-4.0./deps/jemalloc/include/jemalloc/internal/chunk_mmap.h
redis-4.0./deps/jemalloc/include/jemalloc/internal/ckh.h
redis-4.0./deps/jemalloc/include/jemalloc/internal/ctl.h
redis-4.0./deps/jemalloc/include/jemalloc/internal/extent.h
redis-4.0./deps/jemalloc/include/jemalloc/internal/hash.h
redis-4.0./deps/jemalloc/include/jemalloc/internal/huge.h
redis-4.0./deps/jemalloc/include/jemalloc/internal/jemalloc_internal.h.in
redis-4.0./deps/jemalloc/include/jemalloc/internal/jemalloc_internal_decls.h
redis-4.0./deps/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h.in
redis-4.0./deps/jemalloc/include/jemalloc/internal/jemalloc_internal_macros.h
redis-4.0./deps/jemalloc/include/jemalloc/internal/mb.h
redis-4.0./deps/jemalloc/include/jemalloc/internal/mutex.h
redis-4.0./deps/jemalloc/include/jemalloc/internal/pages.h
redis-4.0./deps/jemalloc/include/jemalloc/internal/private_namespace.sh
redis-4.0./deps/jemalloc/include/jemalloc/internal/private_symbols.txt
redis-4.0./deps/jemalloc/include/jemalloc/internal/private_unnamespace.sh
redis-4.0./deps/jemalloc/include/jemalloc/internal/prng.h
redis-4.0./deps/jemalloc/include/jemalloc/internal/prof.h
redis-4.0./deps/jemalloc/include/jemalloc/internal/public_namespace.sh
redis-4.0./deps/jemalloc/include/jemalloc/internal/public_unnamespace.sh
redis-4.0./deps/jemalloc/include/jemalloc/internal/ql.h
redis-4.0./deps/jemalloc/include/jemalloc/internal/qr.h
redis-4.0./deps/jemalloc/include/jemalloc/internal/quarantine.h
redis-4.0./deps/jemalloc/include/jemalloc/internal/rb.h
redis-4.0./deps/jemalloc/include/jemalloc/internal/rtree.h
redis-4.0./deps/jemalloc/include/jemalloc/internal/size_classes.sh
redis-4.0./deps/jemalloc/include/jemalloc/internal/stats.h
redis-4.0./deps/jemalloc/include/jemalloc/internal/tcache.h
redis-4.0./deps/jemalloc/include/jemalloc/internal/tsd.h
redis-4.0./deps/jemalloc/include/jemalloc/internal/util.h
redis-4.0./deps/jemalloc/include/jemalloc/internal/valgrind.h
redis-4.0./deps/jemalloc/include/jemalloc/jemalloc.sh
redis-4.0./deps/jemalloc/include/jemalloc/jemalloc_defs.h.in
redis-4.0./deps/jemalloc/include/jemalloc/jemalloc_macros.h.in
redis-4.0./deps/jemalloc/include/jemalloc/jemalloc_mangle.sh
redis-4.0./deps/jemalloc/include/jemalloc/jemalloc_protos.h.in
redis-4.0./deps/jemalloc/include/jemalloc/jemalloc_rename.sh
redis-4.0./deps/jemalloc/include/jemalloc/jemalloc_typedefs.h.in
redis-4.0./deps/jemalloc/include/msvc_compat/
redis-4.0./deps/jemalloc/include/msvc_compat/C99/
redis-4.0./deps/jemalloc/include/msvc_compat/C99/stdbool.h
redis-4.0./deps/jemalloc/include/msvc_compat/C99/stdint.h
redis-4.0./deps/jemalloc/include/msvc_compat/strings.h
redis-4.0./deps/jemalloc/include/msvc_compat/windows_extra.h
redis-4.0./deps/jemalloc/install-sh
redis-4.0./deps/jemalloc/jemalloc.pc.in
redis-4.0./deps/jemalloc/src/
redis-4.0./deps/jemalloc/src/arena.c
redis-4.0./deps/jemalloc/src/atomic.c
redis-4.0./deps/jemalloc/src/base.c
redis-4.0./deps/jemalloc/src/bitmap.c
redis-4.0./deps/jemalloc/src/chunk.c
redis-4.0./deps/jemalloc/src/chunk_dss.c
redis-4.0./deps/jemalloc/src/chunk_mmap.c
redis-4.0./deps/jemalloc/src/ckh.c
redis-4.0./deps/jemalloc/src/ctl.c
redis-4.0./deps/jemalloc/src/extent.c
redis-4.0./deps/jemalloc/src/hash.c
redis-4.0./deps/jemalloc/src/huge.c
redis-4.0./deps/jemalloc/src/jemalloc.c
redis-4.0./deps/jemalloc/src/mb.c
redis-4.0./deps/jemalloc/src/mutex.c
redis-4.0./deps/jemalloc/src/pages.c
redis-4.0./deps/jemalloc/src/prof.c
redis-4.0./deps/jemalloc/src/quarantine.c
redis-4.0./deps/jemalloc/src/rtree.c
redis-4.0./deps/jemalloc/src/stats.c
redis-4.0./deps/jemalloc/src/tcache.c
redis-4.0./deps/jemalloc/src/tsd.c
redis-4.0./deps/jemalloc/src/util.c
redis-4.0./deps/jemalloc/src/valgrind.c
redis-4.0./deps/jemalloc/src/zone.c
redis-4.0./deps/jemalloc/test/
redis-4.0./deps/jemalloc/test/include/
redis-4.0./deps/jemalloc/test/include/test/
redis-4.0./deps/jemalloc/test/include/test/SFMT-alti.h
redis-4.0./deps/jemalloc/test/include/test/SFMT-params.h
redis-4.0./deps/jemalloc/test/include/test/SFMT-params11213.h
redis-4.0./deps/jemalloc/test/include/test/SFMT-params1279.h
redis-4.0./deps/jemalloc/test/include/test/SFMT-params132049.h
redis-4.0./deps/jemalloc/test/include/test/SFMT-params19937.h
redis-4.0./deps/jemalloc/test/include/test/SFMT-params216091.h
redis-4.0./deps/jemalloc/test/include/test/SFMT-params2281.h
redis-4.0./deps/jemalloc/test/include/test/SFMT-params4253.h
redis-4.0./deps/jemalloc/test/include/test/SFMT-params44497.h
redis-4.0./deps/jemalloc/test/include/test/SFMT-params607.h
redis-4.0./deps/jemalloc/test/include/test/SFMT-params86243.h
redis-4.0./deps/jemalloc/test/include/test/SFMT-sse2.h
redis-4.0./deps/jemalloc/test/include/test/SFMT.h
redis-4.0./deps/jemalloc/test/include/test/btalloc.h
redis-4.0./deps/jemalloc/test/include/test/jemalloc_test.h.in
redis-4.0./deps/jemalloc/test/include/test/jemalloc_test_defs.h.in
redis-4.0./deps/jemalloc/test/include/test/math.h
redis-4.0./deps/jemalloc/test/include/test/mq.h
redis-4.0./deps/jemalloc/test/include/test/mtx.h
redis-4.0./deps/jemalloc/test/include/test/test.h
redis-4.0./deps/jemalloc/test/include/test/thd.h
redis-4.0./deps/jemalloc/test/include/test/timer.h
redis-4.0./deps/jemalloc/test/integration/
redis-4.0./deps/jemalloc/test/integration/MALLOCX_ARENA.c
redis-4.0./deps/jemalloc/test/integration/aligned_alloc.c
redis-4.0./deps/jemalloc/test/integration/allocated.c
redis-4.0./deps/jemalloc/test/integration/chunk.c
redis-4.0./deps/jemalloc/test/integration/mallocx.c
redis-4.0./deps/jemalloc/test/integration/overflow.c
redis-4.0./deps/jemalloc/test/integration/posix_memalign.c
redis-4.0./deps/jemalloc/test/integration/rallocx.c
redis-4.0./deps/jemalloc/test/integration/sdallocx.c
redis-4.0./deps/jemalloc/test/integration/thread_arena.c
redis-4.0./deps/jemalloc/test/integration/thread_tcache_enabled.c
redis-4.0./deps/jemalloc/test/integration/xallocx.c
redis-4.0./deps/jemalloc/test/src/
redis-4.0./deps/jemalloc/test/src/SFMT.c
redis-4.0./deps/jemalloc/test/src/btalloc.c
redis-4.0./deps/jemalloc/test/src/btalloc_0.c
redis-4.0./deps/jemalloc/test/src/btalloc_1.c
redis-4.0./deps/jemalloc/test/src/math.c
redis-4.0./deps/jemalloc/test/src/mq.c
redis-4.0./deps/jemalloc/test/src/mtx.c
redis-4.0./deps/jemalloc/test/src/test.c
redis-4.0./deps/jemalloc/test/src/thd.c
redis-4.0./deps/jemalloc/test/src/timer.c
redis-4.0./deps/jemalloc/test/stress/
redis-4.0./deps/jemalloc/test/stress/microbench.c
redis-4.0./deps/jemalloc/test/test.sh.in
redis-4.0./deps/jemalloc/test/unit/
redis-4.0./deps/jemalloc/test/unit/SFMT.c
redis-4.0./deps/jemalloc/test/unit/atomic.c
redis-4.0./deps/jemalloc/test/unit/bitmap.c
redis-4.0./deps/jemalloc/test/unit/ckh.c
redis-4.0./deps/jemalloc/test/unit/hash.c
redis-4.0./deps/jemalloc/test/unit/junk.c
redis-4.0./deps/jemalloc/test/unit/junk_alloc.c
redis-4.0./deps/jemalloc/test/unit/junk_free.c
redis-4.0./deps/jemalloc/test/unit/lg_chunk.c
redis-4.0./deps/jemalloc/test/unit/mallctl.c
redis-4.0./deps/jemalloc/test/unit/math.c
redis-4.0./deps/jemalloc/test/unit/mq.c
redis-4.0./deps/jemalloc/test/unit/mtx.c
redis-4.0./deps/jemalloc/test/unit/prof_accum.c
redis-4.0./deps/jemalloc/test/unit/prof_active.c
redis-4.0./deps/jemalloc/test/unit/prof_gdump.c
redis-4.0./deps/jemalloc/test/unit/prof_idump.c
redis-4.0./deps/jemalloc/test/unit/prof_reset.c
redis-4.0./deps/jemalloc/test/unit/prof_thread_name.c
redis-4.0./deps/jemalloc/test/unit/ql.c
redis-4.0./deps/jemalloc/test/unit/qr.c
redis-4.0./deps/jemalloc/test/unit/quarantine.c
redis-4.0./deps/jemalloc/test/unit/rb.c
redis-4.0./deps/jemalloc/test/unit/rtree.c
redis-4.0./deps/jemalloc/test/unit/size_classes.c
redis-4.0./deps/jemalloc/test/unit/stats.c
redis-4.0./deps/jemalloc/test/unit/tsd.c
redis-4.0./deps/jemalloc/test/unit/util.c
redis-4.0./deps/jemalloc/test/unit/zero.c
redis-4.0./deps/linenoise/
redis-4.0./deps/linenoise/.gitignore
redis-4.0./deps/linenoise/Makefile
redis-4.0./deps/linenoise/README.markdown
redis-4.0./deps/linenoise/example.c
redis-4.0./deps/linenoise/linenoise.c
redis-4.0./deps/linenoise/linenoise.h
redis-4.0./deps/lua/
redis-4.0./deps/lua/COPYRIGHT
redis-4.0./deps/lua/HISTORY
redis-4.0./deps/lua/INSTALL
redis-4.0./deps/lua/Makefile
redis-4.0./deps/lua/README
redis-4.0./deps/lua/doc/
redis-4.0./deps/lua/doc/contents.html
redis-4.0./deps/lua/doc/cover.png
redis-4.0./deps/lua/doc/logo.gif
redis-4.0./deps/lua/doc/lua.
redis-4.0./deps/lua/doc/lua.css
redis-4.0./deps/lua/doc/lua.html
redis-4.0./deps/lua/doc/luac.
redis-4.0./deps/lua/doc/luac.html
redis-4.0./deps/lua/doc/manual.css
redis-4.0./deps/lua/doc/manual.html
redis-4.0./deps/lua/doc/readme.html
redis-4.0./deps/lua/etc/
redis-4.0./deps/lua/etc/Makefile
redis-4.0./deps/lua/etc/README
redis-4.0./deps/lua/etc/all.c
redis-4.0./deps/lua/etc/lua.hpp
redis-4.0./deps/lua/etc/lua.ico
redis-4.0./deps/lua/etc/lua.pc
redis-4.0./deps/lua/etc/luavs.bat
redis-4.0./deps/lua/etc/min.c
redis-4.0./deps/lua/etc/noparser.c
redis-4.0./deps/lua/etc/strict.lua
redis-4.0./deps/lua/src/
redis-4.0./deps/lua/src/Makefile
redis-4.0./deps/lua/src/fpconv.c
redis-4.0./deps/lua/src/fpconv.h
redis-4.0./deps/lua/src/lapi.c
redis-4.0./deps/lua/src/lapi.h
redis-4.0./deps/lua/src/lauxlib.c
redis-4.0./deps/lua/src/lauxlib.h
redis-4.0./deps/lua/src/lbaselib.c
redis-4.0./deps/lua/src/lcode.c
redis-4.0./deps/lua/src/lcode.h
redis-4.0./deps/lua/src/ldblib.c
redis-4.0./deps/lua/src/ldebug.c
redis-4.0./deps/lua/src/ldebug.h
redis-4.0./deps/lua/src/ldo.c
redis-4.0./deps/lua/src/ldo.h
redis-4.0./deps/lua/src/ldump.c
redis-4.0./deps/lua/src/lfunc.c
redis-4.0./deps/lua/src/lfunc.h
redis-4.0./deps/lua/src/lgc.c
redis-4.0./deps/lua/src/lgc.h
redis-4.0./deps/lua/src/linit.c
redis-4.0./deps/lua/src/liolib.c
redis-4.0./deps/lua/src/llex.c
redis-4.0./deps/lua/src/llex.h
redis-4.0./deps/lua/src/llimits.h
redis-4.0./deps/lua/src/lmathlib.c
redis-4.0./deps/lua/src/lmem.c
redis-4.0./deps/lua/src/lmem.h
redis-4.0./deps/lua/src/loadlib.c
redis-4.0./deps/lua/src/lobject.c
redis-4.0./deps/lua/src/lobject.h
redis-4.0./deps/lua/src/lopcodes.c
redis-4.0./deps/lua/src/lopcodes.h
redis-4.0./deps/lua/src/loslib.c
redis-4.0./deps/lua/src/lparser.c
redis-4.0./deps/lua/src/lparser.h
redis-4.0./deps/lua/src/lstate.c
redis-4.0./deps/lua/src/lstate.h
redis-4.0./deps/lua/src/lstring.c
redis-4.0./deps/lua/src/lstring.h
redis-4.0./deps/lua/src/lstrlib.c
redis-4.0./deps/lua/src/ltable.c
redis-4.0./deps/lua/src/ltable.h
redis-4.0./deps/lua/src/ltablib.c
redis-4.0./deps/lua/src/ltm.c
redis-4.0./deps/lua/src/ltm.h
redis-4.0./deps/lua/src/lua.c
redis-4.0./deps/lua/src/lua.h
redis-4.0./deps/lua/src/lua_bit.c
redis-4.0./deps/lua/src/lua_cjson.c
redis-4.0./deps/lua/src/lua_cmsgpack.c
redis-4.0./deps/lua/src/lua_struct.c
redis-4.0./deps/lua/src/luac.c
redis-4.0./deps/lua/src/luaconf.h
redis-4.0./deps/lua/src/lualib.h
redis-4.0./deps/lua/src/lundump.c
redis-4.0./deps/lua/src/lundump.h
redis-4.0./deps/lua/src/lvm.c
redis-4.0./deps/lua/src/lvm.h
redis-4.0./deps/lua/src/lzio.c
redis-4.0./deps/lua/src/lzio.h
redis-4.0./deps/lua/src/print.c
redis-4.0./deps/lua/src/strbuf.c
redis-4.0./deps/lua/src/strbuf.h
redis-4.0./deps/lua/test/
redis-4.0./deps/lua/test/README
redis-4.0./deps/lua/test/bisect.lua
redis-4.0./deps/lua/test/cf.lua
redis-4.0./deps/lua/test/echo.lua
redis-4.0./deps/lua/test/env.lua
redis-4.0./deps/lua/test/factorial.lua
redis-4.0./deps/lua/test/fib.lua
redis-4.0./deps/lua/test/fibfor.lua
redis-4.0./deps/lua/test/globals.lua
redis-4.0./deps/lua/test/hello.lua
redis-4.0./deps/lua/test/life.lua
redis-4.0./deps/lua/test/luac.lua
redis-4.0./deps/lua/test/printf.lua
redis-4.0./deps/lua/test/readonly.lua
redis-4.0./deps/lua/test/sieve.lua
redis-4.0./deps/lua/test/sort.lua
redis-4.0./deps/lua/test/table.lua
redis-4.0./deps/lua/test/trace-calls.lua
redis-4.0./deps/lua/test/trace-globals.lua
redis-4.0./deps/lua/test/xd.lua
redis-4.0./deps/update-jemalloc.sh
redis-4.0./redis.conf
redis-4.0./runtest
redis-4.0./runtest-cluster
redis-4.0./runtest-sentinel
redis-4.0./sentinel.conf
redis-4.0./src/
redis-4.0./src/.gitignore
redis-4.0./src/Makefile
redis-4.0./src/adlist.c
redis-4.0./src/adlist.h
redis-4.0./src/ae.c
redis-4.0./src/ae.h
redis-4.0./src/ae_epoll.c
redis-4.0./src/ae_evport.c
redis-4.0./src/ae_kqueue.c
redis-4.0./src/ae_select.c
redis-4.0./src/anet.c
redis-4.0./src/anet.h
redis-4.0./src/aof.c
redis-4.0./src/asciilogo.h
redis-4.0./src/atomicvar.h
redis-4.0./src/bio.c
redis-4.0./src/bio.h
redis-4.0./src/bitops.c
redis-4.0./src/blocked.c
redis-4.0./src/childinfo.c
redis-4.0./src/cluster.c
redis-4.0./src/cluster.h
redis-4.0./src/config.c
redis-4.0./src/config.h
redis-4.0./src/crc16.c
redis-4.0./src/crc64.c
redis-4.0./src/crc64.h
redis-4.0./src/db.c
redis-4.0./src/debug.c
redis-4.0./src/debugmacro.h
redis-4.0./src/defrag.c
redis-4.0./src/dict.c
redis-4.0./src/dict.h
redis-4.0./src/endianconv.c
redis-4.0./src/endianconv.h
redis-4.0./src/evict.c
redis-4.0./src/expire.c
redis-4.0./src/fmacros.h
redis-4.0./src/geo.c
redis-4.0./src/geo.h
redis-4.0./src/geohash.c
redis-4.0./src/geohash.h
redis-4.0./src/geohash_helper.c
redis-4.0./src/geohash_helper.h
redis-4.0./src/help.h
redis-4.0./src/hyperloglog.c
redis-4.0./src/intset.c
redis-4.0./src/intset.h
redis-4.0./src/latency.c
redis-4.0./src/latency.h
redis-4.0./src/lazyfree.c
redis-4.0./src/lzf.h
redis-4.0./src/lzfP.h
redis-4.0./src/lzf_c.c
redis-4.0./src/lzf_d.c
redis-4.0./src/memtest.c
redis-4.0./src/mkreleasehdr.sh
redis-4.0./src/module.c
redis-4.0./src/modules/
redis-4.0./src/modules/.gitignore
redis-4.0./src/modules/Makefile
redis-4.0./src/modules/gendoc.rb
redis-4.0./src/modules/helloblock.c
redis-4.0./src/modules/hellotype.c
redis-4.0./src/modules/helloworld.c
redis-4.0./src/modules/testmodule.c
redis-4.0./src/multi.c
redis-4.0./src/networking.c
redis-4.0./src/notify.c
redis-4.0./src/object.c
redis-4.0./src/pqsort.c
redis-4.0./src/pqsort.h
redis-4.0./src/pubsub.c
redis-4.0./src/quicklist.c
redis-4.0./src/quicklist.h
redis-4.0./src/rand.c
redis-4.0./src/rand.h
redis-4.0./src/rax.c
redis-4.0./src/rax.h
redis-4.0./src/rax_malloc.h
redis-4.0./src/rdb.c
redis-4.0./src/rdb.h
redis-4.0./src/redis-benchmark.c
redis-4.0./src/redis-check-aof.c
redis-4.0./src/redis-check-rdb.c
redis-4.0./src/redis-cli.c
redis-4.0./src/redis-trib.rb
redis-4.0./src/redisassert.h
redis-4.0./src/redismodule.h
redis-4.0./src/release.c
redis-4.0./src/replication.c
redis-4.0./src/rio.c
redis-4.0./src/rio.h
redis-4.0./src/scripting.c
redis-4.0./src/sds.c
redis-4.0./src/sds.h
redis-4.0./src/sdsalloc.h
redis-4.0./src/sentinel.c
redis-4.0./src/server.c
redis-4.0./src/server.h
redis-4.0./src/setproctitle.c
redis-4.0./src/sha1.c
redis-4.0./src/sha1.h
redis-4.0./src/siphash.c
redis-4.0./src/slowlog.c
redis-4.0./src/slowlog.h
redis-4.0./src/solarisfixes.h
redis-4.0./src/sort.c
redis-4.0./src/sparkline.c
redis-4.0./src/sparkline.h
redis-4.0./src/syncio.c
redis-4.0./src/t_hash.c
redis-4.0./src/t_list.c
redis-4.0./src/t_set.c
redis-4.0./src/t_string.c
redis-4.0./src/t_zset.c
redis-4.0./src/testhelp.h
redis-4.0./src/util.c
redis-4.0./src/util.h
redis-4.0./src/valgrind.sup
redis-4.0./src/version.h
redis-4.0./src/ziplist.c
redis-4.0./src/ziplist.h
redis-4.0./src/zipmap.c
redis-4.0./src/zipmap.h
redis-4.0./src/zmalloc.c
redis-4.0./src/zmalloc.h
redis-4.0./tests/
redis-4.0./tests/assets/
redis-4.0./tests/assets/default.conf
redis-4.0./tests/assets/encodings.rdb
redis-4.0./tests/assets/hash-zipmap.rdb
redis-4.0./tests/cluster/
redis-4.0./tests/cluster/cluster.tcl
redis-4.0./tests/cluster/run.tcl
redis-4.0./tests/cluster/tests/
redis-4.0./tests/cluster/tests/-base.tcl
redis-4.0./tests/cluster/tests/-faildet.tcl
redis-4.0./tests/cluster/tests/-failover.tcl
redis-4.0./tests/cluster/tests/-failover-loop.tcl
redis-4.0./tests/cluster/tests/-resharding.tcl
redis-4.0./tests/cluster/tests/-slave-selection.tcl
redis-4.0./tests/cluster/tests/-slave-stop-cond.tcl
redis-4.0./tests/cluster/tests/-replica-migration.tcl
redis-4.0./tests/cluster/tests/-update-msg.tcl
redis-4.0./tests/cluster/tests/-pubsub.tcl
redis-4.0./tests/cluster/tests/-manual-failover.tcl
redis-4.0./tests/cluster/tests/-manual-takeover.tcl
redis-4.0./tests/cluster/tests/-replica-migration-.tcl
redis-4.0./tests/cluster/tests/-no-failover-option.tcl
redis-4.0./tests/cluster/tests/helpers/
redis-4.0./tests/cluster/tests/helpers/onlydots.tcl
redis-4.0./tests/cluster/tests/includes/
redis-4.0./tests/cluster/tests/includes/init-tests.tcl
redis-4.0./tests/cluster/tmp/
redis-4.0./tests/cluster/tmp/.gitignore
redis-4.0./tests/helpers/
redis-4.0./tests/helpers/bg_complex_data.tcl
redis-4.0./tests/helpers/gen_write_load.tcl
redis-4.0./tests/instances.tcl
redis-4.0./tests/integration/
redis-4.0./tests/integration/aof-race.tcl
redis-4.0./tests/integration/aof.tcl
redis-4.0./tests/integration/convert-zipmap-hash-on-load.tcl
redis-4.0./tests/integration/logging.tcl
redis-4.0./tests/integration/psync2-reg.tcl
redis-4.0./tests/integration/psync2.tcl
redis-4.0./tests/integration/rdb.tcl
redis-4.0./tests/integration/redis-cli.tcl
redis-4.0./tests/integration/replication-.tcl
redis-4.0./tests/integration/replication-.tcl
redis-4.0./tests/integration/replication-.tcl
redis-4.0./tests/integration/replication-psync.tcl
redis-4.0./tests/integration/replication.tcl
redis-4.0./tests/sentinel/
redis-4.0./tests/sentinel/run.tcl
redis-4.0./tests/sentinel/tests/
redis-4.0./tests/sentinel/tests/-base.tcl
redis-4.0./tests/sentinel/tests/-conf-update.tcl
redis-4.0./tests/sentinel/tests/-slaves-reconf.tcl
redis-4.0./tests/sentinel/tests/-runtime-reconf.tcl
redis-4.0./tests/sentinel/tests/-slave-selection.tcl
redis-4.0./tests/sentinel/tests/-manual.tcl
redis-4.0./tests/sentinel/tests/-ckquorum.tcl
redis-4.0./tests/sentinel/tests/-down-conditions.tcl
redis-4.0./tests/sentinel/tests/includes/
redis-4.0./tests/sentinel/tests/includes/init-tests.tcl
redis-4.0./tests/sentinel/tmp/
redis-4.0./tests/sentinel/tmp/.gitignore
redis-4.0./tests/support/
redis-4.0./tests/support/cluster.tcl
redis-4.0./tests/support/redis.tcl
redis-4.0./tests/support/server.tcl
redis-4.0./tests/support/test.tcl
redis-4.0./tests/support/tmpfile.tcl
redis-4.0./tests/support/util.tcl
redis-4.0./tests/test_helper.tcl
redis-4.0./tests/tmp/
redis-4.0./tests/tmp/.gitignore
redis-4.0./tests/unit/
redis-4.0./tests/unit/aofrw.tcl
redis-4.0./tests/unit/auth.tcl
redis-4.0./tests/unit/bitfield.tcl
redis-4.0./tests/unit/bitops.tcl
redis-4.0./tests/unit/dump.tcl
redis-4.0./tests/unit/expire.tcl
redis-4.0./tests/unit/geo.tcl
redis-4.0./tests/unit/hyperloglog.tcl
redis-4.0./tests/unit/introspection-.tcl
redis-4.0./tests/unit/introspection.tcl
redis-4.0./tests/unit/keyspace.tcl
redis-4.0./tests/unit/latency-monitor.tcl
redis-4.0./tests/unit/lazyfree.tcl
redis-4.0./tests/unit/limits.tcl
redis-4.0./tests/unit/maxmemory.tcl
redis-4.0./tests/unit/memefficiency.tcl
redis-4.0./tests/unit/multi.tcl
redis-4.0./tests/unit/obuf-limits.tcl
redis-4.0./tests/unit/other.tcl
redis-4.0./tests/unit/printver.tcl
redis-4.0./tests/unit/protocol.tcl
redis-4.0./tests/unit/pubsub.tcl
redis-4.0./tests/unit/quit.tcl
redis-4.0./tests/unit/scan.tcl
redis-4.0./tests/unit/scripting.tcl
redis-4.0./tests/unit/slowlog.tcl
redis-4.0./tests/unit/sort.tcl
redis-4.0./tests/unit/type/
redis-4.0./tests/unit/type/hash.tcl
redis-4.0./tests/unit/type/incr.tcl
redis-4.0./tests/unit/type/list-.tcl
redis-4.0./tests/unit/type/list-.tcl
redis-4.0./tests/unit/type/list-common.tcl
redis-4.0./tests/unit/type/list.tcl
redis-4.0./tests/unit/type/set.tcl
redis-4.0./tests/unit/type/string.tcl
redis-4.0./tests/unit/type/zset.tcl
redis-4.0./tests/unit/wait.tcl
redis-4.0./utils/
redis-4.0./utils/build-static-symbols.tcl
redis-4.0./utils/cluster_fail_time.tcl
redis-4.0./utils/corrupt_rdb.c
redis-4.0./utils/create-cluster/
redis-4.0./utils/create-cluster/.gitignore
redis-4.0./utils/create-cluster/README
redis-4.0./utils/create-cluster/create-cluster
redis-4.0./utils/generate-command-help.rb
redis-4.0./utils/graphs/
redis-4.0./utils/graphs/commits-over-time/
redis-4.0./utils/graphs/commits-over-time/README.md
redis-4.0./utils/graphs/commits-over-time/genhtml.tcl
redis-4.0./utils/hashtable/
redis-4.0./utils/hashtable/README
redis-4.0./utils/hashtable/rehashing.c
redis-4.0./utils/hyperloglog/
redis-4.0./utils/hyperloglog/.gitignore
redis-4.0./utils/hyperloglog/hll-err.rb
redis-4.0./utils/hyperloglog/hll-gnuplot-graph.rb
redis-4.0./utils/install_server.sh
redis-4.0./utils/lru/
redis-4.0./utils/lru/README
redis-4.0./utils/lru/lfu-simulation.c
redis-4.0./utils/lru/test-lru.rb
redis-4.0./utils/redis-copy.rb
redis-4.0./utils/redis-sha1.rb
redis-4.0./utils/redis_init_script
redis-4.0./utils/redis_init_script.tpl
redis-4.0./utils/releasetools/
redis-4.0./utils/releasetools/01_create_tarball.sh
redis-4.0./utils/releasetools/02_upload_tarball.sh
redis-4.0./utils/releasetools/03_test_release.sh
redis-4.0./utils/releasetools/04_release_hash.sh
redis-4.0./utils/releasetools/changelog.tcl
redis-4.0./utils/speed-regression.tcl
redis-4.0./utils/whatisdoing.sh
tar -xvf redis-4.0.10.tar.gz
0x01-编译
[root@centos7 ~]# cd redis-4.0./
[root@centos7 redis-4.0.]# ls
-RELEASENOTES CONTRIBUTING deps Makefile README.md runtest runtest-sentinel src utils
BUGS COPYING INSTALL MANIFESTO redis.conf runtest-cluster sentinel.conf tests
[root@centos7 redis-4.0.]# make
cd src && make all
make[]: Entering directory `/root/redis-4.0./src'
CC Makefile.dep
make[]: Leaving directory `/root/redis-4.0./src'
make[]: Entering directory `/root/redis-4.0./src'
rm -rf redis-server redis-sentinel redis-cli redis-benchmark redis-check-rdb redis-check-aof *.o *.gcda *.gcno *.gcov redis.info lcov-html Makefile.dep dict-benchmark
(cd ../deps && make distclean)
make[]: Entering directory `/root/redis-4.0./deps'
(cd hiredis && make clean) > /dev/null || true
(cd linenoise && make clean) > /dev/null || true
(cd lua && make clean) > /dev/null || true
(cd jemalloc && [ -f Makefile ] && make distclean) > /dev/null || true
(rm -f .make-*)
make[]: Leaving directory `/root/redis-4.0./deps'
(rm -f .make-*)
echo STD=-std=c99 -pedantic -DREDIS_STATIC='' >> .make-settings
echo WARN=-Wall -W -Wno-missing-field-initializers >> .make-settings
echo OPT=-O2 >> .make-settings
echo MALLOC=jemalloc >> .make-settings
echo CFLAGS= >> .make-settings
echo LDFLAGS= >> .make-settings
echo REDIS_CFLAGS= >> .make-settings
echo REDIS_LDFLAGS= >> .make-settings
echo PREV_FINAL_CFLAGS=-std=c99 -pedantic -DREDIS_STATIC='' -Wall -W -Wno-missing-field-initializers -O2 -g -ggdb -I../deps/hiredis -I../deps/linenoise -I../deps/lua/src -DUSE_JEMALLOC -I../deps/jemalloc/include >> .make-settings
echo PREV_FINAL_LDFLAGS= -g -ggdb -rdynamic >> .make-settings
(cd ../deps && make hiredis linenoise lua jemalloc)
make[]: Entering directory `/root/redis-4.0./deps'
(cd hiredis && make clean) > /dev/null || true
(cd linenoise && make clean) > /dev/null || true
(cd lua && make clean) > /dev/null || true
(cd jemalloc && [ -f Makefile ] && make distclean) > /dev/null || true
(rm -f .make-*)
(echo "" > .make-cflags)
(echo "" > .make-ldflags)
MAKE hiredis
cd hiredis && make static
make[]: Entering directory `/root/redis-4.0./deps/hiredis'
gcc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb net.c
make[]: gcc: Command not found
make[]: *** [net.o] Error
make[]: Leaving directory `/root/redis-4.0./deps/hiredis'
make[]: *** [hiredis] Error
make[]: Leaving directory `/root/redis-4.0./deps'
make[]: [persist-settings] Error (ignored)
CC adlist.o
/bin/sh: cc: command not found
make[]: *** [adlist.o] Error
make[]: Leaving directory `/root/redis-4.0./src'
make: *** [all] Error
make编译报错1
make编译报错现象:
[root@centos7 redis-4.0.10]# make
cd src && make all
make[1]: Entering directory `/root/redis-4.0.10/src'
CC adlist.o
/bin/sh: cc: command not found
原因:Centos默认未安装gcc相关包,需要手动安装
解决方案:按照提示,缺少gcc相关包,手动安装
gcc gcc-c++ libstdc++-devel
yum install -y gcc gcc-c++ libstdc++-devel
then,继续编译,出现报错现象2
[root@centos7 redis-4.0.]# make
cd src && make all
make[]: Entering directory `/root/redis-4.0./src'
CC adlist.o
In file included from adlist.c:::
zmalloc.h::: fatal error: jemalloc/jemalloc.h: No such file or directory
#include <jemalloc/jemalloc.h>
^
compilation terminated.
make[]: *** [adlist.o] Error
make[]: Leaving directory `/root/redis-4.0./src'
make: *** [all] Error
原因:jemalloc重载了Linux下的ANSI C的malloc和free函数。在redis的README中,有如下描述:
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 Linuxsystems. 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
关于分配器allocator,如果系统已经配置了MALLOC环境变量,则使用MALLOC环境标量去建立Redis,但是libc并不是默认的分配器,默认分配器为Jemalloc,但是目前系统内并没有Jemalloc,所以需要在make编译时,加上MALLOC=libc,强制修改默认分配器进行编译。
解决方案:在make时,指定分配器参数:MALLOC
[root@centos7 redis-4.0.]# make MALLOC=libc
cd src && make all
make[]: Entering directory `/root/redis-4.0./src'
edis.info lcov-html Makefile.dep dict-benchmark
(cd ../deps && make distclean)
make[]: Entering directory `/root/redis-4.0./deps'
(cd hiredis && make clean) > /dev/null || true
(cd linenoise && make clean) > /dev/null || true
(cd lua && make clean) > /dev/null || true
(cd jemalloc && [ -f Makefile ] && make distclean) > /dev/null || true
(rm -f .make-*)
make[]: Leaving directory `/root/redis-4.0./deps'
(rm -f .make-*)
echo STD=-std=c99 -pedantic -DREDIS_STATIC= >> .make-settings
echo WARN=-Wall -W -Wno-missing-field-initializers >> .make-settings
echo OPT=-O2 >> .make-settings
echo MALLOC=libc >> .make-settings
echo CFLAGS= >> .make-settings
echo LDFLAGS= >> .make-settings
echo REDIS_CFLAGS= >> .make-settings
echo REDIS_LDFLAGS= >> .make-settings
deps/hiredis -I../deps/linenoise -I../deps/lua/src >> .make-settings
echo PREV_FINAL_LDFLAGS= -g -ggdb -rdynamic >> .make-settings
(cd ../deps && make hiredis linenoise lua)
make[]: Entering directory `/root/redis-4.0./deps'
(cd hiredis && make clean) > /dev/null || true
(cd linenoise && make clean) > /dev/null || true
(cd lua && make clean) > /dev/null || true
(cd jemalloc && [ -f Makefile ] && make distclean) > /dev/null || true
(rm -f .make-*)
(echo "" > .make-cflags)
(echo "" > .make-ldflags)
MAKE hiredis
cd hiredis && make static
make[]: Entering directory `/root/redis-4.0./deps/hiredis'
cc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb net.c
cc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb hiredis.c
cc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb sds.c
cc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb async.c
cc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb read.c
ar rcs libhiredis.a net.o hiredis.o sds.o async.o read.o
make[]: Leaving directory `/root/redis-4.0./deps/hiredis'
MAKE linenoise
cd linenoise && make
make[]: Entering directory `/root/redis-4.0./deps/linenoise'
cc -Wall -Os -g -c linenoise.c
make[]: Leaving directory `/root/redis-4.0./deps/linenoise'
MAKE lua
cd lua/src && make all CFLAGS="-O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' " MYLDFLAGS="" AR="ar rcu"
make[]: Entering directory `/root/redis-4.0./deps/lua/src'
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o lapi.o lapi.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o lcode.o lcode.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o ldebug.o ldebug.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o ldo.o ldo.c
ldo.c: In function ‘f_parser’:
ldo.c::: warning: unused variable ‘c’ [-Wunused-variable]
int c = luaZ_lookahead(p->z);
^
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o ldump.o ldump.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o lfunc.o lfunc.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o lgc.o lgc.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o llex.o llex.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o lmem.o lmem.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o lobject.o lobject.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o lopcodes.o lopcodes.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o lparser.o lparser.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o lstate.o lstate.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o lstring.o lstring.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o ltable.o ltable.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o ltm.o ltm.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o lundump.o lundump.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o lvm.o lvm.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o lzio.o lzio.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o strbuf.o strbuf.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o fpconv.o fpconv.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o lauxlib.o lauxlib.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o lbaselib.o lbaselib.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o ldblib.o ldblib.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o liolib.o liolib.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o lmathlib.o lmathlib.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o loslib.o loslib.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o ltablib.o ltablib.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o lstrlib.o lstrlib.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o loadlib.o loadlib.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o linit.o linit.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o lua_cjson.o lua_cjson.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o lua_struct.o lua_struct.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o lua_cmsgpack.o lua_cmsgpack.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o lua_bit.o lua_bit.c
object files
ranlib liblua.a
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o lua.o lua.c
cc -o lua lua.o liblua.a -lm
liblua.a(loslib.o): In function `os_tmpname':
loslib.c:(.text+0x28c): warning: the use of `tmpnam' is dangerous, better use `mkstemp'
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o luac.o luac.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o print.o print.c
cc -o luac luac.o print.o liblua.a -lm
make[]: Leaving directory `/root/redis-4.0./deps/lua/src'
make[]: Leaving directory `/root/redis-4.0./deps'
CC adlist.o
CC quicklist.o
CC ae.o
CC anet.o
CC dict.o
CC server.o
CC sds.o
CC zmalloc.o
CC lzf_c.o
CC lzf_d.o
CC pqsort.o
CC zipmap.o
CC sha1.o
CC ziplist.o
CC release.o
CC networking.o
CC util.o
CC object.o
CC db.o
CC replication.o
CC rdb.o
CC t_string.o
CC t_list.o
CC t_set.o
CC t_zset.o
CC t_hash.o
CC config.o
CC aof.o
CC pubsub.o
CC multi.o
CC debug.o
CC sort.o
CC intset.o
CC syncio.o
CC cluster.o
CC crc16.o
CC endianconv.o
CC slowlog.o
CC scripting.o
CC bio.o
CC rio.o
CC rand.o
CC memtest.o
CC crc64.o
CC bitops.o
CC sentinel.o
CC notify.o
CC setproctitle.o
CC blocked.o
CC hyperloglog.o
CC latency.o
CC sparkline.o
CC redis-check-rdb.o
CC redis-check-aof.o
CC geo.o
CC lazyfree.o
CC module.o
CC evict.o
CC expire.o
CC geohash.o
CC geohash_helper.o
CC childinfo.o
CC defrag.o
CC siphash.o
CC rax.o
LINK redis-server
INSTALL redis-sentinel
CC redis-cli.o
LINK redis-cli
CC redis-benchmark.o
LINK redis-benchmark
INSTALL redis-check-rdb
INSTALL redis-check-aof Hint: It's a good idea to run 'make test' ;) make[]: Leaving directory `/root/redis-4.0./src'
make MALLOC=libc
0x02-安装--make install
[root@centos7 redis-4.0.]# make install
cd src && make install
make[]: Entering directory `/root/redis-4.0./src'
CC Makefile.dep
make[]: Leaving directory `/root/redis-4.0./src'
make[]: Entering directory `/root/redis-4.0./src' Hint: It's a good idea to run 'make test' ;) INSTALL install
INSTALL install
INSTALL install
INSTALL install
INSTALL install
make[]: Leaving directory `/root/redis-4.0./src'
0x03-各个系统版本启动:
- Windows:直接解压源码包,cpoy到指定目录,CMD:切换至redis目录,cd d:\redis ,redis-server.exe redis.conf即可,最好加入环境变量
- Linux:./redis-server 或者指定配置文件启动./redis-server /etc/redis.conf