博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
centos上安装redis
阅读量:6411 次
发布时间:2019-06-23

本文共 63584 字,大约阅读时间需要 211 分钟。

hot3.png

  • 本文目标

本文记录在centos上安装redis3.2.3的详细过程

  • 安装准备

centos版本:6.7

redis版本:3.2.3

安装方式:源码安装

  • 操作步骤

1、下载并解压Redis安装包

wget http://download.redis.io/releases/redis-3.2.3.tar.gz

[root@itsecond software]# wget http://download.redis.io/releases/redis-3.2.3.tar.gz--2018-02-22 18:41:35--  http://download.redis.io/releases/redis-3.2.3.tar.gz正在解析主机 download.redis.io... 109.74.203.151正在连接 download.redis.io|109.74.203.151|:80... 已连接。已发出 HTTP 请求,正在等待回应... 200 OK长度:1541401 (1.5M) [application/x-gzip]正在保存至: “redis-3.2.3.tar.gz”35% [================================================================================>                                                                                                                                                    ] 549,012      175K/s eta(英国中部时39% [==========================================================================================>                                                                                                                                          ] 612,724      177K/s eta(英国中部时43% [===================================================================================================>                                                                                                                                 ] 676,436      179K/s eta(英国中部时48% [============================================================================================================>                                                                                                                        ] 740,148      180K/s eta(英国中部时51% [=====================================================================================================================>                                                                                                               ] 800,964      181K/s eta(英国中部时55% [===============================================================================================================================>                                                                                                     ] 861,780      182K/s eta(英国中部时60% [========================================================================================================================================>                                                                                            ] 925,492      183K/s eta(英国中部时64% [=================================================================================================================================================>                                                                                   ] 989,204      183K/s eta(英国中部时68% [===========================================================================================================================================================>                                                                         ] 1,051,468    184K/s eta(英国中部时72% [====================================================================================================================================================================>                                                                ] 1,112,284    184K/s eta(英国中部时76% [=============================================================================================================================================================================>                                                       ] 1,175,996    185K/s eta(英国中部时80% [======================================================================================================================================================================================>                                              ] 1,238,260    191K/s eta(英国中部时84% [================================================================================================================================================================================================>                                    ] 1,301,972    197K/s eta(英国中部时88% [=========================================================================================================================================================================================================>                           ] 1,365,684    198K/s eta(英国中部时92% [==================================================================================================================================================================================================================>                  ] 1,426,500    198K/s eta(英国中部时96% [============================================================================================================================================================================================================================>        ] 1,490,212    198K/s eta(英国中部时100%[====================================================================================================================================================================================================================================>] 1,541,401    202K/s   in 7.9s    2018-02-22 18:41:44 (190 KB/s) - 已保存 “redis-3.2.3.tar.gz” [1541401/1541401])

tar -zxvf redis-3.2.3.tar.gz -C /usr/local

[root@itsecond software]# tar -zxvf redis-3.2.3.tar.gz -C /usr/localredis-3.2.3/redis-3.2.3/.gitignoreredis-3.2.3/00-RELEASENOTESredis-3.2.3/BUGSredis-3.2.3/CONTRIBUTINGredis-3.2.3/COPYINGredis-3.2.3/INSTALLredis-3.2.3/MANIFESTOredis-3.2.3/Makefileredis-3.2.3/README.mdredis-3.2.3/deps/redis-3.2.3/deps/Makefileredis-3.2.3/deps/README.mdredis-3.2.3/deps/geohash-int/redis-3.2.3/deps/geohash-int/Makefileredis-3.2.3/deps/geohash-int/geohash.credis-3.2.3/deps/geohash-int/geohash.hredis-3.2.3/deps/geohash-int/geohash_helper.credis-3.2.3/deps/geohash-int/geohash_helper.hredis-3.2.3/deps/hiredis/redis-3.2.3/deps/hiredis/.gitignoreredis-3.2.3/deps/hiredis/.travis.ymlredis-3.2.3/deps/hiredis/CHANGELOG.mdredis-3.2.3/deps/hiredis/COPYINGredis-3.2.3/deps/hiredis/Makefileredis-3.2.3/deps/hiredis/README.mdredis-3.2.3/deps/hiredis/adapters/redis-3.2.3/deps/hiredis/adapters/ae.hredis-3.2.3/deps/hiredis/adapters/libev.hredis-3.2.3/deps/hiredis/adapters/libevent.hredis-3.2.3/deps/hiredis/adapters/libuv.hredis-3.2.3/deps/hiredis/async.credis-3.2.3/deps/hiredis/async.hredis-3.2.3/deps/hiredis/dict.credis-3.2.3/deps/hiredis/dict.hredis-3.2.3/deps/hiredis/examples/redis-3.2.3/deps/hiredis/examples/example-ae.credis-3.2.3/deps/hiredis/examples/example-libev.credis-3.2.3/deps/hiredis/examples/example-libevent.credis-3.2.3/deps/hiredis/examples/example-libuv.credis-3.2.3/deps/hiredis/examples/example.credis-3.2.3/deps/hiredis/fmacros.hredis-3.2.3/deps/hiredis/hiredis.credis-3.2.3/deps/hiredis/hiredis.hredis-3.2.3/deps/hiredis/net.credis-3.2.3/deps/hiredis/net.hredis-3.2.3/deps/hiredis/sds.credis-3.2.3/deps/hiredis/sds.hredis-3.2.3/deps/hiredis/sdsalloc.hredis-3.2.3/deps/hiredis/test.credis-3.2.3/deps/hiredis/zmalloc.hredis-3.2.3/deps/jemalloc/redis-3.2.3/deps/jemalloc/.autom4te.cfgredis-3.2.3/deps/jemalloc/.gitattributesredis-3.2.3/deps/jemalloc/.gitignoreredis-3.2.3/deps/jemalloc/COPYINGredis-3.2.3/deps/jemalloc/ChangeLogredis-3.2.3/deps/jemalloc/INSTALLredis-3.2.3/deps/jemalloc/Makefile.inredis-3.2.3/deps/jemalloc/READMEredis-3.2.3/deps/jemalloc/VERSIONredis-3.2.3/deps/jemalloc/autogen.shredis-3.2.3/deps/jemalloc/bin/redis-3.2.3/deps/jemalloc/bin/jemalloc-config.inredis-3.2.3/deps/jemalloc/bin/jemalloc.sh.inredis-3.2.3/deps/jemalloc/bin/jeprof.inredis-3.2.3/deps/jemalloc/config.guessredis-3.2.3/deps/jemalloc/config.stamp.inredis-3.2.3/deps/jemalloc/config.subredis-3.2.3/deps/jemalloc/configureredis-3.2.3/deps/jemalloc/configure.acredis-3.2.3/deps/jemalloc/coverage.shredis-3.2.3/deps/jemalloc/doc/redis-3.2.3/deps/jemalloc/doc/html.xsl.inredis-3.2.3/deps/jemalloc/doc/jemalloc.3redis-3.2.3/deps/jemalloc/doc/jemalloc.htmlredis-3.2.3/deps/jemalloc/doc/jemalloc.xml.inredis-3.2.3/deps/jemalloc/doc/manpages.xsl.inredis-3.2.3/deps/jemalloc/doc/stylesheet.xslredis-3.2.3/deps/jemalloc/include/redis-3.2.3/deps/jemalloc/include/jemalloc/redis-3.2.3/deps/jemalloc/include/jemalloc/internal/redis-3.2.3/deps/jemalloc/include/jemalloc/internal/arena.hredis-3.2.3/deps/jemalloc/include/jemalloc/internal/atomic.hredis-3.2.3/deps/jemalloc/include/jemalloc/internal/base.hredis-3.2.3/deps/jemalloc/include/jemalloc/internal/bitmap.hredis-3.2.3/deps/jemalloc/include/jemalloc/internal/chunk.hredis-3.2.3/deps/jemalloc/include/jemalloc/internal/chunk_dss.hredis-3.2.3/deps/jemalloc/include/jemalloc/internal/chunk_mmap.hredis-3.2.3/deps/jemalloc/include/jemalloc/internal/ckh.hredis-3.2.3/deps/jemalloc/include/jemalloc/internal/ctl.hredis-3.2.3/deps/jemalloc/include/jemalloc/internal/extent.hredis-3.2.3/deps/jemalloc/include/jemalloc/internal/hash.hredis-3.2.3/deps/jemalloc/include/jemalloc/internal/huge.hredis-3.2.3/deps/jemalloc/include/jemalloc/internal/jemalloc_internal.h.inredis-3.2.3/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_decls.hredis-3.2.3/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h.inredis-3.2.3/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_macros.hredis-3.2.3/deps/jemalloc/include/jemalloc/internal/mb.hredis-3.2.3/deps/jemalloc/include/jemalloc/internal/mutex.hredis-3.2.3/deps/jemalloc/include/jemalloc/internal/pages.hredis-3.2.3/deps/jemalloc/include/jemalloc/internal/private_namespace.shredis-3.2.3/deps/jemalloc/include/jemalloc/internal/private_symbols.txtredis-3.2.3/deps/jemalloc/include/jemalloc/internal/private_unnamespace.shredis-3.2.3/deps/jemalloc/include/jemalloc/internal/prng.hredis-3.2.3/deps/jemalloc/include/jemalloc/internal/prof.hredis-3.2.3/deps/jemalloc/include/jemalloc/internal/public_namespace.shredis-3.2.3/deps/jemalloc/include/jemalloc/internal/public_unnamespace.shredis-3.2.3/deps/jemalloc/include/jemalloc/internal/ql.hredis-3.2.3/deps/jemalloc/include/jemalloc/internal/qr.hredis-3.2.3/deps/jemalloc/include/jemalloc/internal/quarantine.hredis-3.2.3/deps/jemalloc/include/jemalloc/internal/rb.hredis-3.2.3/deps/jemalloc/include/jemalloc/internal/rtree.hredis-3.2.3/deps/jemalloc/include/jemalloc/internal/size_classes.shredis-3.2.3/deps/jemalloc/include/jemalloc/internal/stats.hredis-3.2.3/deps/jemalloc/include/jemalloc/internal/tcache.hredis-3.2.3/deps/jemalloc/include/jemalloc/internal/tsd.hredis-3.2.3/deps/jemalloc/include/jemalloc/internal/util.hredis-3.2.3/deps/jemalloc/include/jemalloc/internal/valgrind.hredis-3.2.3/deps/jemalloc/include/jemalloc/jemalloc.shredis-3.2.3/deps/jemalloc/include/jemalloc/jemalloc_defs.h.inredis-3.2.3/deps/jemalloc/include/jemalloc/jemalloc_macros.h.inredis-3.2.3/deps/jemalloc/include/jemalloc/jemalloc_mangle.shredis-3.2.3/deps/jemalloc/include/jemalloc/jemalloc_protos.h.inredis-3.2.3/deps/jemalloc/include/jemalloc/jemalloc_rename.shredis-3.2.3/deps/jemalloc/include/jemalloc/jemalloc_typedefs.h.inredis-3.2.3/deps/jemalloc/include/msvc_compat/redis-3.2.3/deps/jemalloc/include/msvc_compat/C99/redis-3.2.3/deps/jemalloc/include/msvc_compat/C99/stdbool.hredis-3.2.3/deps/jemalloc/include/msvc_compat/C99/stdint.hredis-3.2.3/deps/jemalloc/include/msvc_compat/strings.hredis-3.2.3/deps/jemalloc/include/msvc_compat/windows_extra.hredis-3.2.3/deps/jemalloc/install-shredis-3.2.3/deps/jemalloc/jemalloc.pc.inredis-3.2.3/deps/jemalloc/src/redis-3.2.3/deps/jemalloc/src/arena.credis-3.2.3/deps/jemalloc/src/atomic.credis-3.2.3/deps/jemalloc/src/base.credis-3.2.3/deps/jemalloc/src/bitmap.credis-3.2.3/deps/jemalloc/src/chunk.credis-3.2.3/deps/jemalloc/src/chunk_dss.credis-3.2.3/deps/jemalloc/src/chunk_mmap.credis-3.2.3/deps/jemalloc/src/ckh.credis-3.2.3/deps/jemalloc/src/ctl.credis-3.2.3/deps/jemalloc/src/extent.credis-3.2.3/deps/jemalloc/src/hash.credis-3.2.3/deps/jemalloc/src/huge.credis-3.2.3/deps/jemalloc/src/jemalloc.credis-3.2.3/deps/jemalloc/src/mb.credis-3.2.3/deps/jemalloc/src/mutex.credis-3.2.3/deps/jemalloc/src/pages.credis-3.2.3/deps/jemalloc/src/prof.credis-3.2.3/deps/jemalloc/src/quarantine.credis-3.2.3/deps/jemalloc/src/rtree.credis-3.2.3/deps/jemalloc/src/stats.credis-3.2.3/deps/jemalloc/src/tcache.credis-3.2.3/deps/jemalloc/src/tsd.credis-3.2.3/deps/jemalloc/src/util.credis-3.2.3/deps/jemalloc/src/valgrind.credis-3.2.3/deps/jemalloc/src/zone.credis-3.2.3/deps/jemalloc/test/redis-3.2.3/deps/jemalloc/test/include/redis-3.2.3/deps/jemalloc/test/include/test/redis-3.2.3/deps/jemalloc/test/include/test/SFMT-alti.hredis-3.2.3/deps/jemalloc/test/include/test/SFMT-params.hredis-3.2.3/deps/jemalloc/test/include/test/SFMT-params11213.hredis-3.2.3/deps/jemalloc/test/include/test/SFMT-params1279.hredis-3.2.3/deps/jemalloc/test/include/test/SFMT-params132049.hredis-3.2.3/deps/jemalloc/test/include/test/SFMT-params19937.hredis-3.2.3/deps/jemalloc/test/include/test/SFMT-params216091.hredis-3.2.3/deps/jemalloc/test/include/test/SFMT-params2281.hredis-3.2.3/deps/jemalloc/test/include/test/SFMT-params4253.hredis-3.2.3/deps/jemalloc/test/include/test/SFMT-params44497.hredis-3.2.3/deps/jemalloc/test/include/test/SFMT-params607.hredis-3.2.3/deps/jemalloc/test/include/test/SFMT-params86243.hredis-3.2.3/deps/jemalloc/test/include/test/SFMT-sse2.hredis-3.2.3/deps/jemalloc/test/include/test/SFMT.hredis-3.2.3/deps/jemalloc/test/include/test/btalloc.hredis-3.2.3/deps/jemalloc/test/include/test/jemalloc_test.h.inredis-3.2.3/deps/jemalloc/test/include/test/jemalloc_test_defs.h.inredis-3.2.3/deps/jemalloc/test/include/test/math.hredis-3.2.3/deps/jemalloc/test/include/test/mq.hredis-3.2.3/deps/jemalloc/test/include/test/mtx.hredis-3.2.3/deps/jemalloc/test/include/test/test.hredis-3.2.3/deps/jemalloc/test/include/test/thd.hredis-3.2.3/deps/jemalloc/test/include/test/timer.hredis-3.2.3/deps/jemalloc/test/integration/redis-3.2.3/deps/jemalloc/test/integration/MALLOCX_ARENA.credis-3.2.3/deps/jemalloc/test/integration/aligned_alloc.credis-3.2.3/deps/jemalloc/test/integration/allocated.credis-3.2.3/deps/jemalloc/test/integration/chunk.credis-3.2.3/deps/jemalloc/test/integration/mallocx.credis-3.2.3/deps/jemalloc/test/integration/overflow.credis-3.2.3/deps/jemalloc/test/integration/posix_memalign.credis-3.2.3/deps/jemalloc/test/integration/rallocx.credis-3.2.3/deps/jemalloc/test/integration/sdallocx.credis-3.2.3/deps/jemalloc/test/integration/thread_arena.credis-3.2.3/deps/jemalloc/test/integration/thread_tcache_enabled.credis-3.2.3/deps/jemalloc/test/integration/xallocx.credis-3.2.3/deps/jemalloc/test/src/redis-3.2.3/deps/jemalloc/test/src/SFMT.credis-3.2.3/deps/jemalloc/test/src/btalloc.credis-3.2.3/deps/jemalloc/test/src/btalloc_0.credis-3.2.3/deps/jemalloc/test/src/btalloc_1.credis-3.2.3/deps/jemalloc/test/src/math.credis-3.2.3/deps/jemalloc/test/src/mq.credis-3.2.3/deps/jemalloc/test/src/mtx.credis-3.2.3/deps/jemalloc/test/src/test.credis-3.2.3/deps/jemalloc/test/src/thd.credis-3.2.3/deps/jemalloc/test/src/timer.credis-3.2.3/deps/jemalloc/test/stress/redis-3.2.3/deps/jemalloc/test/stress/microbench.credis-3.2.3/deps/jemalloc/test/test.sh.inredis-3.2.3/deps/jemalloc/test/unit/redis-3.2.3/deps/jemalloc/test/unit/SFMT.credis-3.2.3/deps/jemalloc/test/unit/atomic.credis-3.2.3/deps/jemalloc/test/unit/bitmap.credis-3.2.3/deps/jemalloc/test/unit/ckh.credis-3.2.3/deps/jemalloc/test/unit/hash.credis-3.2.3/deps/jemalloc/test/unit/junk.credis-3.2.3/deps/jemalloc/test/unit/junk_alloc.credis-3.2.3/deps/jemalloc/test/unit/junk_free.credis-3.2.3/deps/jemalloc/test/unit/lg_chunk.credis-3.2.3/deps/jemalloc/test/unit/mallctl.credis-3.2.3/deps/jemalloc/test/unit/math.credis-3.2.3/deps/jemalloc/test/unit/mq.credis-3.2.3/deps/jemalloc/test/unit/mtx.credis-3.2.3/deps/jemalloc/test/unit/prof_accum.credis-3.2.3/deps/jemalloc/test/unit/prof_active.credis-3.2.3/deps/jemalloc/test/unit/prof_gdump.credis-3.2.3/deps/jemalloc/test/unit/prof_idump.credis-3.2.3/deps/jemalloc/test/unit/prof_reset.credis-3.2.3/deps/jemalloc/test/unit/prof_thread_name.credis-3.2.3/deps/jemalloc/test/unit/ql.credis-3.2.3/deps/jemalloc/test/unit/qr.credis-3.2.3/deps/jemalloc/test/unit/quarantine.credis-3.2.3/deps/jemalloc/test/unit/rb.credis-3.2.3/deps/jemalloc/test/unit/rtree.credis-3.2.3/deps/jemalloc/test/unit/size_classes.credis-3.2.3/deps/jemalloc/test/unit/stats.credis-3.2.3/deps/jemalloc/test/unit/tsd.credis-3.2.3/deps/jemalloc/test/unit/util.credis-3.2.3/deps/jemalloc/test/unit/zero.credis-3.2.3/deps/linenoise/redis-3.2.3/deps/linenoise/.gitignoreredis-3.2.3/deps/linenoise/Makefileredis-3.2.3/deps/linenoise/README.markdownredis-3.2.3/deps/linenoise/example.credis-3.2.3/deps/linenoise/linenoise.credis-3.2.3/deps/linenoise/linenoise.hredis-3.2.3/deps/lua/redis-3.2.3/deps/lua/COPYRIGHTredis-3.2.3/deps/lua/HISTORYredis-3.2.3/deps/lua/INSTALLredis-3.2.3/deps/lua/Makefileredis-3.2.3/deps/lua/READMEredis-3.2.3/deps/lua/doc/redis-3.2.3/deps/lua/doc/contents.htmlredis-3.2.3/deps/lua/doc/cover.pngredis-3.2.3/deps/lua/doc/logo.gifredis-3.2.3/deps/lua/doc/lua.1redis-3.2.3/deps/lua/doc/lua.cssredis-3.2.3/deps/lua/doc/lua.htmlredis-3.2.3/deps/lua/doc/luac.1redis-3.2.3/deps/lua/doc/luac.htmlredis-3.2.3/deps/lua/doc/manual.cssredis-3.2.3/deps/lua/doc/manual.htmlredis-3.2.3/deps/lua/doc/readme.htmlredis-3.2.3/deps/lua/etc/redis-3.2.3/deps/lua/etc/Makefileredis-3.2.3/deps/lua/etc/READMEredis-3.2.3/deps/lua/etc/all.credis-3.2.3/deps/lua/etc/lua.hppredis-3.2.3/deps/lua/etc/lua.icoredis-3.2.3/deps/lua/etc/lua.pcredis-3.2.3/deps/lua/etc/luavs.batredis-3.2.3/deps/lua/etc/min.credis-3.2.3/deps/lua/etc/noparser.credis-3.2.3/deps/lua/etc/strict.luaredis-3.2.3/deps/lua/src/redis-3.2.3/deps/lua/src/Makefileredis-3.2.3/deps/lua/src/fpconv.credis-3.2.3/deps/lua/src/fpconv.hredis-3.2.3/deps/lua/src/lapi.credis-3.2.3/deps/lua/src/lapi.hredis-3.2.3/deps/lua/src/lauxlib.credis-3.2.3/deps/lua/src/lauxlib.hredis-3.2.3/deps/lua/src/lbaselib.credis-3.2.3/deps/lua/src/lcode.credis-3.2.3/deps/lua/src/lcode.hredis-3.2.3/deps/lua/src/ldblib.credis-3.2.3/deps/lua/src/ldebug.credis-3.2.3/deps/lua/src/ldebug.hredis-3.2.3/deps/lua/src/ldo.credis-3.2.3/deps/lua/src/ldo.hredis-3.2.3/deps/lua/src/ldump.credis-3.2.3/deps/lua/src/lfunc.credis-3.2.3/deps/lua/src/lfunc.hredis-3.2.3/deps/lua/src/lgc.credis-3.2.3/deps/lua/src/lgc.hredis-3.2.3/deps/lua/src/linit.credis-3.2.3/deps/lua/src/liolib.credis-3.2.3/deps/lua/src/llex.credis-3.2.3/deps/lua/src/llex.hredis-3.2.3/deps/lua/src/llimits.hredis-3.2.3/deps/lua/src/lmathlib.credis-3.2.3/deps/lua/src/lmem.credis-3.2.3/deps/lua/src/lmem.hredis-3.2.3/deps/lua/src/loadlib.credis-3.2.3/deps/lua/src/lobject.credis-3.2.3/deps/lua/src/lobject.hredis-3.2.3/deps/lua/src/lopcodes.credis-3.2.3/deps/lua/src/lopcodes.hredis-3.2.3/deps/lua/src/loslib.credis-3.2.3/deps/lua/src/lparser.credis-3.2.3/deps/lua/src/lparser.hredis-3.2.3/deps/lua/src/lstate.credis-3.2.3/deps/lua/src/lstate.hredis-3.2.3/deps/lua/src/lstring.credis-3.2.3/deps/lua/src/lstring.hredis-3.2.3/deps/lua/src/lstrlib.credis-3.2.3/deps/lua/src/ltable.credis-3.2.3/deps/lua/src/ltable.hredis-3.2.3/deps/lua/src/ltablib.credis-3.2.3/deps/lua/src/ltm.credis-3.2.3/deps/lua/src/ltm.hredis-3.2.3/deps/lua/src/lua.credis-3.2.3/deps/lua/src/lua.hredis-3.2.3/deps/lua/src/lua_bit.credis-3.2.3/deps/lua/src/lua_cjson.credis-3.2.3/deps/lua/src/lua_cmsgpack.credis-3.2.3/deps/lua/src/lua_struct.credis-3.2.3/deps/lua/src/luac.credis-3.2.3/deps/lua/src/luaconf.hredis-3.2.3/deps/lua/src/lualib.hredis-3.2.3/deps/lua/src/lundump.credis-3.2.3/deps/lua/src/lundump.hredis-3.2.3/deps/lua/src/lvm.credis-3.2.3/deps/lua/src/lvm.hredis-3.2.3/deps/lua/src/lzio.credis-3.2.3/deps/lua/src/lzio.hredis-3.2.3/deps/lua/src/print.credis-3.2.3/deps/lua/src/strbuf.credis-3.2.3/deps/lua/src/strbuf.hredis-3.2.3/deps/lua/test/redis-3.2.3/deps/lua/test/READMEredis-3.2.3/deps/lua/test/bisect.luaredis-3.2.3/deps/lua/test/cf.luaredis-3.2.3/deps/lua/test/echo.luaredis-3.2.3/deps/lua/test/env.luaredis-3.2.3/deps/lua/test/factorial.luaredis-3.2.3/deps/lua/test/fib.luaredis-3.2.3/deps/lua/test/fibfor.luaredis-3.2.3/deps/lua/test/globals.luaredis-3.2.3/deps/lua/test/hello.luaredis-3.2.3/deps/lua/test/life.luaredis-3.2.3/deps/lua/test/luac.luaredis-3.2.3/deps/lua/test/printf.luaredis-3.2.3/deps/lua/test/readonly.luaredis-3.2.3/deps/lua/test/sieve.luaredis-3.2.3/deps/lua/test/sort.luaredis-3.2.3/deps/lua/test/table.luaredis-3.2.3/deps/lua/test/trace-calls.luaredis-3.2.3/deps/lua/test/trace-globals.luaredis-3.2.3/deps/lua/test/xd.luaredis-3.2.3/deps/update-jemalloc.shredis-3.2.3/redis.confredis-3.2.3/runtestredis-3.2.3/runtest-clusterredis-3.2.3/runtest-sentinelredis-3.2.3/sentinel.confredis-3.2.3/src/redis-3.2.3/src/.gitignoreredis-3.2.3/src/Makefileredis-3.2.3/src/Makefile.depredis-3.2.3/src/adlist.credis-3.2.3/src/adlist.hredis-3.2.3/src/ae.credis-3.2.3/src/ae.hredis-3.2.3/src/ae_epoll.credis-3.2.3/src/ae_evport.credis-3.2.3/src/ae_kqueue.credis-3.2.3/src/ae_select.credis-3.2.3/src/anet.credis-3.2.3/src/anet.hredis-3.2.3/src/aof.credis-3.2.3/src/asciilogo.hredis-3.2.3/src/bio.credis-3.2.3/src/bio.hredis-3.2.3/src/bitops.credis-3.2.3/src/blocked.credis-3.2.3/src/cluster.credis-3.2.3/src/cluster.hredis-3.2.3/src/config.credis-3.2.3/src/config.hredis-3.2.3/src/crc16.credis-3.2.3/src/crc64.credis-3.2.3/src/crc64.hredis-3.2.3/src/db.credis-3.2.3/src/debug.credis-3.2.3/src/debugmacro.hredis-3.2.3/src/dict.credis-3.2.3/src/dict.hredis-3.2.3/src/endianconv.credis-3.2.3/src/endianconv.hredis-3.2.3/src/fmacros.hredis-3.2.3/src/geo.credis-3.2.3/src/geo.hredis-3.2.3/src/help.hredis-3.2.3/src/hyperloglog.credis-3.2.3/src/intset.credis-3.2.3/src/intset.hredis-3.2.3/src/latency.credis-3.2.3/src/latency.hredis-3.2.3/src/lzf.hredis-3.2.3/src/lzfP.hredis-3.2.3/src/lzf_c.credis-3.2.3/src/lzf_d.credis-3.2.3/src/memtest.credis-3.2.3/src/mkreleasehdr.shredis-3.2.3/src/multi.credis-3.2.3/src/networking.credis-3.2.3/src/notify.credis-3.2.3/src/object.credis-3.2.3/src/pqsort.credis-3.2.3/src/pqsort.hredis-3.2.3/src/pubsub.credis-3.2.3/src/quicklist.credis-3.2.3/src/quicklist.hredis-3.2.3/src/rand.credis-3.2.3/src/rand.hredis-3.2.3/src/rdb.credis-3.2.3/src/rdb.hredis-3.2.3/src/redis-benchmark.credis-3.2.3/src/redis-check-aof.credis-3.2.3/src/redis-check-rdb.credis-3.2.3/src/redis-cli.credis-3.2.3/src/redis-trib.rbredis-3.2.3/src/redisassert.hredis-3.2.3/src/release.credis-3.2.3/src/replication.credis-3.2.3/src/rio.credis-3.2.3/src/rio.hredis-3.2.3/src/scripting.credis-3.2.3/src/sds.credis-3.2.3/src/sds.hredis-3.2.3/src/sdsalloc.hredis-3.2.3/src/sentinel.credis-3.2.3/src/server.credis-3.2.3/src/server.hredis-3.2.3/src/setproctitle.credis-3.2.3/src/sha1.credis-3.2.3/src/sha1.hredis-3.2.3/src/slowlog.credis-3.2.3/src/slowlog.hredis-3.2.3/src/solarisfixes.hredis-3.2.3/src/sort.credis-3.2.3/src/sparkline.credis-3.2.3/src/sparkline.hredis-3.2.3/src/syncio.credis-3.2.3/src/t_hash.credis-3.2.3/src/t_list.credis-3.2.3/src/t_set.credis-3.2.3/src/t_string.credis-3.2.3/src/t_zset.credis-3.2.3/src/testhelp.hredis-3.2.3/src/util.credis-3.2.3/src/util.hredis-3.2.3/src/valgrind.supredis-3.2.3/src/version.hredis-3.2.3/src/ziplist.credis-3.2.3/src/ziplist.hredis-3.2.3/src/zipmap.credis-3.2.3/src/zipmap.hredis-3.2.3/src/zmalloc.credis-3.2.3/src/zmalloc.hredis-3.2.3/tests/redis-3.2.3/tests/assets/redis-3.2.3/tests/assets/default.confredis-3.2.3/tests/assets/encodings.rdbredis-3.2.3/tests/assets/hash-zipmap.rdbredis-3.2.3/tests/cluster/redis-3.2.3/tests/cluster/cluster.tclredis-3.2.3/tests/cluster/run.tclredis-3.2.3/tests/cluster/tests/redis-3.2.3/tests/cluster/tests/00-base.tclredis-3.2.3/tests/cluster/tests/01-faildet.tclredis-3.2.3/tests/cluster/tests/02-failover.tclredis-3.2.3/tests/cluster/tests/03-failover-loop.tclredis-3.2.3/tests/cluster/tests/04-resharding.tclredis-3.2.3/tests/cluster/tests/05-slave-selection.tclredis-3.2.3/tests/cluster/tests/06-slave-stop-cond.tclredis-3.2.3/tests/cluster/tests/07-replica-migration.tclredis-3.2.3/tests/cluster/tests/08-update-msg.tclredis-3.2.3/tests/cluster/tests/09-pubsub.tclredis-3.2.3/tests/cluster/tests/10-manual-failover.tclredis-3.2.3/tests/cluster/tests/11-manual-takeover.tclredis-3.2.3/tests/cluster/tests/12-replica-migration-2.tclredis-3.2.3/tests/cluster/tests/helpers/redis-3.2.3/tests/cluster/tests/helpers/onlydots.tclredis-3.2.3/tests/cluster/tests/includes/redis-3.2.3/tests/cluster/tests/includes/init-tests.tclredis-3.2.3/tests/cluster/tmp/redis-3.2.3/tests/cluster/tmp/.gitignoreredis-3.2.3/tests/helpers/redis-3.2.3/tests/helpers/bg_complex_data.tclredis-3.2.3/tests/helpers/gen_write_load.tclredis-3.2.3/tests/instances.tclredis-3.2.3/tests/integration/redis-3.2.3/tests/integration/aof-race.tclredis-3.2.3/tests/integration/aof.tclredis-3.2.3/tests/integration/convert-zipmap-hash-on-load.tclredis-3.2.3/tests/integration/logging.tclredis-3.2.3/tests/integration/rdb.tclredis-3.2.3/tests/integration/redis-cli.tclredis-3.2.3/tests/integration/replication-2.tclredis-3.2.3/tests/integration/replication-3.tclredis-3.2.3/tests/integration/replication-4.tclredis-3.2.3/tests/integration/replication-psync.tclredis-3.2.3/tests/integration/replication.tclredis-3.2.3/tests/sentinel/redis-3.2.3/tests/sentinel/run.tclredis-3.2.3/tests/sentinel/tests/redis-3.2.3/tests/sentinel/tests/00-base.tclredis-3.2.3/tests/sentinel/tests/01-conf-update.tclredis-3.2.3/tests/sentinel/tests/02-slaves-reconf.tclredis-3.2.3/tests/sentinel/tests/03-runtime-reconf.tclredis-3.2.3/tests/sentinel/tests/04-slave-selection.tclredis-3.2.3/tests/sentinel/tests/05-manual.tclredis-3.2.3/tests/sentinel/tests/06-ckquorum.tclredis-3.2.3/tests/sentinel/tests/07-down-conditions.tclredis-3.2.3/tests/sentinel/tests/includes/redis-3.2.3/tests/sentinel/tests/includes/init-tests.tclredis-3.2.3/tests/sentinel/tmp/redis-3.2.3/tests/sentinel/tmp/.gitignoreredis-3.2.3/tests/support/redis-3.2.3/tests/support/cluster.tclredis-3.2.3/tests/support/redis.tclredis-3.2.3/tests/support/server.tclredis-3.2.3/tests/support/test.tclredis-3.2.3/tests/support/tmpfile.tclredis-3.2.3/tests/support/util.tclredis-3.2.3/tests/test_helper.tclredis-3.2.3/tests/tmp/redis-3.2.3/tests/tmp/.gitignoreredis-3.2.3/tests/unit/redis-3.2.3/tests/unit/aofrw.tclredis-3.2.3/tests/unit/auth.tclredis-3.2.3/tests/unit/bitfield.tclredis-3.2.3/tests/unit/bitops.tclredis-3.2.3/tests/unit/dump.tclredis-3.2.3/tests/unit/expire.tclredis-3.2.3/tests/unit/geo.tclredis-3.2.3/tests/unit/hyperloglog.tclredis-3.2.3/tests/unit/introspection-2.tclredis-3.2.3/tests/unit/introspection.tclredis-3.2.3/tests/unit/keyspace.tclredis-3.2.3/tests/unit/latency-monitor.tclredis-3.2.3/tests/unit/limits.tclredis-3.2.3/tests/unit/maxmemory.tclredis-3.2.3/tests/unit/memefficiency.tclredis-3.2.3/tests/unit/multi.tclredis-3.2.3/tests/unit/obuf-limits.tclredis-3.2.3/tests/unit/other.tclredis-3.2.3/tests/unit/printver.tclredis-3.2.3/tests/unit/protocol.tclredis-3.2.3/tests/unit/pubsub.tclredis-3.2.3/tests/unit/quit.tclredis-3.2.3/tests/unit/scan.tclredis-3.2.3/tests/unit/scripting.tclredis-3.2.3/tests/unit/slowlog.tclredis-3.2.3/tests/unit/sort.tclredis-3.2.3/tests/unit/type/redis-3.2.3/tests/unit/type/hash.tclredis-3.2.3/tests/unit/type/incr.tclredis-3.2.3/tests/unit/type/list-2.tclredis-3.2.3/tests/unit/type/list-3.tclredis-3.2.3/tests/unit/type/list-common.tclredis-3.2.3/tests/unit/type/list.tclredis-3.2.3/tests/unit/type/set.tclredis-3.2.3/tests/unit/type/string.tclredis-3.2.3/tests/unit/type/zset.tclredis-3.2.3/utils/redis-3.2.3/utils/build-static-symbols.tclredis-3.2.3/utils/cluster_fail_time.tclredis-3.2.3/utils/corrupt_rdb.credis-3.2.3/utils/create-cluster/redis-3.2.3/utils/create-cluster/.gitignoreredis-3.2.3/utils/create-cluster/READMEredis-3.2.3/utils/create-cluster/create-clusterredis-3.2.3/utils/generate-command-help.rbredis-3.2.3/utils/hashtable/redis-3.2.3/utils/hashtable/READMEredis-3.2.3/utils/hashtable/rehashing.credis-3.2.3/utils/hyperloglog/redis-3.2.3/utils/hyperloglog/.gitignoreredis-3.2.3/utils/hyperloglog/hll-err.rbredis-3.2.3/utils/hyperloglog/hll-gnuplot-graph.rbredis-3.2.3/utils/install_server.shredis-3.2.3/utils/lru/redis-3.2.3/utils/lru/READMEredis-3.2.3/utils/lru/test-lru.rbredis-3.2.3/utils/redis-copy.rbredis-3.2.3/utils/redis-sha1.rbredis-3.2.3/utils/redis_init_scriptredis-3.2.3/utils/redis_init_script.tplredis-3.2.3/utils/releasetools/redis-3.2.3/utils/releasetools/01_create_tarball.shredis-3.2.3/utils/releasetools/02_upload_tarball.shredis-3.2.3/utils/releasetools/03_test_release.shredis-3.2.3/utils/releasetools/04_release_hash.shredis-3.2.3/utils/speed-regression.tclredis-3.2.3/utils/whatisdoing.sh

2、进入redis目录安装

cd redis-3.2.3/

make && make install

[root@itsecond local]# cd redis-3.2.3/[root@itsecond redis-3.2.3]# make && make installcd src && make allmake[1]: Entering directory `/usr/local/redis-3.2.3/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(cd ../deps && make distclean)make[2]: Entering directory `/usr/local/redis-3.2.3/deps'(cd hiredis && make clean) > /dev/null || true(cd linenoise && make clean) > /dev/null || true(cd lua && make clean) > /dev/null || true(cd geohash-int && make clean) > /dev/null || true(cd jemalloc && [ -f Makefile ] && make distclean) > /dev/null || true(rm -f .make-*)make[2]: Leaving directory `/usr/local/redis-3.2.3/deps'(rm -f .make-*)echo STD=-std=c99 -pedantic -DREDIS_STATIC='' >> .make-settingsecho WARN=-Wall -W >> .make-settingsecho OPT=-O2 >> .make-settingsecho MALLOC=jemalloc >> .make-settingsecho CFLAGS= >> .make-settingsecho LDFLAGS= >> .make-settingsecho REDIS_CFLAGS= >> .make-settingsecho REDIS_LDFLAGS= >> .make-settingsecho PREV_FINAL_CFLAGS=-std=c99 -pedantic -DREDIS_STATIC='' -Wall -W -O2 -g -ggdb   -I../deps/geohash-int -I../deps/hiredis -I../deps/linenoise -I../deps/lua/src -DUSE_JEMALLOC -I../deps/jemalloc/include >> .make-settingsecho PREV_FINAL_LDFLAGS=  -g -ggdb -rdynamic >> .make-settings(cd ../deps && make hiredis linenoise lua geohash-int jemalloc)make[2]: Entering directory `/usr/local/redis-3.2.3/deps'(cd hiredis && make clean) > /dev/null || true(cd linenoise && make clean) > /dev/null || true(cd lua && make clean) > /dev/null || true(cd geohash-int && make clean) > /dev/null || true(cd jemalloc && [ -f Makefile ] && make distclean) > /dev/null || true(rm -f .make-*)(echo "" > .make-ldflags)(echo "" > .make-cflags)MAKE hirediscd hiredis && make staticmake[3]: Entering directory `/usr/local/redis-3.2.3/deps/hiredis'cc -std=c99 -pedantic -c -O3 -fPIC  -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb  net.ccc -std=c99 -pedantic -c -O3 -fPIC  -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb  hiredis.ccc -std=c99 -pedantic -c -O3 -fPIC  -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb  sds.ccc -std=c99 -pedantic -c -O3 -fPIC  -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb  async.car rcs libhiredis.a net.o hiredis.o sds.o async.omake[3]: Leaving directory `/usr/local/redis-3.2.3/deps/hiredis'MAKE linenoisecd linenoise && makemake[3]: Entering directory `/usr/local/redis-3.2.3/deps/linenoise'cc  -Wall -Os -g  -c linenoise.cmake[3]: Leaving directory `/usr/local/redis-3.2.3/deps/linenoise'MAKE luacd lua/src && make all CFLAGS="-O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' " MYLDFLAGS="" AR="ar rcu"make[3]: Entering directory `/usr/local/redis-3.2.3/deps/lua/src'cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC=''    -c -o lapi.o lapi.ccc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC=''    -c -o lcode.o lcode.ccc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC=''    -c -o ldebug.o ldebug.ccc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC=''    -c -o ldo.o ldo.cldo.c: 在函数‘f_parser’中:ldo.c:496: 警告:未使用的变量‘c’cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC=''    -c -o ldump.o ldump.ccc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC=''    -c -o lfunc.o lfunc.ccc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC=''    -c -o lgc.o lgc.ccc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC=''    -c -o llex.o llex.ccc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC=''    -c -o lmem.o lmem.ccc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC=''    -c -o lobject.o lobject.ccc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC=''    -c -o lopcodes.o lopcodes.ccc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC=''    -c -o lparser.o lparser.ccc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC=''    -c -o lstate.o lstate.ccc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC=''    -c -o lstring.o lstring.ccc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC=''    -c -o ltable.o ltable.ccc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC=''    -c -o ltm.o ltm.ccc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC=''    -c -o lundump.o lundump.ccc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC=''    -c -o lvm.o lvm.ccc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC=''    -c -o lzio.o lzio.ccc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC=''    -c -o strbuf.o strbuf.ccc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC=''    -c -o fpconv.o fpconv.ccc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC=''    -c -o lauxlib.o lauxlib.ccc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC=''    -c -o lbaselib.o lbaselib.ccc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC=''    -c -o ldblib.o ldblib.ccc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC=''    -c -o liolib.o liolib.ccc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC=''    -c -o lmathlib.o lmathlib.ccc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC=''    -c -o loslib.o loslib.ccc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC=''    -c -o ltablib.o ltablib.ccc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC=''    -c -o lstrlib.o lstrlib.ccc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC=''    -c -o loadlib.o loadlib.ccc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC=''    -c -o linit.o linit.ccc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC=''    -c -o lua_cjson.o lua_cjson.ccc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC=''    -c -o lua_struct.o lua_struct.ccc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC=''    -c -o lua_cmsgpack.o lua_cmsgpack.ccc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC=''    -c -o lua_bit.o lua_bit.car rcu liblua.a lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o lundump.o lvm.o lzio.o strbuf.o fpconv.o lauxlib.o lbaselib.o ldblib.o liolib.o lmathlib.o loslib.o ltablib.o lstrlib.o loadlib.o linit.o lua_cjson.o lua_struct.o lua_cmsgpack.o lua_bit.o	# DLL needs all object filesranlib liblua.acc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC=''    -c -o lua.o lua.ccc -o lua  lua.o liblua.a -lm liblua.a(loslib.o): In function `os_tmpname':loslib.c:(.text+0x35): 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.ccc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC=''    -c -o print.o print.ccc -o luac  luac.o print.o liblua.a -lm make[3]: Leaving directory `/usr/local/redis-3.2.3/deps/lua/src'MAKE geohash-intcd geohash-int && makemake[3]: Entering directory `/usr/local/redis-3.2.3/deps/geohash-int'cc  -Wall -O2 -g  -c geohash.ccc  -Wall -O2 -g  -c geohash_helper.cmake[3]: Leaving directory `/usr/local/redis-3.2.3/deps/geohash-int'MAKE jemalloccd jemalloc && ./configure --with-lg-quantum=3 --with-jemalloc-prefix=je_ --enable-cc-silence CFLAGS="-std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops " LDFLAGS=""checking for xsltproc... falsechecking for gcc... gccchecking whether the C compiler works... yeschecking for C compiler default output file name... a.outchecking for suffix of executables... checking whether we are cross compiling... nochecking for suffix of object files... ochecking whether we are using the GNU C compiler... yeschecking whether gcc accepts -g... yeschecking for gcc option to accept ISO C89... none neededchecking how to run the C preprocessor... gcc -Echecking for grep that handles long lines and -e... /bin/grepchecking for egrep... /bin/grep -Echecking for ANSI C header files... yeschecking for sys/types.h... yeschecking for sys/stat.h... yeschecking for stdlib.h... yeschecking for string.h... yeschecking for memory.h... yeschecking for strings.h... yeschecking for inttypes.h... yeschecking for stdint.h... yeschecking for unistd.h... yeschecking whether byte ordering is bigendian... nochecking size of void *... 8checking size of int... 4checking size of long... 8checking size of intmax_t... 8checking build system type... x86_64-unknown-linux-gnuchecking host system type... x86_64-unknown-linux-gnuchecking whether pause instruction is compilable... yeschecking for ar... archecking malloc.h usability... yeschecking malloc.h presence... yeschecking for malloc.h... yeschecking whether malloc_usable_size definition can use const argument... nochecking whether __attribute__ syntax is compilable... yeschecking whether compiler supports -fvisibility=hidden... yeschecking whether compiler supports -Werror... yeschecking whether tls_model attribute is compilable... yeschecking whether compiler supports -Werror... yeschecking whether alloc_size attribute is compilable... yeschecking whether compiler supports -Werror... yeschecking whether format(gnu_printf, ...) attribute is compilable... yeschecking whether compiler supports -Werror... yeschecking whether format(printf, ...) attribute is compilable... yeschecking for a BSD-compatible install... /usr/bin/install -cchecking for ranlib... ranlibchecking for ld... /usr/bin/ldchecking for autoconf... falsechecking for memalign... yeschecking for valloc... yeschecking configured backtracing method... N/Achecking for sbrk... yeschecking whether utrace(2) is compilable... nochecking whether valgrind is compilable... nochecking whether a program using __builtin_ffsl is compilable... yeschecking LG_PAGE... 12checking pthread.h usability... yeschecking pthread.h presence... yeschecking for pthread.h... yeschecking for pthread_create in -lpthread... yeschecking for library containing clock_gettime... -lrtchecking for secure_getenv... nochecking for issetugid... nochecking for _malloc_thread_cleanup... nochecking for _pthread_mutex_init_calloc_cb... nochecking for TLS... yeschecking whether C11 atomics is compilable... nochecking whether atomic(9) is compilable... nochecking whether Darwin OSAtomic*() is compilable... nochecking whether madvise(2) is compilable... yeschecking whether to force 32-bit __sync_{add,sub}_and_fetch()... nochecking whether to force 64-bit __sync_{add,sub}_and_fetch()... nochecking for __builtin_clz... yeschecking whether Darwin OSSpin*() is compilable... nochecking whether glibc malloc hook is compilable... yeschecking whether glibc memalign hook is compilable... yeschecking whether pthreads adaptive mutexes is compilable... yeschecking for stdbool.h that conforms to C99... yeschecking for _Bool... yesconfigure: creating ./config.statusconfig.status: creating Makefileconfig.status: creating jemalloc.pcconfig.status: creating doc/html.xslconfig.status: creating doc/manpages.xslconfig.status: creating doc/jemalloc.xmlconfig.status: creating include/jemalloc/jemalloc_macros.hconfig.status: creating include/jemalloc/jemalloc_protos.hconfig.status: creating include/jemalloc/jemalloc_typedefs.hconfig.status: creating include/jemalloc/internal/jemalloc_internal.hconfig.status: creating test/test.shconfig.status: creating test/include/test/jemalloc_test.hconfig.status: creating config.stampconfig.status: creating bin/jemalloc-configconfig.status: creating bin/jemalloc.shconfig.status: creating bin/jeprofconfig.status: creating include/jemalloc/jemalloc_defs.hconfig.status: creating include/jemalloc/internal/jemalloc_internal_defs.hconfig.status: creating test/include/test/jemalloc_test_defs.hconfig.status: executing include/jemalloc/internal/private_namespace.h commandsconfig.status: executing include/jemalloc/internal/private_unnamespace.h commandsconfig.status: executing include/jemalloc/internal/public_symbols.txt commandsconfig.status: executing include/jemalloc/internal/public_namespace.h commandsconfig.status: executing include/jemalloc/internal/public_unnamespace.h commandsconfig.status: executing include/jemalloc/internal/size_classes.h commandsconfig.status: executing include/jemalloc/jemalloc_protos_jet.h commandsconfig.status: executing include/jemalloc/jemalloc_rename.h commandsconfig.status: executing include/jemalloc/jemalloc_mangle.h commandsconfig.status: executing include/jemalloc/jemalloc_mangle_jet.h commandsconfig.status: executing include/jemalloc/jemalloc.h commands===============================================================================jemalloc version   : 4.0.3-0-ge9192eacf8935e29fc62fddc2701f7942b1cc02clibrary revision   : 2CONFIG             : --with-lg-quantum=3 --with-jemalloc-prefix=je_ --enable-cc-silence 'CFLAGS=-std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops ' LDFLAGS=CC                 : gccCFLAGS             : -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -fvisibility=hiddenCPPFLAGS           :  -D_GNU_SOURCE -D_REENTRANTLDFLAGS            : EXTRA_LDFLAGS      : LIBS               :  -lpthreadTESTLIBS           : -lrt RPATH_EXTRA        : XSLTPROC           : falseXSLROOT            : PREFIX             : /usr/localBINDIR             : /usr/local/binDATADIR            : /usr/local/shareINCLUDEDIR         : /usr/local/includeLIBDIR             : /usr/local/libMANDIR             : /usr/local/share/mansrcroot            : abs_srcroot        : /usr/local/redis-3.2.3/deps/jemalloc/objroot            : abs_objroot        : /usr/local/redis-3.2.3/deps/jemalloc/JEMALLOC_PREFIX    : je_JEMALLOC_PRIVATE_NAMESPACE                   : je_install_suffix     : autogen            : 0cc-silence         : 1debug              : 0code-coverage      : 0stats              : 1prof               : 0prof-libunwind     : 0prof-libgcc        : 0prof-gcc           : 0tcache             : 1fill               : 1utrace             : 0valgrind           : 0xmalloc            : 0munmap             : 0lazy_lock          : 0tls                : 1cache-oblivious    : 1===============================================================================cd jemalloc && make CFLAGS="-std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops " LDFLAGS="" lib/libjemalloc.amake[3]: Entering directory `/usr/local/redis-3.2.3/deps/jemalloc'gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/jemalloc.o src/jemalloc.cgcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/arena.o src/arena.cgcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/atomic.o src/atomic.cgcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/base.o src/base.cgcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/bitmap.o src/bitmap.cgcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/chunk.o src/chunk.cgcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/chunk_dss.o src/chunk_dss.cgcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/chunk_mmap.o src/chunk_mmap.cgcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/ckh.o src/ckh.cgcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/ctl.o src/ctl.cgcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/extent.o src/extent.cgcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/hash.o src/hash.cgcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/huge.o src/huge.cgcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/mb.o src/mb.cgcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/mutex.o src/mutex.cgcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/pages.o src/pages.cgcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/prof.o src/prof.cgcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/quarantine.o src/quarantine.cgcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/rtree.o src/rtree.cgcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/stats.o src/stats.cgcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/tcache.o src/tcache.cgcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/util.o src/util.cgcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/tsd.o src/tsd.car crus lib/libjemalloc.a src/jemalloc.o src/arena.o src/atomic.o src/base.o src/bitmap.o src/chunk.o src/chunk_dss.o src/chunk_mmap.o src/ckh.o src/ctl.o src/extent.o src/hash.o src/huge.o src/mb.o src/mutex.o src/pages.o src/prof.o src/quarantine.o src/rtree.o src/stats.o src/tcache.o src/util.o src/tsd.omake[3]: Leaving directory `/usr/local/redis-3.2.3/deps/jemalloc'make[2]: Leaving directory `/usr/local/redis-3.2.3/deps'    CC adlist.o    CC quicklist.o    CC ae.oIn file included from ae.c:53:ae_epoll.c: 在函数‘aeApiAddEvent’中:ae_epoll.c:75: 警告:缺少初始值设定ae_epoll.c:75: 警告:(在‘ee.data’的初始化附近)ae_epoll.c: 在函数‘aeApiDelEvent’中:ae_epoll.c:92: 警告:缺少初始值设定ae_epoll.c:92: 警告:(在‘ee.data’的初始化附近)    CC anet.oanet.c: 在函数‘anetSockName’中:anet.c:640: 警告:dereferencing pointer ‘s’ does break strict-aliasing rulesanet.c:638: 附注:initialized from hereanet.c:644: 警告:dereferencing pointer ‘s’ does break strict-aliasing rulesanet.c:642: 附注:initialized from hereanet.c: 在函数‘anetPeerToString’中:anet.c:584: 警告:dereferencing pointer ‘s’ does break strict-aliasing rulesanet.c:582: 附注:initialized from hereanet.c:588: 警告:dereferencing pointer ‘s’ does break strict-aliasing rulesanet.c:586: 附注:initialized from hereanet.c: 在函数‘anetTcpAccept’中:anet.c:555: 警告:dereferencing pointer ‘s’ does break strict-aliasing rulesanet.c:553: 附注:initialized from hereanet.c:559: 警告:dereferencing pointer ‘s’ does break strict-aliasing rulesanet.c:557: 附注:initialized from here    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 geo.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    CC redis-check-aof.o    LINK redis-check-aofHint: It's a good idea to run 'make test' ;)make[1]: Leaving directory `/usr/local/redis-3.2.3/src'cd src && make installmake[1]: Entering directory `/usr/local/redis-3.2.3/src'Hint: It's a good idea to run 'make test' ;)    INSTALL install    INSTALL install    INSTALL install    INSTALL install    INSTALL installmake[1]: Leaving directory `/usr/local/redis-3.2.3/src'

3、启动redis服务

进入redis下的src目录,执行redis-server启动Redis服务

[root@itsecond redis-3.2.3]# cd src[root@itsecond src]# lsadlist.c     ae_select.c  bio.o      config.h  debug.c       fmacros.h      intset.o   lzfP.h           networking.o  pubsub.o     rdb.o              redis-check-rdb.c  release.h      sdsalloc.h  setproctitle.c  sort.c       t_hash.o    util.c        zipmap.hadlist.h     anet.c       bitops.c   config.o  debugmacro.h  geo.c          latency.c  Makefile         notify.c      quicklist.c  redisassert.h      redis-check-rdb.o  release.o      sds.c       setproctitle.o  sort.o       t_list.c    util.h        zipmap.oadlist.o     anet.h       bitops.o   crc16.c   debug.o       geo.h          latency.h  Makefile.dep     notify.o      quicklist.h  redis-benchmark    redis-cli          replication.c  sds.h       sha1.c          sparkline.c  t_list.o    util.o        zmalloc.cae.c         anet.o       blocked.c  crc16.o   dict.c        geo.o          latency.o  memtest.c        object.c      quicklist.o  redis-benchmark.c  redis-cli.c        replication.o  sds.o       sha1.h          sparkline.h  t_set.c     valgrind.sup  zmalloc.hae_epoll.c   aof.c        blocked.o  crc64.c   dict.h        help.h         lzf_c.c    memtest.o        object.o      rand.c       redis-benchmark.o  redis-cli.o        rio.c          sentinel.c  sha1.o          sparkline.o  t_set.o     version.h     zmalloc.oae_evport.c  aof.o        cluster.c  crc64.h   dict.o        hyperloglog.c  lzf_c.o    mkreleasehdr.sh  pqsort.c      rand.h       redis-check-aof    redis-sentinel     rio.h          sentinel.o  slowlog.c       syncio.c     t_string.c  ziplist.cae.h         asciilogo.h  cluster.h  crc64.o   endianconv.c  hyperloglog.o  lzf_d.c    multi.c          pqsort.h      rand.o       redis-check-aof.c  redis-server       rio.o          server.c    slowlog.h       syncio.o     t_string.o  ziplist.hae_kqueue.c  bio.c        cluster.o  db.c      endianconv.h  intset.c       lzf_d.o    multi.o          pqsort.o      rdb.c        redis-check-aof.o  redis-trib.rb      scripting.c    server.h    slowlog.o       testhelp.h   t_zset.c    ziplist.oae.o         bio.h        config.c   db.o      endianconv.o  intset.h       lzf.h      networking.c     pubsub.c      rdb.h        redis-check-rdb    release.c          scripting.o    server.o    solarisfixes.h  t_hash.c     t_zset.o    zipmap.c[root@itsecond src]# redis-server4510:C 22 Feb 19:09:05.981 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf4510:M 22 Feb 19:09:05.982 * Increased maximum number of open files to 10032 (it was originally set to 1024).                _._                                                             _.-``__ ''-._                                                   _.-``    `.  `_.  ''-._           Redis 3.2.3 (00000000/0) 64 bit  .-`` .-```.  ```\/    _.,_ ''-._                                    (    '      ,       .-`  | `,    )     Running in standalone mode |`-._`-...-` __...-.``-._|'` _.-'|     Port: 6379 |    `-._   `._    /     _.-'    |     PID: 4510  `-._    `-._  `-./  _.-'    _.-'                                    |`-._`-._    `-.__.-'    _.-'_.-'|                                   |    `-._`-._        _.-'_.-'    |           http://redis.io          `-._    `-._`-.__.-'_.-'    _.-'                                    |`-._`-._    `-.__.-'    _.-'_.-'|                                   |    `-._`-._        _.-'_.-'    |                                    `-._    `-._`-.__.-'_.-'    _.-'                                         `-._    `-.__.-'    _.-'                                                 `-._        _.-'                                                         `-.__.-'                                               4510:M 22 Feb 19:09:05.983 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.4510:M 22 Feb 19:09:05.983 # Server started, Redis version 3.2.34510:M 22 Feb 19:09:05.984 # 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.4510:M 22 Feb 19:09:05.984 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.4510:M 22 Feb 19:09:05.984 * The server is now ready to accept connections on port 6379

3.1指定配置文件启动

但是这样没有办法在这个tab下做任何操作了,因为这个时候使用Ctrl+c之后,就变成了这个样子:

[root@itsecond src]# ./redis-server 4529:C 22 Feb 19:11:24.098 # Warning: no config file specified, using the default config. In order to specify a config file use ./redis-server /path/to/redis.conf4529:M 22 Feb 19:11:24.098 * Increased maximum number of open files to 10032 (it was originally set to 1024).                _._                                                             _.-``__ ''-._                                                   _.-``    `.  `_.  ''-._           Redis 3.2.3 (00000000/0) 64 bit  .-`` .-```.  ```\/    _.,_ ''-._                                    (    '      ,       .-`  | `,    )     Running in standalone mode |`-._`-...-` __...-.``-._|'` _.-'|     Port: 6379 |    `-._   `._    /     _.-'    |     PID: 4529  `-._    `-._  `-./  _.-'    _.-'                                    |`-._`-._    `-.__.-'    _.-'_.-'|                                   |    `-._`-._        _.-'_.-'    |           http://redis.io          `-._    `-._`-.__.-'_.-'    _.-'                                    |`-._`-._    `-.__.-'    _.-'_.-'|                                   |    `-._`-._        _.-'_.-'    |                                    `-._    `-._`-.__.-'_.-'    _.-'                                         `-._    `-.__.-'    _.-'                                                 `-._        _.-'                                                         `-.__.-'                                               4529:M 22 Feb 19:11:24.099 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.4529:M 22 Feb 19:11:24.099 # Server started, Redis version 3.2.34529:M 22 Feb 19:11:24.099 # 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.4529:M 22 Feb 19:11:24.099 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.4529:M 22 Feb 19:11:24.099 * The server is now ready to accept connections on port 6379^C4529:signal-handler (1519297886) Received SIGINT scheduling shutdown...4529:M 22 Feb 19:11:26.731 # User requested shutdown...4529:M 22 Feb 19:11:26.731 * Saving the final RDB snapshot before exiting.4529:M 22 Feb 19:11:26.740 * DB saved on disk4529:M 22 Feb 19:11:26.740 # Redis is now ready to exit, bye bye...

然后就关闭了,那么我想让redis在后台启动怎么办呢?

在安装redis之后,我们可以可以找到一个叫redis.conf的文件,这个文件是redis的配置文件位置。

[root@itsecond src]# cd ..[root@itsecond redis-3.2.3]# ls00-RELEASENOTES  BUGS  CONTRIBUTING  COPYING  deps  INSTALL  Makefile  MANIFESTO  README.md  redis.conf  runtest  runtest-cluster  runtest-sentinel  sentinel.conf  src  tests  utils
# unixsocket /tmp/redis.sock# unixsocketperm 700# Close the connection after a client is idle for N seconds (0 to disable)timeout 0# TCP keepalive.## If non-zero, use SO_KEEPALIVE to send TCP ACKs to clients in absence# of communication. This is useful for two reasons:## 1) Detect dead peers.# 2) Take the connection alive from the point of view of network#    equipment in the middle.## On Linux, the specified value (in seconds) is the period used to send ACKs.# Note that to close the connection the double of the time is needed.# On other kernels the period depends on the kernel configuration.## A reasonable value for this option is 300 seconds, which is the new# Redis default starting with Redis 3.2.1.tcp-keepalive 300################################# GENERAL ###################################### By default Redis does not run as a daemon. Use 'yes' if you need it.# Note that Redis will write a pid file in /var/run/redis.pid when daemonized.daemonize no# If you run Redis from upstart or systemd, Redis can interact with your# supervision tree. Options:#   supervised no      - no supervision interaction#   supervised upstart - signal upstart by putting Redis into SIGSTOP mode#   supervised systemd - signal systemd by writing READY=1 to $NOTIFY_SOCKET#   supervised auto    - detect upstart or systemd method based on#                        UPSTART_JOB or NOTIFY_SOCKET environment variables# Note: these supervision methods only signal "process is ready."#       They do not enable continuous liveness pings back to your supervisor.supervised no# If a pid file is specified, Redis writes it where specified at startup# and removes it at exit.## When the server runs non daemonized, no pid file is created if none is# specified in the configuration. When the server is daemonized, the pid file# is used even if not specified, defaulting to "/var/run/redis.pid".## Creating a pid file is best effort: if Redis is not able to create it# nothing bad happens, the server will start and run normally.pidfile /var/run/redis_6379.pid# Specify the server verbosity level.# This can be one of:

这里的general就是一般的配置了,看到第一个配置项,daemonize,这个意思是一段连续运行的程序,具体我不知道什么原理了,但是只是这个意思就是可以后台启动的配置了。

根据说明,把daemonize设置为yes。

# unixsocket /tmp/redis.sock# unixsocketperm 700# Close the connection after a client is idle for N seconds (0 to disable)timeout 0# TCP keepalive.## If non-zero, use SO_KEEPALIVE to send TCP ACKs to clients in absence# of communication. This is useful for two reasons:## 1) Detect dead peers.# 2) Take the connection alive from the point of view of network#    equipment in the middle.## On Linux, the specified value (in seconds) is the period used to send ACKs.# Note that to close the connection the double of the time is needed.# On other kernels the period depends on the kernel configuration.## A reasonable value for this option is 300 seconds, which is the new# Redis default starting with Redis 3.2.1.tcp-keepalive 300################################# GENERAL ###################################### By default Redis does not run as a daemon. Use 'yes' if you need it.# Note that Redis will write a pid file in /var/run/redis.pid when daemonized.daemonize yes# If you run Redis from upstart or systemd, Redis can interact with your# supervision tree. Options:#   supervised no      - no supervision interaction#   supervised upstart - signal upstart by putting Redis into SIGSTOP mode#   supervised systemd - signal systemd by writing READY=1 to $NOTIFY_SOCKET#   supervised auto    - detect upstart or systemd method based on#                        UPSTART_JOB or NOTIFY_SOCKET environment variables# Note: these supervision methods only signal "process is ready."#       They do not enable continuous liveness pings back to your supervisor.supervised no# If a pid file is specified, Redis writes it where specified at startup# and removes it at exit.## When the server runs non daemonized, no pid file is created if none is# specified in the configuration. When the server is daemonized, the pid file# is used even if not specified, defaulting to "/var/run/redis.pid".## Creating a pid file is best effort: if Redis is not able to create it# nothing bad happens, the server will start and run normally.pidfile /var/run/redis_6379.pid# Specify the server verbosity level.# This can be one of:

保存,并退出,启动redis,当然在启动的时候,要注意使用刚刚配置过的配置文件才行。

[root@itsecond src]# ./redis-server ../redis.conf

启动之后没有像之前一样打出一大堆的内容,因为我们用后台启动的缘故,确认是否启动,可以使用ps -ef|grep redis命令。

[root@itsecond src]# ps -aux|grep redisWarning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.8/FAQroot      4545  0.0  0.7 133536  7552 ?        Ssl  19:21   0:00 ./redis-server 127.0.0.1:6379root      4549  0.0  0.0 103332   900 pts/0    S+   19:21   0:00 grep redis

这样,redis就可以后台启动了。

3.2直接启动

  进入redis根目录,执行命令:

  #加上‘&’号使redis以后台程序方式运行

[root@itsecond src]# ./redis-server &[1] 4579[root@itsecond src]# 4579:C 22 Feb 20:07:08.255 # Warning: no config file specified, using the default config. In order to specify a config file use ./redis-server /path/to/redis.conf4579:M 22 Feb 20:07:08.255 * Increased maximum number of open files to 10032 (it was originally set to 1024).                _._                                                             _.-``__ ''-._                                                   _.-``    `.  `_.  ''-._           Redis 3.2.3 (00000000/0) 64 bit  .-`` .-```.  ```\/    _.,_ ''-._                                    (    '      ,       .-`  | `,    )     Running in standalone mode |`-._`-...-` __...-.``-._|'` _.-'|     Port: 6379 |    `-._   `._    /     _.-'    |     PID: 4579  `-._    `-._  `-./  _.-'    _.-'                                    |`-._`-._    `-.__.-'    _.-'_.-'|                                   |    `-._`-._        _.-'_.-'    |           http://redis.io          `-._    `-._`-.__.-'_.-'    _.-'                                    |`-._`-._    `-.__.-'    _.-'_.-'|                                   |    `-._`-._        _.-'_.-'    |                                    `-._    `-._`-.__.-'_.-'    _.-'                                         `-._    `-.__.-'    _.-'                                                 `-._        _.-'                                                         `-.__.-'                                               4579:M 22 Feb 20:07:08.256 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.4579:M 22 Feb 20:07:08.256 # Server started, Redis version 3.2.34579:M 22 Feb 20:07:08.256 # 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.4579:M 22 Feb 20:07:08.256 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.4579:M 22 Feb 20:07:08.256 * DB loaded from disk: 0.000 seconds4579:M 22 Feb 20:07:08.256 * The server is now ready to accept connections on port 6379

总结一下,本文介绍了两种redis启动方式:指定配置文件启动和直接启动,个人比较偏向与直接启动。

转载于:https://my.oschina.net/gaoenwei/blog/1622588

你可能感兴趣的文章
直方图均衡化 EqualizeHist
查看>>
tcpdump+wireshark 调试网络应用
查看>>
CentOS6.4配置yum源
查看>>
MFC 用CreateWindow创建的动态Button,如何指定ID?
查看>>
linux sed常用
查看>>
excel数据统计分析面面观
查看>>
jquery Map
查看>>
Linux下安装JDK的几种方法
查看>>
Centos6.5 WIFI无线网卡驱动BCM43142驱动安装
查看>>
linux 安装 oracle 11g
查看>>
我的友情链接
查看>>
windows注册表修改同步时间频率
查看>>
nginx的七层负载均衡
查看>>
TestNG report in IDEA
查看>>
mysql事务
查看>>
Oracle Virtualbox视图切换
查看>>
安装vCenter6.0遇到的问题以及解决方法
查看>>
zabbix调优
查看>>
我的友情链接
查看>>
Godaddy域名如何使用DNSPod做DNS解析
查看>>