centos上安装redis

2019独角兽企业重金招聘Python工程师标准>>> 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/local
redis-3.2.3/
redis-3.2.3/.gitignore
redis-3.2.3/00-RELEASENOTES
redis-3.2.3/BUGS
redis-3.2.3/CONTRIBUTING
redis-3.2.3/COPYING
redis-3.2.3/INSTALL
redis-3.2.3/MANIFESTO
redis-3.2.3/Makefile
redis-3.2.3/README.md
redis-3.2.3/deps/
redis-3.2.3/deps/Makefile
redis-3.2.3/deps/README.md
redis-3.2.3/deps/geohash-int/
redis-3.2.3/deps/geohash-int/Makefile
redis-3.2.3/deps/geohash-int/geohash.c
redis-3.2.3/deps/geohash-int/geohash.h
redis-3.2.3/deps/geohash-int/geohash_helper.c
redis-3.2.3/deps/geohash-int/geohash_helper.h
redis-3.2.3/deps/hiredis/
redis-3.2.3/deps/hiredis/.gitignore
redis-3.2.3/deps/hiredis/.travis.yml
redis-3.2.3/deps/hiredis/CHANGELOG.md
redis-3.2.3/deps/hiredis/COPYING
redis-3.2.3/deps/hiredis/Makefile
redis-3.2.3/deps/hiredis/README.md
redis-3.2.3/deps/hiredis/adapters/
redis-3.2.3/deps/hiredis/adapters/ae.h
redis-3.2.3/deps/hiredis/adapters/libev.h
redis-3.2.3/deps/hiredis/adapters/libevent.h
redis-3.2.3/deps/hiredis/adapters/libuv.h
redis-3.2.3/deps/hiredis/async.c
redis-3.2.3/deps/hiredis/async.h
redis-3.2.3/deps/hiredis/dict.c
redis-3.2.3/deps/hiredis/dict.h
redis-3.2.3/deps/hiredis/examples/
redis-3.2.3/deps/hiredis/examples/example-ae.c
redis-3.2.3/deps/hiredis/examples/example-libev.c
redis-3.2.3/deps/hiredis/examples/example-libevent.c
redis-3.2.3/deps/hiredis/examples/example-libuv.c
redis-3.2.3/deps/hiredis/examples/example.c
redis-3.2.3/deps/hiredis/fmacros.h
redis-3.2.3/deps/hiredis/hiredis.c
redis-3.2.3/deps/hiredis/hiredis.h
redis-3.2.3/deps/hiredis/net.c
redis-3.2.3/deps/hiredis/net.h
redis-3.2.3/deps/hiredis/sds.c
redis-3.2.3/deps/hiredis/sds.h
redis-3.2.3/deps/hiredis/sdsalloc.h
redis-3.2.3/deps/hiredis/test.c
redis-3.2.3/deps/hiredis/zmalloc.h
redis-3.2.3/deps/jemalloc/
redis-3.2.3/deps/jemalloc/.autom4te.cfg
redis-3.2.3/deps/jemalloc/.gitattributes
redis-3.2.3/deps/jemalloc/.gitignore
redis-3.2.3/deps/jemalloc/COPYING
redis-3.2.3/deps/jemalloc/ChangeLog
redis-3.2.3/deps/jemalloc/INSTALL
redis-3.2.3/deps/jemalloc/Makefile.in
redis-3.2.3/deps/jemalloc/README
redis-3.2.3/deps/jemalloc/VERSION
redis-3.2.3/deps/jemalloc/autogen.sh
redis-3.2.3/deps/jemalloc/bin/
redis-3.2.3/deps/jemalloc/bin/jemalloc-config.in
redis-3.2.3/deps/jemalloc/bin/jemalloc.sh.in
redis-3.2.3/deps/jemalloc/bin/jeprof.in
redis-3.2.3/deps/jemalloc/config.guess
redis-3.2.3/deps/jemalloc/config.stamp.in
redis-3.2.3/deps/jemalloc/config.sub
redis-3.2.3/deps/jemalloc/configure
redis-3.2.3/deps/jemalloc/configure.ac
redis-3.2.3/deps/jemalloc/coverage.sh
redis-3.2.3/deps/jemalloc/doc/
redis-3.2.3/deps/jemalloc/doc/html.xsl.in
redis-3.2.3/deps/jemalloc/doc/jemalloc.3
redis-3.2.3/deps/jemalloc/doc/jemalloc.html
redis-3.2.3/deps/jemalloc/doc/jemalloc.xml.in
redis-3.2.3/deps/jemalloc/doc/manpages.xsl.in
redis-3.2.3/deps/jemalloc/doc/stylesheet.xsl
redis-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.h
redis-3.2.3/deps/jemalloc/include/jemalloc/internal/atomic.h
redis-3.2.3/deps/jemalloc/include/jemalloc/internal/base.h
redis-3.2.3/deps/jemalloc/include/jemalloc/internal/bitmap.h
redis-3.2.3/deps/jemalloc/include/jemalloc/internal/chunk.h
redis-3.2.3/deps/jemalloc/include/jemalloc/internal/chunk_dss.h
redis-3.2.3/deps/jemalloc/include/jemalloc/internal/chunk_mmap.h
redis-3.2.3/deps/jemalloc/include/jemalloc/internal/ckh.h
redis-3.2.3/deps/jemalloc/include/jemalloc/internal/ctl.h
redis-3.2.3/deps/jemalloc/include/jemalloc/internal/extent.h
redis-3.2.3/deps/jemalloc/include/jemalloc/internal/hash.h
redis-3.2.3/deps/jemalloc/include/jemalloc/internal/huge.h
redis-3.2.3/deps/jemalloc/include/jemalloc/internal/jemalloc_internal.h.in
redis-3.2.3/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_decls.h
redis-3.2.3/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h.in
redis-3.2.3/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_macros.h
redis-3.2.3/deps/jemalloc/include/jemalloc/internal/mb.h
redis-3.2.3/deps/jemalloc/include/jemalloc/internal/mutex.h
redis-3.2.3/deps/jemalloc/include/jemalloc/internal/pages.h
redis-3.2.3/deps/jemalloc/include/jemalloc/internal/private_namespace.sh
redis-3.2.3/deps/jemalloc/include/jemalloc/internal/private_symbols.txt
redis-3.2.3/deps/jemalloc/include/jemalloc/internal/private_unnamespace.sh
redis-3.2.3/deps/jemalloc/include/jemalloc/internal/prng.h
redis-3.2.3/deps/jemalloc/include/jemalloc/internal/prof.h
redis-3.2.3/deps/jemalloc/include/jemalloc/internal/public_namespace.sh
redis-3.2.3/deps/jemalloc/include/jemalloc/internal/public_unnamespace.sh
redis-3.2.3/deps/jemalloc/include/jemalloc/internal/ql.h
redis-3.2.3/deps/jemalloc/include/jemalloc/internal/qr.h
redis-3.2.3/deps/jemalloc/include/jemalloc/internal/quarantine.h
redis-3.2.3/deps/jemalloc/include/jemalloc/internal/rb.h
redis-3.2.3/deps/jemalloc/include/jemalloc/internal/rtree.h
redis-3.2.3/deps/jemalloc/include/jemalloc/internal/size_classes.sh
redis-3.2.3/deps/jemalloc/include/jemalloc/internal/stats.h
redis-3.2.3/deps/jemalloc/include/jemalloc/internal/tcache.h
redis-3.2.3/deps/jemalloc/include/jemalloc/internal/tsd.h
redis-3.2.3/deps/jemalloc/include/jemalloc/internal/util.h
redis-3.2.3/deps/jemalloc/include/jemalloc/internal/valgrind.h
redis-3.2.3/deps/jemalloc/include/jemalloc/jemalloc.sh
redis-3.2.3/deps/jemalloc/include/jemalloc/jemalloc_defs.h.in
redis-3.2.3/deps/jemalloc/include/jemalloc/jemalloc_macros.h.in
redis-3.2.3/deps/jemalloc/include/jemalloc/jemalloc_mangle.sh
redis-3.2.3/deps/jemalloc/include/jemalloc/jemalloc_protos.h.in
redis-3.2.3/deps/jemalloc/include/jemalloc/jemalloc_rename.sh
redis-3.2.3/deps/jemalloc/include/jemalloc/jemalloc_typedefs.h.in
redis-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.h
redis-3.2.3/deps/jemalloc/include/msvc_compat/C99/stdint.h
redis-3.2.3/deps/jemalloc/include/msvc_compat/strings.h
redis-3.2.3/deps/jemalloc/include/msvc_compat/windows_extra.h
redis-3.2.3/deps/jemalloc/install-sh
redis-3.2.3/deps/jemalloc/jemalloc.pc.in
redis-3.2.3/deps/jemalloc/src/
redis-3.2.3/deps/jemalloc/src/arena.c
redis-3.2.3/deps/jemalloc/src/atomic.c
redis-3.2.3/deps/jemalloc/src/base.c
redis-3.2.3/deps/jemalloc/src/bitmap.c
redis-3.2.3/deps/jemalloc/src/chunk.c
redis-3.2.3/deps/jemalloc/src/chunk_dss.c
redis-3.2.3/deps/jemalloc/src/chunk_mmap.c
redis-3.2.3/deps/jemalloc/src/ckh.c
redis-3.2.3/deps/jemalloc/src/ctl.c
redis-3.2.3/deps/jemalloc/src/extent.c
redis-3.2.3/deps/jemalloc/src/hash.c
redis-3.2.3/deps/jemalloc/src/huge.c
redis-3.2.3/deps/jemalloc/src/jemalloc.c
redis-3.2.3/deps/jemalloc/src/mb.c
redis-3.2.3/deps/jemalloc/src/mutex.c
redis-3.2.3/deps/jemalloc/src/pages.c
redis-3.2.3/deps/jemalloc/src/prof.c
redis-3.2.3/deps/jemalloc/src/quarantine.c
redis-3.2.3/deps/jemalloc/src/rtree.c
redis-3.2.3/deps/jemalloc/src/stats.c
redis-3.2.3/deps/jemalloc/src/tcache.c
redis-3.2.3/deps/jemalloc/src/tsd.c
redis-3.2.3/deps/jemalloc/src/util.c
redis-3.2.3/deps/jemalloc/src/valgrind.c
redis-3.2.3/deps/jemalloc/src/zone.c
redis-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.h
redis-3.2.3/deps/jemalloc/test/include/test/SFMT-params.h
redis-3.2.3/deps/jemalloc/test/include/test/SFMT-params11213.h
redis-3.2.3/deps/jemalloc/test/include/test/SFMT-params1279.h
redis-3.2.3/deps/jemalloc/test/include/test/SFMT-params132049.h
redis-3.2.3/deps/jemalloc/test/include/test/SFMT-params19937.h
redis-3.2.3/deps/jemalloc/test/include/test/SFMT-params216091.h
redis-3.2.3/deps/jemalloc/test/include/test/SFMT-params2281.h
redis-3.2.3/deps/jemalloc/test/include/test/SFMT-params4253.h
redis-3.2.3/deps/jemalloc/test/include/test/SFMT-params44497.h
redis-3.2.3/deps/jemalloc/test/include/test/SFMT-params607.h
redis-3.2.3/deps/jemalloc/test/include/test/SFMT-params86243.h
redis-3.2.3/deps/jemalloc/test/include/test/SFMT-sse2.h
redis-3.2.3/deps/jemalloc/test/include/test/SFMT.h
redis-3.2.3/deps/jemalloc/test/include/test/btalloc.h
redis-3.2.3/deps/jemalloc/test/include/test/jemalloc_test.h.in
redis-3.2.3/deps/jemalloc/test/include/test/jemalloc_test_defs.h.in
redis-3.2.3/deps/jemalloc/test/include/test/math.h
redis-3.2.3/deps/jemalloc/test/include/test/mq.h
redis-3.2.3/deps/jemalloc/test/include/test/mtx.h
redis-3.2.3/deps/jemalloc/test/include/test/test.h
redis-3.2.3/deps/jemalloc/test/include/test/thd.h
redis-3.2.3/deps/jemalloc/test/include/test/timer.h
redis-3.2.3/deps/jemalloc/test/integration/
redis-3.2.3/deps/jemalloc/test/integration/MALLOCX_ARENA.c
redis-3.2.3/deps/jemalloc/test/integration/aligned_alloc.c
redis-3.2.3/deps/jemalloc/test/integration/allocated.c
redis-3.2.3/deps/jemalloc/test/integration/chunk.c
redis-3.2.3/deps/jemalloc/test/integration/mallocx.c
redis-3.2.3/deps/jemalloc/test/integration/overflow.c
redis-3.2.3/deps/jemalloc/test/integration/posix_memalign.c
redis-3.2.3/deps/jemalloc/test/integration/rallocx.c
redis-3.2.3/deps/jemalloc/test/integration/sdallocx.c
redis-3.2.3/deps/jemalloc/test/integration/thread_arena.c
redis-3.2.3/deps/jemalloc/test/integration/thread_tcache_enabled.c
redis-3.2.3/deps/jemalloc/test/integration/xallocx.c
redis-3.2.3/deps/jemalloc/test/src/
redis-3.2.3/deps/jemalloc/test/src/SFMT.c
redis-3.2.3/deps/jemalloc/test/src/btalloc.c
redis-3.2.3/deps/jemalloc/test/src/btalloc_0.c
redis-3.2.3/deps/jemalloc/test/src/btalloc_1.c
redis-3.2.3/deps/jemalloc/test/src/math.c
redis-3.2.3/deps/jemalloc/test/src/mq.c
redis-3.2.3/deps/jemalloc/test/src/mtx.c
redis-3.2.3/deps/jemalloc/test/src/test.c
redis-3.2.3/deps/jemalloc/test/src/thd.c
redis-3.2.3/deps/jemalloc/test/src/timer.c
redis-3.2.3/deps/jemalloc/test/stress/
redis-3.2.3/deps/jemalloc/test/stress/microbench.c
redis-3.2.3/deps/jemalloc/test/test.sh.in
redis-3.2.3/deps/jemalloc/test/unit/
redis-3.2.3/deps/jemalloc/test/unit/SFMT.c
redis-3.2.3/deps/jemalloc/test/unit/atomic.c
redis-3.2.3/deps/jemalloc/test/unit/bitmap.c
redis-3.2.3/deps/jemalloc/test/unit/ckh.c
redis-3.2.3/deps/jemalloc/test/unit/hash.c
redis-3.2.3/deps/jemalloc/test/unit/junk.c
redis-3.2.3/deps/jemalloc/test/unit/junk_alloc.c
redis-3.2.3/deps/jemalloc/test/unit/junk_free.c
redis-3.2.3/deps/jemalloc/test/unit/lg_chunk.c
redis-3.2.3/deps/jemalloc/test/unit/mallctl.c
redis-3.2.3/deps/jemalloc/test/unit/math.c
redis-3.2.3/deps/jemalloc/test/unit/mq.c
redis-3.2.3/deps/jemalloc/test/unit/mtx.c
redis-3.2.3/deps/jemalloc/test/unit/prof_accum.c
redis-3.2.3/deps/jemalloc/test/unit/prof_active.c
redis-3.2.3/deps/jemalloc/test/unit/prof_gdump.c
redis-3.2.3/deps/jemalloc/test/unit/prof_idump.c
redis-3.2.3/deps/jemalloc/test/unit/prof_reset.c
redis-3.2.3/deps/jemalloc/test/unit/prof_thread_name.c
redis-3.2.3/deps/jemalloc/test/unit/ql.c
redis-3.2.3/deps/jemalloc/test/unit/qr.c
redis-3.2.3/deps/jemalloc/test/unit/quarantine.c
redis-3.2.3/deps/jemalloc/test/unit/rb.c
redis-3.2.3/deps/jemalloc/test/unit/rtree.c
redis-3.2.3/deps/jemalloc/test/unit/size_classes.c
redis-3.2.3/deps/jemalloc/test/unit/stats.c
redis-3.2.3/deps/jemalloc/test/unit/tsd.c
redis-3.2.3/deps/jemalloc/test/unit/util.c
redis-3.2.3/deps/jemalloc/test/unit/zero.c
redis-3.2.3/deps/linenoise/
redis-3.2.3/deps/linenoise/.gitignore
redis-3.2.3/deps/linenoise/Makefile
redis-3.2.3/deps/linenoise/README.markdown
redis-3.2.3/deps/linenoise/example.c
redis-3.2.3/deps/linenoise/linenoise.c
redis-3.2.3/deps/linenoise/linenoise.h
redis-3.2.3/deps/lua/
redis-3.2.3/deps/lua/COPYRIGHT
redis-3.2.3/deps/lua/HISTORY
redis-3.2.3/deps/lua/INSTALL
redis-3.2.3/deps/lua/Makefile
redis-3.2.3/deps/lua/README
redis-3.2.3/deps/lua/doc/
redis-3.2.3/deps/lua/doc/contents.html
redis-3.2.3/deps/lua/doc/cover.png
redis-3.2.3/deps/lua/doc/logo.gif
redis-3.2.3/deps/lua/doc/lua.1
redis-3.2.3/deps/lua/doc/lua.css
redis-3.2.3/deps/lua/doc/lua.html
redis-3.2.3/deps/lua/doc/luac.1
redis-3.2.3/deps/lua/doc/luac.html
redis-3.2.3/deps/lua/doc/manual.css
redis-3.2.3/deps/lua/doc/manual.html
redis-3.2.3/deps/lua/doc/readme.html
redis-3.2.3/deps/lua/etc/
redis-3.2.3/deps/lua/etc/Makefile
redis-3.2.3/deps/lua/etc/README
redis-3.2.3/deps/lua/etc/all.c
redis-3.2.3/deps/lua/etc/lua.hpp
redis-3.2.3/deps/lua/etc/lua.ico
redis-3.2.3/deps/lua/etc/lua.pc
redis-3.2.3/deps/lua/etc/luavs.bat
redis-3.2.3/deps/lua/etc/min.c
redis-3.2.3/deps/lua/etc/noparser.c
redis-3.2.3/deps/lua/etc/strict.lua
redis-3.2.3/deps/lua/src/
redis-3.2.3/deps/lua/src/Makefile
redis-3.2.3/deps/lua/src/fpconv.c
redis-3.2.3/deps/lua/src/fpconv.h
redis-3.2.3/deps/lua/src/lapi.c
redis-3.2.3/deps/lua/src/lapi.h
redis-3.2.3/deps/lua/src/lauxlib.c
redis-3.2.3/deps/lua/src/lauxlib.h
redis-3.2.3/deps/lua/src/lbaselib.c
redis-3.2.3/deps/lua/src/lcode.c
redis-3.2.3/deps/lua/src/lcode.h
redis-3.2.3/deps/lua/src/ldblib.c
redis-3.2.3/deps/lua/src/ldebug.c
redis-3.2.3/deps/lua/src/ldebug.h
redis-3.2.3/deps/lua/src/ldo.c
redis-3.2.3/deps/lua/src/ldo.h
redis-3.2.3/deps/lua/src/ldump.c
redis-3.2.3/deps/lua/src/lfunc.c
redis-3.2.3/deps/lua/src/lfunc.h
redis-3.2.3/deps/lua/src/lgc.c
redis-3.2.3/deps/lua/src/lgc.h
redis-3.2.3/deps/lua/src/linit.c
redis-3.2.3/deps/lua/src/liolib.c
redis-3.2.3/deps/lua/src/llex.c
redis-3.2.3/deps/lua/src/llex.h
redis-3.2.3/deps/lua/src/llimits.h
redis-3.2.3/deps/lua/src/lmathlib.c
redis-3.2.3/deps/lua/src/lmem.c
redis-3.2.3/deps/lua/src/lmem.h
redis-3.2.3/deps/lua/src/loadlib.c
redis-3.2.3/deps/lua/src/lobject.c
redis-3.2.3/deps/lua/src/lobject.h
redis-3.2.3/deps/lua/src/lopcodes.c
redis-3.2.3/deps/lua/src/lopcodes.h
redis-3.2.3/deps/lua/src/loslib.c
redis-3.2.3/deps/lua/src/lparser.c
redis-3.2.3/deps/lua/src/lparser.h
redis-3.2.3/deps/lua/src/lstate.c
redis-3.2.3/deps/lua/src/lstate.h
redis-3.2.3/deps/lua/src/lstring.c
redis-3.2.3/deps/lua/src/lstring.h
redis-3.2.3/deps/lua/src/lstrlib.c
redis-3.2.3/deps/lua/src/ltable.c
redis-3.2.3/deps/lua/src/ltable.h
redis-3.2.3/deps/lua/src/ltablib.c
redis-3.2.3/deps/lua/src/ltm.c
redis-3.2.3/deps/lua/src/ltm.h
redis-3.2.3/deps/lua/src/lua.c
redis-3.2.3/deps/lua/src/lua.h
redis-3.2.3/deps/lua/src/lua_bit.c
redis-3.2.3/deps/lua/src/lua_cjson.c
redis-3.2.3/deps/lua/src/lua_cmsgpack.c
redis-3.2.3/deps/lua/src/lua_struct.c
redis-3.2.3/deps/lua/src/luac.c
redis-3.2.3/deps/lua/src/luaconf.h
redis-3.2.3/deps/lua/src/lualib.h
redis-3.2.3/deps/lua/src/lundump.c
redis-3.2.3/deps/lua/src/lundump.h
redis-3.2.3/deps/lua/src/lvm.c
redis-3.2.3/deps/lua/src/lvm.h
redis-3.2.3/deps/lua/src/lzio.c
redis-3.2.3/deps/lua/src/lzio.h
redis-3.2.3/deps/lua/src/print.c
redis-3.2.3/deps/lua/src/strbuf.c
redis-3.2.3/deps/lua/src/strbuf.h
redis-3.2.3/deps/lua/test/
redis-3.2.3/deps/lua/test/README
redis-3.2.3/deps/lua/test/bisect.lua
redis-3.2.3/deps/lua/test/cf.lua
redis-3.2.3/deps/lua/test/echo.lua
redis-3.2.3/deps/lua/test/env.lua
redis-3.2.3/deps/lua/test/factorial.lua
redis-3.2.3/deps/lua/test/fib.lua
redis-3.2.3/deps/lua/test/fibfor.lua
redis-3.2.3/deps/lua/test/globals.lua
redis-3.2.3/deps/lua/test/hello.lua
redis-3.2.3/deps/lua/test/life.lua
redis-3.2.3/deps/lua/test/luac.lua
redis-3.2.3/deps/lua/test/printf.lua
redis-3.2.3/deps/lua/test/readonly.lua
redis-3.2.3/deps/lua/test/sieve.lua
redis-3.2.3/deps/lua/test/sort.lua
redis-3.2.3/deps/lua/test/table.lua
redis-3.2.3/deps/lua/test/trace-calls.lua
redis-3.2.3/deps/lua/test/trace-globals.lua
redis-3.2.3/deps/lua/test/xd.lua
redis-3.2.3/deps/update-jemalloc.sh
redis-3.2.3/redis.conf
redis-3.2.3/runtest
redis-3.2.3/runtest-cluster
redis-3.2.3/runtest-sentinel
redis-3.2.3/sentinel.conf
redis-3.2.3/src/
redis-3.2.3/src/.gitignore
redis-3.2.3/src/Makefile
redis-3.2.3/src/Makefile.dep
redis-3.2.3/src/adlist.c
redis-3.2.3/src/adlist.h
redis-3.2.3/src/ae.c
redis-3.2.3/src/ae.h
redis-3.2.3/src/ae_epoll.c
redis-3.2.3/src/ae_evport.c
redis-3.2.3/src/ae_kqueue.c
redis-3.2.3/src/ae_select.c
redis-3.2.3/src/anet.c
redis-3.2.3/src/anet.h
redis-3.2.3/src/aof.c
redis-3.2.3/src/asciilogo.h
redis-3.2.3/src/bio.c
redis-3.2.3/src/bio.h
redis-3.2.3/src/bitops.c
redis-3.2.3/src/blocked.c
redis-3.2.3/src/cluster.c
redis-3.2.3/src/cluster.h
redis-3.2.3/src/config.c
redis-3.2.3/src/config.h
redis-3.2.3/src/crc16.c
redis-3.2.3/src/crc64.c
redis-3.2.3/src/crc64.h
redis-3.2.3/src/db.c
redis-3.2.3/src/debug.c
redis-3.2.3/src/debugmacro.h
redis-3.2.3/src/dict.c
redis-3.2.3/src/dict.h
redis-3.2.3/src/endianconv.c
redis-3.2.3/src/endianconv.h
redis-3.2.3/src/fmacros.h
redis-3.2.3/src/geo.c
redis-3.2.3/src/geo.h
redis-3.2.3/src/help.h
redis-3.2.3/src/hyperloglog.c
redis-3.2.3/src/intset.c
redis-3.2.3/src/intset.h
redis-3.2.3/src/latency.c
redis-3.2.3/src/latency.h
redis-3.2.3/src/lzf.h
redis-3.2.3/src/lzfP.h
redis-3.2.3/src/lzf_c.c
redis-3.2.3/src/lzf_d.c
redis-3.2.3/src/memtest.c
redis-3.2.3/src/mkreleasehdr.sh
redis-3.2.3/src/multi.c
redis-3.2.3/src/networking.c
redis-3.2.3/src/notify.c
redis-3.2.3/src/object.c
redis-3.2.3/src/pqsort.c
redis-3.2.3/src/pqsort.h
redis-3.2.3/src/pubsub.c
redis-3.2.3/src/quicklist.c
redis-3.2.3/src/quicklist.h
redis-3.2.3/src/rand.c
redis-3.2.3/src/rand.h
redis-3.2.3/src/rdb.c
redis-3.2.3/src/rdb.h
redis-3.2.3/src/redis-benchmark.c
redis-3.2.3/src/redis-check-aof.c
redis-3.2.3/src/redis-check-rdb.c
redis-3.2.3/src/redis-cli.c
redis-3.2.3/src/redis-trib.rb
redis-3.2.3/src/redisassert.h
redis-3.2.3/src/release.c
redis-3.2.3/src/replication.c
redis-3.2.3/src/rio.c
redis-3.2.3/src/rio.h
redis-3.2.3/src/scripting.c
redis-3.2.3/src/sds.c
redis-3.2.3/src/sds.h
redis-3.2.3/src/sdsalloc.h
redis-3.2.3/src/sentinel.c
redis-3.2.3/src/server.c
redis-3.2.3/src/server.h
redis-3.2.3/src/setproctitle.c
redis-3.2.3/src/sha1.c
redis-3.2.3/src/sha1.h
redis-3.2.3/src/slowlog.c
redis-3.2.3/src/slowlog.h
redis-3.2.3/src/solarisfixes.h
redis-3.2.3/src/sort.c
redis-3.2.3/src/sparkline.c
redis-3.2.3/src/sparkline.h
redis-3.2.3/src/syncio.c
redis-3.2.3/src/t_hash.c
redis-3.2.3/src/t_list.c
redis-3.2.3/src/t_set.c
redis-3.2.3/src/t_string.c
redis-3.2.3/src/t_zset.c
redis-3.2.3/src/testhelp.h
redis-3.2.3/src/util.c
redis-3.2.3/src/util.h
redis-3.2.3/src/valgrind.sup
redis-3.2.3/src/version.h
redis-3.2.3/src/ziplist.c
redis-3.2.3/src/ziplist.h
redis-3.2.3/src/zipmap.c
redis-3.2.3/src/zipmap.h
redis-3.2.3/src/zmalloc.c
redis-3.2.3/src/zmalloc.h
redis-3.2.3/tests/
redis-3.2.3/tests/assets/
redis-3.2.3/tests/assets/default.conf
redis-3.2.3/tests/assets/encodings.rdb
redis-3.2.3/tests/assets/hash-zipmap.rdb
redis-3.2.3/tests/cluster/
redis-3.2.3/tests/cluster/cluster.tcl
redis-3.2.3/tests/cluster/run.tcl
redis-3.2.3/tests/cluster/tests/
redis-3.2.3/tests/cluster/tests/00-base.tcl
redis-3.2.3/tests/cluster/tests/01-faildet.tcl
redis-3.2.3/tests/cluster/tests/02-failover.tcl
redis-3.2.3/tests/cluster/tests/03-failover-loop.tcl
redis-3.2.3/tests/cluster/tests/04-resharding.tcl
redis-3.2.3/tests/cluster/tests/05-slave-selection.tcl
redis-3.2.3/tests/cluster/tests/06-slave-stop-cond.tcl
redis-3.2.3/tests/cluster/tests/07-replica-migration.tcl
redis-3.2.3/tests/cluster/tests/08-update-msg.tcl
redis-3.2.3/tests/cluster/tests/09-pubsub.tcl
redis-3.2.3/tests/cluster/tests/10-manual-failover.tcl
redis-3.2.3/tests/cluster/tests/11-manual-takeover.tcl
redis-3.2.3/tests/cluster/tests/12-replica-migration-2.tcl
redis-3.2.3/tests/cluster/tests/helpers/
redis-3.2.3/tests/cluster/tests/helpers/onlydots.tcl
redis-3.2.3/tests/cluster/tests/includes/
redis-3.2.3/tests/cluster/tests/includes/init-tests.tcl
redis-3.2.3/tests/cluster/tmp/
redis-3.2.3/tests/cluster/tmp/.gitignore
redis-3.2.3/tests/helpers/
redis-3.2.3/tests/helpers/bg_complex_data.tcl
redis-3.2.3/tests/helpers/gen_write_load.tcl
redis-3.2.3/tests/instances.tcl
redis-3.2.3/tests/integration/
redis-3.2.3/tests/integration/aof-race.tcl
redis-3.2.3/tests/integration/aof.tcl
redis-3.2.3/tests/integration/convert-zipmap-hash-on-load.tcl
redis-3.2.3/tests/integration/logging.tcl
redis-3.2.3/tests/integration/rdb.tcl
redis-3.2.3/tests/integration/redis-cli.tcl
redis-3.2.3/tests/integration/replication-2.tcl
redis-3.2.3/tests/integration/replication-3.tcl
redis-3.2.3/tests/integration/replication-4.tcl
redis-3.2.3/tests/integration/replication-psync.tcl
redis-3.2.3/tests/integration/replication.tcl
redis-3.2.3/tests/sentinel/
redis-3.2.3/tests/sentinel/run.tcl
redis-3.2.3/tests/sentinel/tests/
redis-3.2.3/tests/sentinel/tests/00-base.tcl
redis-3.2.3/tests/sentinel/tests/01-conf-update.tcl
redis-3.2.3/tests/sentinel/tests/02-slaves-reconf.tcl
redis-3.2.3/tests/sentinel/tests/03-runtime-reconf.tcl
redis-3.2.3/tests/sentinel/tests/04-slave-selection.tcl
redis-3.2.3/tests/sentinel/tests/05-manual.tcl
redis-3.2.3/tests/sentinel/tests/06-ckquorum.tcl
redis-3.2.3/tests/sentinel/tests/07-down-conditions.tcl
redis-3.2.3/tests/sentinel/tests/includes/
redis-3.2.3/tests/sentinel/tests/includes/init-tests.tcl
redis-3.2.3/tests/sentinel/tmp/
redis-3.2.3/tests/sentinel/tmp/.gitignore
redis-3.2.3/tests/support/
redis-3.2.3/tests/support/cluster.tcl
redis-3.2.3/tests/support/redis.tcl
redis-3.2.3/tests/support/server.tcl
redis-3.2.3/tests/support/test.tcl
redis-3.2.3/tests/support/tmpfile.tcl
redis-3.2.3/tests/support/util.tcl
redis-3.2.3/tests/test_helper.tcl
redis-3.2.3/tests/tmp/
redis-3.2.3/tests/tmp/.gitignore
redis-3.2.3/tests/unit/
redis-3.2.3/tests/unit/aofrw.tcl
redis-3.2.3/tests/unit/auth.tcl
redis-3.2.3/tests/unit/bitfield.tcl
redis-3.2.3/tests/unit/bitops.tcl
redis-3.2.3/tests/unit/dump.tcl
redis-3.2.3/tests/unit/expire.tcl
redis-3.2.3/tests/unit/geo.tcl
redis-3.2.3/tests/unit/hyperloglog.tcl
redis-3.2.3/tests/unit/introspection-2.tcl
redis-3.2.3/tests/unit/introspection.tcl
redis-3.2.3/tests/unit/keyspace.tcl
redis-3.2.3/tests/unit/latency-monitor.tcl
redis-3.2.3/tests/unit/limits.tcl
redis-3.2.3/tests/unit/maxmemory.tcl
redis-3.2.3/tests/unit/memefficiency.tcl
redis-3.2.3/tests/unit/multi.tcl
redis-3.2.3/tests/unit/obuf-limits.tcl
redis-3.2.3/tests/unit/other.tcl
redis-3.2.3/tests/unit/printver.tcl
redis-3.2.3/tests/unit/protocol.tcl
redis-3.2.3/tests/unit/pubsub.tcl
redis-3.2.3/tests/unit/quit.tcl
redis-3.2.3/tests/unit/scan.tcl
redis-3.2.3/tests/unit/scripting.tcl
redis-3.2.3/tests/unit/slowlog.tcl
redis-3.2.3/tests/unit/sort.tcl
redis-3.2.3/tests/unit/type/
redis-3.2.3/tests/unit/type/hash.tcl
redis-3.2.3/tests/unit/type/incr.tcl
redis-3.2.3/tests/unit/type/list-2.tcl
redis-3.2.3/tests/unit/type/list-3.tcl
redis-3.2.3/tests/unit/type/list-common.tcl
redis-3.2.3/tests/unit/type/list.tcl
redis-3.2.3/tests/unit/type/set.tcl
redis-3.2.3/tests/unit/type/string.tcl
redis-3.2.3/tests/unit/type/zset.tcl
redis-3.2.3/utils/
redis-3.2.3/utils/build-static-symbols.tcl
redis-3.2.3/utils/cluster_fail_time.tcl
redis-3.2.3/utils/corrupt_rdb.c
redis-3.2.3/utils/create-cluster/
redis-3.2.3/utils/create-cluster/.gitignore
redis-3.2.3/utils/create-cluster/README
redis-3.2.3/utils/create-cluster/create-cluster
redis-3.2.3/utils/generate-command-help.rb
redis-3.2.3/utils/hashtable/
redis-3.2.3/utils/hashtable/README
redis-3.2.3/utils/hashtable/rehashing.c
redis-3.2.3/utils/hyperloglog/
redis-3.2.3/utils/hyperloglog/.gitignore
redis-3.2.3/utils/hyperloglog/hll-err.rb
redis-3.2.3/utils/hyperloglog/hll-gnuplot-graph.rb
redis-3.2.3/utils/install_server.sh
redis-3.2.3/utils/lru/
redis-3.2.3/utils/lru/README
redis-3.2.3/utils/lru/test-lru.rb
redis-3.2.3/utils/redis-copy.rb
redis-3.2.3/utils/redis-sha1.rb
redis-3.2.3/utils/redis_init_script
redis-3.2.3/utils/redis_init_script.tpl
redis-3.2.3/utils/releasetools/
redis-3.2.3/utils/releasetools/01_create_tarball.sh
redis-3.2.3/utils/releasetools/02_upload_tarball.sh
redis-3.2.3/utils/releasetools/03_test_release.sh
redis-3.2.3/utils/releasetools/04_release_hash.sh
redis-3.2.3/utils/speed-regression.tcl
redis-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 install
cd src && make all
make[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-settings
echo WARN=-Wall -W >> .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 -O2 -g -ggdb   -I../deps/geohash-int -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 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 hiredis
cd hiredis && make static
make[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.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
ar rcs libhiredis.a net.o hiredis.o sds.o async.o
make[3]: Leaving directory `/usr/local/redis-3.2.3/deps/hiredis'
MAKE linenoise
cd linenoise && make
make[3]: Entering directory `/usr/local/redis-3.2.3/deps/linenoise'
cc  -Wall -Os -g  -c linenoise.c
make[3]: Leaving directory `/usr/local/redis-3.2.3/deps/linenoise'
MAKE lua
cd 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.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: 在函数‘f_parser’中:
ldo.c:496: 警告:未使用的变量‘c’
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
ar 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 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+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.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[3]: Leaving directory `/usr/local/redis-3.2.3/deps/lua/src'
MAKE geohash-int
cd geohash-int && make
make[3]: Entering directory `/usr/local/redis-3.2.3/deps/geohash-int'
cc  -Wall -O2 -g  -c geohash.c
cc  -Wall -O2 -g  -c geohash_helper.c
make[3]: Leaving directory `/usr/local/redis-3.2.3/deps/geohash-int'
MAKE jemalloc
cd 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... false
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking whether byte ordering is bigendian... no
checking size of void *... 8
checking size of int... 4
checking size of long... 8
checking size of intmax_t... 8
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking whether pause instruction is compilable... yes
checking for ar... ar
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking whether malloc_usable_size definition can use const argument... no
checking whether __attribute__ syntax is compilable... yes
checking whether compiler supports -fvisibility=hidden... yes
checking whether compiler supports -Werror... yes
checking whether tls_model attribute is compilable... yes
checking whether compiler supports -Werror... yes
checking whether alloc_size attribute is compilable... yes
checking whether compiler supports -Werror... yes
checking whether format(gnu_printf, ...) attribute is compilable... yes
checking whether compiler supports -Werror... yes
checking whether format(printf, ...) attribute is compilable... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking for ranlib... ranlib
checking for ld... /usr/bin/ld
checking for autoconf... false
checking for memalign... yes
checking for valloc... yes
checking configured backtracing method... N/A
checking for sbrk... yes
checking whether utrace(2) is compilable... no
checking whether valgrind is compilable... no
checking whether a program using __builtin_ffsl is compilable... yes
checking LG_PAGE... 12
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking for pthread_create in -lpthread... yes
checking for library containing clock_gettime... -lrt
checking for secure_getenv... no
checking for issetugid... no
checking for _malloc_thread_cleanup... no
checking for _pthread_mutex_init_calloc_cb... no
checking for TLS... yes
checking whether C11 atomics is compilable... no
checking whether atomic(9) is compilable... no
checking whether Darwin OSAtomic*() is compilable... no
checking whether madvise(2) is compilable... yes
checking whether to force 32-bit __sync_{add,sub}_and_fetch()... no
checking whether to force 64-bit __sync_{add,sub}_and_fetch()... no
checking for __builtin_clz... yes
checking whether Darwin OSSpin*() is compilable... no
checking whether glibc malloc hook is compilable... yes
checking whether glibc memalign hook is compilable... yes
checking whether pthreads adaptive mutexes is compilable... yes
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating jemalloc.pc
config.status: creating doc/html.xsl
config.status: creating doc/manpages.xsl
config.status: creating doc/jemalloc.xml
config.status: creating include/jemalloc/jemalloc_macros.h
config.status: creating include/jemalloc/jemalloc_protos.h
config.status: creating include/jemalloc/jemalloc_typedefs.h
config.status: creating include/jemalloc/internal/jemalloc_internal.h
config.status: creating test/test.sh
config.status: creating test/include/test/jemalloc_test.h
config.status: creating config.stamp
config.status: creating bin/jemalloc-config
config.status: creating bin/jemalloc.sh
config.status: creating bin/jeprof
config.status: creating include/jemalloc/jemalloc_defs.h
config.status: creating include/jemalloc/internal/jemalloc_internal_defs.h
config.status: creating test/include/test/jemalloc_test_defs.h
config.status: executing include/jemalloc/internal/private_namespace.h commands
config.status: executing include/jemalloc/internal/private_unnamespace.h commands
config.status: executing include/jemalloc/internal/public_symbols.txt commands
config.status: executing include/jemalloc/internal/public_namespace.h commands
config.status: executing include/jemalloc/internal/public_unnamespace.h commands
config.status: executing include/jemalloc/internal/size_classes.h commands
config.status: executing include/jemalloc/jemalloc_protos_jet.h commands
config.status: executing include/jemalloc/jemalloc_rename.h commands
config.status: executing include/jemalloc/jemalloc_mangle.h commands
config.status: executing include/jemalloc/jemalloc_mangle_jet.h commands
config.status: executing include/jemalloc/jemalloc.h commands
===============================================================================
jemalloc version   : 4.0.3-0-ge9192eacf8935e29fc62fddc2701f7942b1cc02c
library revision   : 2

CONFIG             : --with-lg-quantum=3 --with-jemalloc-prefix=je_ --enable-cc-silence 'CFLAGS=-std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops ' LDFLAGS=
CC                 : gcc
CFLAGS             : -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -fvisibility=hidden
CPPFLAGS           :  -D_GNU_SOURCE -D_REENTRANT
LDFLAGS            : 
EXTRA_LDFLAGS      : 
LIBS               :  -lpthread
TESTLIBS           : -lrt 
RPATH_EXTRA        : 

XSLTPROC           : false
XSLROOT            : 

PREFIX             : /usr/local
BINDIR             : /usr/local/bin
DATADIR            : /usr/local/share
INCLUDEDIR         : /usr/local/include
LIBDIR             : /usr/local/lib
MANDIR             : /usr/local/share/man

srcroot            : 
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            : 0
cc-silence         : 1
debug              : 0
code-coverage      : 0
stats              : 1
prof               : 0
prof-libunwind     : 0
prof-libgcc        : 0
prof-gcc           : 0
tcache             : 1
fill               : 1
utrace             : 0
valgrind           : 0
xmalloc            : 0
munmap             : 0
lazy_lock          : 0
tls                : 1
cache-oblivious    : 1
===============================================================================
cd jemalloc && make CFLAGS="-std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops " LDFLAGS="" lib/libjemalloc.a
make[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.c
gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/arena.o src/arena.c
gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/atomic.o src/atomic.c
gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/base.o src/base.c
gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/bitmap.o src/bitmap.c
gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/chunk.o src/chunk.c
gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/chunk_dss.o src/chunk_dss.c
gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/chunk_mmap.o src/chunk_mmap.c
gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/ckh.o src/ckh.c
gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/ctl.o src/ctl.c
gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/extent.o src/extent.c
gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/hash.o src/hash.c
gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/huge.o src/huge.c
gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/mb.o src/mb.c
gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/mutex.o src/mutex.c
gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/pages.o src/pages.c
gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/prof.o src/prof.c
gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/quarantine.o src/quarantine.c
gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/rtree.o src/rtree.c
gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/stats.o src/stats.c
gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/tcache.o src/tcache.c
gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/util.o src/util.c
gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/tsd.o src/tsd.c
ar 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.o
make[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.o
In 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.o
anet.c: 在函数‘anetSockName’中:
anet.c:640: 警告:dereferencing pointer ‘s’ does break strict-aliasing rules
anet.c:638: 附注:initialized from here
anet.c:644: 警告:dereferencing pointer ‘s’ does break strict-aliasing rules
anet.c:642: 附注:initialized from here
anet.c: 在函数‘anetPeerToString’中:
anet.c:584: 警告:dereferencing pointer ‘s’ does break strict-aliasing rules
anet.c:582: 附注:initialized from here
anet.c:588: 警告:dereferencing pointer ‘s’ does break strict-aliasing rules
anet.c:586: 附注:initialized from here
anet.c: 在函数‘anetTcpAccept’中:
anet.c:555: 警告:dereferencing pointer ‘s’ does break strict-aliasing rules
anet.c:553: 附注:initialized from here
anet.c:559: 警告:dereferencing pointer ‘s’ does break strict-aliasing rules
anet.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-aof

Hint: It's a good idea to run 'make test' ;)

make[1]: Leaving directory `/usr/local/redis-3.2.3/src'
cd src && make install
make[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 install
make[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]# ls
adlist.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.h
adlist.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.o
adlist.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.c
ae.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.h
ae_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.o
ae_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.c
ae.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.h
ae_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.o
ae.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-server
4510: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.conf
4510: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.3
4510: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.conf
4529: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.3
4529: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 disk
4529: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]# ls
00-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 redis
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.8/FAQ
root      4545  0.0  0.7 133536  7552 ?        Ssl  19:21   0:00 ./redis-server 127.0.0.1:6379
root      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.conf
4579: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.3
4579: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 seconds
4579: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

你可能感兴趣的:(数据库,lua,网络)