Redis简介

  Redis是一个开源(BSD许可),内存数据结构存储,用作数据库,缓存和消息代理。它支持数据结构,如 字符串散列列表集合,带有范围查询的排序集位图超级日志,具有半径查询和流的地理空间索引。Redis具有内置复制Lua脚本LRU驱逐事务和不同级别的磁盘持久性,并通过Redis SentinelRedis Cluster自动分区。

  您可以对这些类型运行原子操作,例如附加到字符串 ; 递增哈希值 ; 将元素推送到列表中 ; 计算集合交集, 并集差集 ; 或者在排序集中获得排名最高的成员

为了实现其出色的性能,Redis使用 内存数据集。根据您的使用情况,您可以通过 每隔一段时间将数据集转储到磁盘或通过将每个命令附加到日志来保留它。如果您只需要功能丰富的网络内存缓存,则可以选择禁用持久性。

Redis还支持简单到复杂的主从异步复制,具有非常快速的非阻塞首次同步,自动重新连接以及在网络分割上的部分重新同步。

一.下载

  百度Redis,选中

  

  下载最新版Redis 5.0.3

  

二.上传到Linux服务器

  

三.解压到指定文件

  执行:tar -zxvf redis-5.0.3.tar.gz

  

四.安装gcc,tcl命令编译器

  执行:yum -y install gcc tcl

  查看

  

五.安装【make:执行安装前的检测工作,&&表示命令先后执行,PREFIX:指定安装的目录】

  

  安装日志:

  1. [root@zhen redis-5.0.]# make && make PREFIX=/usr/local/redis install
  2. cd src && make all
  3. make[]: 进入目录“/usr/local/soft/redis-5.0./src
  4. CC Makefile.dep
  5. make[]: 离开目录“/usr/local/soft/redis-5.0./src
  6. make[]: 进入目录“/usr/local/soft/redis-5.0./src
  7. rm -rf redis-server redis-sentinel redis-cli redis-benchmark redis-check-rdb redis-check-aof *.o *.gcda *.gcno *.gcov redis.info lcov-html Makefile.dep dict-benchmark
  8. (cd ../deps && make distclean)
  9. make[]: 进入目录“/usr/local/soft/redis-5.0./deps
  10. (cd hiredis && make clean) > /dev/null || true
  11. (cd linenoise && make clean) > /dev/null || true
  12. (cd lua && make clean) > /dev/null || true
  13. (cd jemalloc && [ -f Makefile ] && make distclean) > /dev/null || true
  14. (rm -f .make-*)
  15. make[]: 离开目录“/usr/local/soft/redis-5.0./deps
  16. (rm -f .make-*)
  17. echo STD=-std=c99 -pedantic -DREDIS_STATIC='' >> .make-settings
  18. echo WARN=-Wall -W -Wno-missing-field-initializers >> .make-settings
  19. echo OPT=-O2 >> .make-settings
  20. echo MALLOC=jemalloc >> .make-settings
  21. echo CFLAGS= >> .make-settings
  22. echo LDFLAGS= >> .make-settings
  23. echo REDIS_CFLAGS= >> .make-settings
  24. echo REDIS_LDFLAGS= >> .make-settings
  25. echo PREV_FINAL_CFLAGS=-std=c99 -pedantic -DREDIS_STATIC='' -Wall -W -Wno-missing-field-initializers -O2 -g -ggdb -I../deps/hiredis -I../deps/linenoise -I../deps/lua/src -DUSE_JEMALLOC -I../deps/jemalloc/include >> .make-settings
  26. echo PREV_FINAL_LDFLAGS= -g -ggdb -rdynamic >> .make-settings
  27. (cd ../deps && make hiredis linenoise lua jemalloc)
  28. make[]: 进入目录“/usr/local/soft/redis-5.0./deps
  29. (cd hiredis && make clean) > /dev/null || true
  30. (cd linenoise && make clean) > /dev/null || true
  31. (cd lua && make clean) > /dev/null || true
  32. (cd jemalloc && [ -f Makefile ] && make distclean) > /dev/null || true
  33. (rm -f .make-*)
  34. (echo "" > .make-cflags)
  35. (echo "" > .make-ldflags)
  36. MAKE hiredis
  37. cd hiredis && make static
  38. make[]: 进入目录“/usr/local/soft/redis-5.0./deps/hiredis
  39. cc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb net.c
  40. cc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb hiredis.c
  41. cc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb sds.c
  42. cc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb async.c
  43. cc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb read.c
  44. ar rcs libhiredis.a net.o hiredis.o sds.o async.o read.o
  45. make[]: 离开目录“/usr/local/soft/redis-5.0./deps/hiredis
  46. MAKE linenoise
  47. cd linenoise && make
  48. make[]: 进入目录“/usr/local/soft/redis-5.0./deps/linenoise
  49. cc -Wall -Os -g -c linenoise.c
  50. make[]: 离开目录“/usr/local/soft/redis-5.0./deps/linenoise
  51. MAKE lua
  52. cd lua/src && make all CFLAGS="-O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' " MYLDFLAGS="" AR="ar rcu"
  53. make[]: 进入目录“/usr/local/soft/redis-5.0./deps/lua/src
  54. cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o lapi.o lapi.c
  55. cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o lcode.o lcode.c
  56. cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o ldebug.o ldebug.c
  57. cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o ldo.o ldo.c
  58. ldo.c: 在函数‘f_parser’中:
  59. ldo.c::: 警告:未使用的变量‘c [-Wunused-variable]
  60. int c = luaZ_lookahead(p->z);
  61. ^
  62. cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o ldump.o ldump.c
  63. cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o lfunc.o lfunc.c
  64. cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o lgc.o lgc.c
  65. cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o llex.o llex.c
  66. cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o lmem.o lmem.c
  67. cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o lobject.o lobject.c
  68. cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o lopcodes.o lopcodes.c
  69. cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o lparser.o lparser.c
  70. cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o lstate.o lstate.c
  71. cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o lstring.o lstring.c
  72. cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o ltable.o ltable.c
  73. cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o ltm.o ltm.c
  74. cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o lundump.o lundump.c
  75. cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o lvm.o lvm.c
  76. cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o lzio.o lzio.c
  77. cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o strbuf.o strbuf.c
  78. cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o fpconv.o fpconv.c
  79. cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o lauxlib.o lauxlib.c
  80. cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o lbaselib.o lbaselib.c
  81. cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o ldblib.o ldblib.c
  82. cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o liolib.o liolib.c
  83. cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o lmathlib.o lmathlib.c
  84. cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o loslib.o loslib.c
  85. cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o ltablib.o ltablib.c
  86. cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o lstrlib.o lstrlib.c
  87. cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o loadlib.o loadlib.c
  88. cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o linit.o linit.c
  89. cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o lua_cjson.o lua_cjson.c
  90. cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o lua_struct.o lua_struct.c
  91. cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o lua_cmsgpack.o lua_cmsgpack.c
  92. cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o lua_bit.o lua_bit.c
  93. 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
  94. ranlib liblua.a
  95. cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o lua.o lua.c
  96. cc -o lua lua.o liblua.a -lm
  97. liblua.a(loslib.o):在函数‘os_tmpname’中:
  98. loslib.c:(.text+0x28c): 警告:the use of `tmpnam' is dangerous, better use `mkstemp'
  99. cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o luac.o luac.c
  100. cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o print.o print.c
  101. cc -o luac luac.o print.o liblua.a -lm
  102. make[]: 离开目录“/usr/local/soft/redis-5.0./deps/lua/src”
  103. MAKE jemalloc
  104. cd jemalloc && ./configure --with-version=5.1.--g0 --with-lg-quantum= --with-jemalloc-prefix=je_ --enable-cc-silence CFLAGS="-std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops " LDFLAGS=""
  105. configure: WARNING: unrecognized options: --enable-cc-silence
  106. checking for xsltproc... false
  107. checking for gcc... gcc
  108. checking whether the C compiler works... yes
  109. checking for C compiler default output file name... a.out
  110. checking for suffix of executables...
  111. checking whether we are cross compiling... no
  112. checking for suffix of object files... o
  113. checking whether we are using the GNU C compiler... yes
  114. checking whether gcc accepts -g... yes
  115. checking for gcc option to accept ISO C89... none needed
  116. checking whether compiler is cray... no
  117. checking whether compiler supports -std=gnu11... yes
  118. checking whether compiler supports -Wall... yes
  119. checking whether compiler supports -Wshorten--to-... no
  120. checking whether compiler supports -Wsign-compare... yes
  121. checking whether compiler supports -Wundef... yes
  122. checking whether compiler supports -Wno-format-zero-length... yes
  123. checking whether compiler supports -pipe... yes
  124. checking whether compiler supports -g3... yes
  125. checking how to run the C preprocessor... gcc -E
  126. checking for g++... no
  127. checking for c++... no
  128. checking for gpp... no
  129. checking for aCC... no
  130. checking for CC... no
  131. checking for cxx... no
  132. checking for cc++... no
  133. checking for cl.exe... no
  134. checking for FCC... no
  135. checking for KCC... no
  136. checking for RCC... no
  137. checking for xlC_r... no
  138. checking for xlC... no
  139. checking whether we are using the GNU C++ compiler... no
  140. checking whether g++ accepts -g... no
  141. checking whether g++ supports C++ features by default... no
  142. checking whether g++ supports C++ features with -std=c++... no
  143. checking whether g++ supports C++ features with -std=c++0x... no
  144. checking whether g++ supports C++ features with +std=c++... no
  145. checking whether g++ supports C++ features with -h std=c++... no
  146. configure: No compiler with C++ support was found
  147. checking for grep that handles long lines and -e... /usr/bin/grep
  148. checking for egrep... /usr/bin/grep -E
  149. checking for ANSI C header files... yes
  150. checking for sys/types.h... yes
  151. checking for sys/stat.h... yes
  152. checking for stdlib.h... yes
  153. checking for string.h... yes
  154. checking for memory.h... yes
  155. checking for strings.h... yes
  156. checking for inttypes.h... yes
  157. checking for stdint.h... yes
  158. checking for unistd.h... yes
  159. checking whether byte ordering is bigendian... no
  160. checking size of void *...
  161. checking size of int...
  162. checking size of long...
  163. checking size of long long...
  164. checking size of intmax_t...
  165. checking build system type... x86_64-pc-linux-gnu
  166. checking host system type... x86_64-pc-linux-gnu
  167. checking whether pause instruction is compilable... yes
  168. checking number of significant virtual address bits...
  169. checking for ar... ar
  170. checking for nm... nm
  171. checking for gawk... gawk
  172. checking malloc.h usability... yes
  173. checking malloc.h presence... yes
  174. checking for malloc.h... yes
  175. checking whether malloc_usable_size definition can use const argument... no
  176. checking for library containing log... -lm
  177. checking whether __attribute__ syntax is compilable... yes
  178. checking whether compiler supports -fvisibility=hidden... yes
  179. checking whether compiler supports -fvisibility=hidden... no
  180. checking whether compiler supports -Werror... yes
  181. checking whether compiler supports -herror_on_warning... no
  182. checking whether tls_model attribute is compilable... yes
  183. checking whether compiler supports -Werror... yes
  184. checking whether compiler supports -herror_on_warning... no
  185. checking whether alloc_size attribute is compilable... yes
  186. checking whether compiler supports -Werror... yes
  187. checking whether compiler supports -herror_on_warning... no
  188. checking whether format(gnu_printf, ...) attribute is compilable... yes
  189. checking whether compiler supports -Werror... yes
  190. checking whether compiler supports -herror_on_warning... no
  191. checking whether format(printf, ...) attribute is compilable... yes
  192. checking for a BSD-compatible install... /usr/bin/install -c
  193. checking for ranlib... ranlib
  194. checking for ld... /usr/bin/ld
  195. checking for autoconf... false
  196. checking for memalign... yes
  197. checking for valloc... yes
  198. checking whether compiler supports -O3... yes
  199. checking whether compiler supports -O3... no
  200. checking whether compiler supports -funroll-loops... yes
  201. checking configured backtracing method... N/A
  202. checking for sbrk... yes
  203. checking whether utrace() is compilable... no
  204. checking whether a program using __builtin_unreachable is compilable... yes
  205. checking whether a program using __builtin_ffsl is compilable... yes
  206. checking LG_PAGE...
  207. checking pthread.h usability... yes
  208. checking pthread.h presence... yes
  209. checking for pthread.h... yes
  210. checking for pthread_create in -lpthread... yes
  211. checking dlfcn.h usability... yes
  212. checking dlfcn.h presence... yes
  213. checking for dlfcn.h... yes
  214. checking for dlsym... no
  215. checking for dlsym in -ldl... yes
  216. checking whether pthread_atfork() is compilable... yes
  217. checking whether pthread_setname_np() is compilable... yes
  218. checking for library containing clock_gettime... none required
  219. checking whether clock_gettime(CLOCK_MONOTONIC_COARSE, ...) is compilable... yes
  220. checking whether clock_gettime(CLOCK_MONOTONIC, ...) is compilable... yes
  221. checking whether mach_absolute_time() is compilable... no
  222. checking whether compiler supports -Werror... yes
  223. checking whether syscall() is compilable... yes
  224. checking for secure_getenv... yes
  225. checking for sched_getcpu... yes
  226. checking for sched_setaffinity... yes
  227. checking for issetugid... no
  228. checking for _malloc_thread_cleanup... no
  229. checking for _pthread_mutex_init_calloc_cb... no
  230. checking for TLS... yes
  231. checking whether C11 atomics is compilable... no
  232. checking whether GCC __atomic atomics is compilable... yes
  233. checking whether GCC __sync atomics is compilable... yes
  234. checking whether Darwin OSAtomic*() is compilable... no
  235. checking whether madvise() is compilable... yes
  236. checking whether madvise(..., MADV_FREE) is compilable... no
  237. checking whether madvise(..., MADV_DONTNEED) is compilable... yes
  238. checking whether madvise(..., MADV_DO[NT]DUMP) is compilable... yes
  239. checking whether madvise(..., MADV_[NO]HUGEPAGE) is compilable... yes
  240. checking whether to force -bit __sync_{add,sub}_and_fetch()... no
  241. checking whether to force -bit __sync_{add,sub}_and_fetch()... no
  242. checking for __builtin_clz... yes
  243. checking whether Darwin os_unfair_lock_*() is compilable... no
  244. checking whether Darwin OSSpin*() is compilable... no
  245. checking whether glibc malloc hook is compilable... yes
  246. checking whether glibc memalign hook is compilable... yes
  247. checking whether pthreads adaptive mutexes is compilable... yes
  248. checking whether compiler supports -D_GNU_SOURCE... yes
  249. checking whether compiler supports -Werror... yes
  250. checking whether compiler supports -herror_on_warning... no
  251. checking whether strerror_r returns char with gnu source is compilable... yes
  252. checking for stdbool.h that conforms to C99... yes
  253. checking for _Bool... yes
  254. configure: creating ./config.status
  255. config.status: creating Makefile
  256. config.status: creating jemalloc.pc
  257. config.status: creating doc/html.xsl
  258. config.status: creating doc/manpages.xsl
  259. config.status: creating doc/jemalloc.xml
  260. config.status: creating include/jemalloc/jemalloc_macros.h
  261. config.status: creating include/jemalloc/jemalloc_protos.h
  262. config.status: creating include/jemalloc/jemalloc_typedefs.h
  263. config.status: creating include/jemalloc/internal/jemalloc_preamble.h
  264. config.status: creating test/test.sh
  265. config.status: creating test/include/test/jemalloc_test.h
  266. config.status: creating config.stamp
  267. config.status: creating bin/jemalloc-config
  268. config.status: creating bin/jemalloc.sh
  269. config.status: creating bin/jeprof
  270. config.status: creating include/jemalloc/jemalloc_defs.h
  271. config.status: creating include/jemalloc/internal/jemalloc_internal_defs.h
  272. config.status: creating test/include/test/jemalloc_test_defs.h
  273. config.status: executing include/jemalloc/internal/public_symbols.txt commands
  274. config.status: executing include/jemalloc/internal/private_symbols.awk commands
  275. config.status: executing include/jemalloc/internal/private_symbols_jet.awk commands
  276. config.status: executing include/jemalloc/internal/public_namespace.h commands
  277. config.status: executing include/jemalloc/internal/public_unnamespace.h commands
  278. config.status: executing include/jemalloc/internal/size_classes.h commands
  279. config.status: executing include/jemalloc/jemalloc_protos_jet.h commands
  280. config.status: executing include/jemalloc/jemalloc_rename.h commands
  281. config.status: executing include/jemalloc/jemalloc_mangle.h commands
  282. config.status: executing include/jemalloc/jemalloc_mangle_jet.h commands
  283. config.status: executing include/jemalloc/jemalloc.h commands
  284. configure: WARNING: unrecognized options: --enable-cc-silence
  285. ===============================================================================
  286. jemalloc version : 5.1.--g0
  287. library revision :
  288.  
  289. CONFIG : --with-version=5.1.--g0 --with-lg-quantum= --with-jemalloc-prefix=je_ --enable-cc-silence 'CFLAGS=-std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops ' LDFLAGS=
  290. CC : gcc
  291. CONFIGURE_CFLAGS : -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops
  292. SPECIFIED_CFLAGS : -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops
  293. EXTRA_CFLAGS :
  294. CPPFLAGS : -D_GNU_SOURCE -D_REENTRANT
  295. CXX : g++
  296. CONFIGURE_CXXFLAGS :
  297. SPECIFIED_CXXFLAGS :
  298. EXTRA_CXXFLAGS :
  299. LDFLAGS :
  300. EXTRA_LDFLAGS :
  301. DSO_LDFLAGS : -shared -Wl,-soname,$(@F)
  302. LIBS : -lm -lpthread -ldl
  303. RPATH_EXTRA :
  304.  
  305. XSLTPROC : false
  306. XSLROOT :
  307.  
  308. PREFIX : /usr/local
  309. BINDIR : /usr/local/bin
  310. DATADIR : /usr/local/share
  311. INCLUDEDIR : /usr/local/include
  312. LIBDIR : /usr/local/lib
  313. MANDIR : /usr/local/share/man
  314.  
  315. srcroot :
  316. abs_srcroot : /usr/local/soft/redis-5.0./deps/jemalloc/
  317. objroot :
  318. abs_objroot : /usr/local/soft/redis-5.0./deps/jemalloc/
  319.  
  320. JEMALLOC_PREFIX : je_
  321. JEMALLOC_PRIVATE_NAMESPACE
  322. : je_
  323. install_suffix :
  324. malloc_conf :
  325. autogen :
  326. debug :
  327. stats :
  328. prof :
  329. prof-libunwind :
  330. prof-libgcc :
  331. prof-gcc :
  332. fill :
  333. utrace :
  334. xmalloc :
  335. log :
  336. lazy_lock :
  337. cache-oblivious :
  338. cxx :
  339. ===============================================================================
  340. cd jemalloc && make CFLAGS="-std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops " LDFLAGS="" lib/libjemalloc.a
  341. make[]: 进入目录“/usr/local/soft/redis-5.0./deps/jemalloc”
  342. gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -DJEMALLOC_NO_PRIVATE_NAMESPACE -o src/jemalloc.sym.o src/jemalloc.c
  343. nm -a src/jemalloc.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/jemalloc.sym
  344. gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -DJEMALLOC_NO_PRIVATE_NAMESPACE -o src/arena.sym.o src/arena.c
  345. nm -a src/arena.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/arena.sym
  346. gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -DJEMALLOC_NO_PRIVATE_NAMESPACE -o src/background_thread.sym.o src/background_thread.c
  347. nm -a src/background_thread.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/background_thread.sym
  348. gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -DJEMALLOC_NO_PRIVATE_NAMESPACE -o src/base.sym.o src/base.c
  349. nm -a src/base.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/base.sym
  350. gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -DJEMALLOC_NO_PRIVATE_NAMESPACE -o src/bin.sym.o src/bin.c
  351. nm -a src/bin.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/bin.sym
  352. gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -DJEMALLOC_NO_PRIVATE_NAMESPACE -o src/bitmap.sym.o src/bitmap.c
  353. nm -a src/bitmap.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/bitmap.sym
  354. gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -DJEMALLOC_NO_PRIVATE_NAMESPACE -o src/ckh.sym.o src/ckh.c
  355. nm -a src/ckh.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/ckh.sym
  356. gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -DJEMALLOC_NO_PRIVATE_NAMESPACE -o src/ctl.sym.o src/ctl.c
  357. nm -a src/ctl.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/ctl.sym
  358. gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -DJEMALLOC_NO_PRIVATE_NAMESPACE -o src/div.sym.o src/div.c
  359. nm -a src/div.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/div.sym
  360. gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -DJEMALLOC_NO_PRIVATE_NAMESPACE -o src/extent.sym.o src/extent.c
  361. nm -a src/extent.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/extent.sym
  362. gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -DJEMALLOC_NO_PRIVATE_NAMESPACE -o src/extent_dss.sym.o src/extent_dss.c
  363. nm -a src/extent_dss.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/extent_dss.sym
  364. gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -DJEMALLOC_NO_PRIVATE_NAMESPACE -o src/extent_mmap.sym.o src/extent_mmap.c
  365. nm -a src/extent_mmap.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/extent_mmap.sym
  366. gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -DJEMALLOC_NO_PRIVATE_NAMESPACE -o src/hash.sym.o src/hash.c
  367. nm -a src/hash.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/hash.sym
  368. gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -DJEMALLOC_NO_PRIVATE_NAMESPACE -o src/hooks.sym.o src/hooks.c
  369. nm -a src/hooks.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/hooks.sym
  370. gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -DJEMALLOC_NO_PRIVATE_NAMESPACE -o src/large.sym.o src/large.c
  371. nm -a src/large.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/large.sym
  372. gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -DJEMALLOC_NO_PRIVATE_NAMESPACE -o src/log.sym.o src/log.c
  373. nm -a src/log.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/log.sym
  374. gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -DJEMALLOC_NO_PRIVATE_NAMESPACE -o src/malloc_io.sym.o src/malloc_io.c
  375. nm -a src/malloc_io.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/malloc_io.sym
  376. gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -DJEMALLOC_NO_PRIVATE_NAMESPACE -o src/mutex.sym.o src/mutex.c
  377. nm -a src/mutex.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/mutex.sym
  378. gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -DJEMALLOC_NO_PRIVATE_NAMESPACE -o src/mutex_pool.sym.o src/mutex_pool.c
  379. nm -a src/mutex_pool.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/mutex_pool.sym
  380. gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -DJEMALLOC_NO_PRIVATE_NAMESPACE -o src/nstime.sym.o src/nstime.c
  381. nm -a src/nstime.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/nstime.sym
  382. gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -DJEMALLOC_NO_PRIVATE_NAMESPACE -o src/pages.sym.o src/pages.c
  383. nm -a src/pages.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/pages.sym
  384. gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -DJEMALLOC_NO_PRIVATE_NAMESPACE -o src/prng.sym.o src/prng.c
  385. nm -a src/prng.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/prng.sym
  386. gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -DJEMALLOC_NO_PRIVATE_NAMESPACE -o src/prof.sym.o src/prof.c
  387. nm -a src/prof.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/prof.sym
  388. gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -DJEMALLOC_NO_PRIVATE_NAMESPACE -o src/rtree.sym.o src/rtree.c
  389. nm -a src/rtree.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/rtree.sym
  390. gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -DJEMALLOC_NO_PRIVATE_NAMESPACE -o src/stats.sym.o src/stats.c
  391. nm -a src/stats.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/stats.sym
  392. gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -DJEMALLOC_NO_PRIVATE_NAMESPACE -o src/sz.sym.o src/sz.c
  393. nm -a src/sz.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/sz.sym
  394. gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -DJEMALLOC_NO_PRIVATE_NAMESPACE -o src/tcache.sym.o src/tcache.c
  395. nm -a src/tcache.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/tcache.sym
  396. gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -DJEMALLOC_NO_PRIVATE_NAMESPACE -o src/ticker.sym.o src/ticker.c
  397. nm -a src/ticker.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/ticker.sym
  398. gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -DJEMALLOC_NO_PRIVATE_NAMESPACE -o src/tsd.sym.o src/tsd.c
  399. nm -a src/tsd.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/tsd.sym
  400. gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -DJEMALLOC_NO_PRIVATE_NAMESPACE -o src/witness.sym.o src/witness.c
  401. nm -a src/witness.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/witness.sym
  402. /bin/sh include/jemalloc/internal/private_namespace.sh src/jemalloc.sym src/arena.sym src/background_thread.sym src/base.sym src/bin.sym src/bitmap.sym src/ckh.sym src/ctl.sym src/div.sym src/extent.sym src/extent_dss.sym src/extent_mmap.sym src/hash.sym src/hooks.sym src/large.sym src/log.sym src/malloc_io.sym src/mutex.sym src/mutex_pool.sym src/nstime.sym src/pages.sym src/prng.sym src/prof.sym src/rtree.sym src/stats.sym src/sz.sym src/tcache.sym src/ticker.sym src/tsd.sym src/witness.sym > include/jemalloc/internal/private_namespace.gen.h
  403. cp include/jemalloc/internal/private_namespace.gen.h include/jemalloc/internal/private_namespace.gen.h
  404. gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/jemalloc.o src/jemalloc.c
  405. gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/arena.o src/arena.c
  406. gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/background_thread.o src/background_thread.c
  407. gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/base.o src/base.c
  408. gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/bin.o src/bin.c
  409. gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/bitmap.o src/bitmap.c
  410. gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/ckh.o src/ckh.c
  411. gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/ctl.o src/ctl.c
  412. gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/div.o src/div.c
  413. gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/extent.o src/extent.c
  414. gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/extent_dss.o src/extent_dss.c
  415. gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/extent_mmap.o src/extent_mmap.c
  416. gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/hash.o src/hash.c
  417. gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/hooks.o src/hooks.c
  418. gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/large.o src/large.c
  419. gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/log.o src/log.c
  420. gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/malloc_io.o src/malloc_io.c
  421. gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/mutex.o src/mutex.c
  422. gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/mutex_pool.o src/mutex_pool.c
  423. gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/nstime.o src/nstime.c
  424. gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/pages.o src/pages.c
  425. gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/prng.o src/prng.c
  426. gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/prof.o src/prof.c
  427. gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/rtree.o src/rtree.c
  428. gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/stats.o src/stats.c
  429. gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/sz.o src/sz.c
  430. gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/tcache.o src/tcache.c
  431. gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/ticker.o src/ticker.c
  432. gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/tsd.o src/tsd.c
  433. gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/witness.o src/witness.c
  434. ar crus lib/libjemalloc.a src/jemalloc.o src/arena.o src/background_thread.o src/base.o src/bin.o src/bitmap.o src/ckh.o src/ctl.o src/div.o src/extent.o src/extent_dss.o src/extent_mmap.o src/hash.o src/hooks.o src/large.o src/log.o src/malloc_io.o src/mutex.o src/mutex_pool.o src/nstime.o src/pages.o src/prng.o src/prof.o src/rtree.o src/stats.o src/sz.o src/tcache.o src/ticker.o src/tsd.o src/witness.o
  435. make[]: 离开目录“/usr/local/soft/redis-5.0./deps/jemalloc”
  436. make[]: 离开目录“/usr/local/soft/redis-5.0./deps”
  437. CC adlist.o
  438. CC quicklist.o
  439. CC ae.o
  440. CC anet.o
  441. CC dict.o
  442. CC server.o
  443. CC sds.o
  444. CC zmalloc.o
  445. CC lzf_c.o
  446. CC lzf_d.o
  447. CC pqsort.o
  448. CC zipmap.o
  449. CC sha1.o
  450. CC ziplist.o
  451. CC release.o
  452. CC networking.o
  453. CC util.o
  454. CC object.o
  455. CC db.o
  456. CC replication.o
  457. CC rdb.o
  458. CC t_string.o
  459. CC t_list.o
  460. CC t_set.o
  461. CC t_zset.o
  462. CC t_hash.o
  463. CC config.o
  464. CC aof.o
  465. CC pubsub.o
  466. CC multi.o
  467. CC debug.o
  468. CC sort.o
  469. CC intset.o
  470. CC syncio.o
  471. CC cluster.o
  472. CC crc16.o
  473. CC endianconv.o
  474. CC slowlog.o
  475. CC scripting.o
  476. CC bio.o
  477. CC rio.o
  478. CC rand.o
  479. CC memtest.o
  480. CC crc64.o
  481. CC bitops.o
  482. CC sentinel.o
  483. CC notify.o
  484. CC setproctitle.o
  485. CC blocked.o
  486. CC hyperloglog.o
  487. CC latency.o
  488. CC sparkline.o
  489. CC redis-check-rdb.o
  490. CC redis-check-aof.o
  491. CC geo.o
  492. CC lazyfree.o
  493. CC module.o
  494. CC evict.o
  495. CC expire.o
  496. CC geohash.o
  497. CC geohash_helper.o
  498. CC childinfo.o
  499. CC defrag.o
  500. CC siphash.o
  501. CC rax.o
  502. CC t_stream.o
  503. CC listpack.o
  504. CC localtime.o
  505. CC lolwut.o
  506. CC lolwut5.o
  507. LINK redis-server
  508. INSTALL redis-sentinel
  509. CC redis-cli.o
  510. LINK redis-cli
  511. CC redis-benchmark.o
  512. LINK redis-benchmark
  513. INSTALL redis-check-rdb
  514. INSTALL redis-check-aof
  515.  
  516. Hint: It's a good idea to run 'make test' ;)
  517.  
  518. make[]: 离开目录“/usr/local/soft/redis-5.0./src
  519. cd src && make install
  520. make[]: 进入目录“/usr/local/soft/redis-5.0./src
  521. CC Makefile.dep
  522. make[]: 离开目录“/usr/local/soft/redis-5.0./src
  523. make[]: 进入目录“/usr/local/soft/redis-5.0./src
  524.  
  525. Hint: It's a good idea to run 'make test' ;)
  526.  
  527. INSTALL install
  528. INSTALL install
  529. INSTALL install
  530. INSTALL install
  531. INSTALL install
  532. make[]: 离开目录“/usr/local/soft/redis-5.0./src”

  

  表示安装成功!

六.测试

  

  执行命令:./bin/redis-server,启动redis

  

  关闭redis服务执行快捷键:Ctrl+C

七.配置redis后台执行

  在profile配置中添加redis配置,下面的REDIS_HOME路径之的就是上面第五部你设置的路径

    

  执行命令:source ./profile,刷新

八.安装Redis系统服务

  进入utils目录下,执行:./install_server.sh,进行安装,其它都按Enter下一步【表示按照默认配置】

  

  此时表示安装成功!

九.Redis服务

  1.查看,执行命令:ps aux | grep -v grep | grep redis-server

  

  2.启动服务,执行命令:service redis_6379 start

  

  3.关闭服务,执行命令:service redis_6379 stop

  

  4.连接redis服务,执行命令:redis-cli

  

  5.执行清单

  1. redis 127.0.0.1:6379> info #查看server版本内存使用连接等信息
  2.  
  3. redis 127.0.0.1:6379> client list #获取客户连接列表
  4.  
  5. redis 127.0.0.1:6379> client kill 127.0.0.1:33441 #终止某个客户端连接
  6.  
  7. redis 127.0.0.1:6379> dbsize #当前保存key的数量
  8.  
  9. redis 127.0.0.1:6379> save #立即保存数据到硬盘
  10.  
  11. redis 127.0.0.1:6379> bgsave #异步保存数据到硬盘
  12.  
  13. redis 127.0.0.1:6379> flushdb #当前库中移除所有key
  14.  
  15. redis 127.0.0.1:6379> flushall #移除所有key从所有库中
  16.  
  17. redis 127.0.0.1:6379> lastsave #获取上次成功保存到硬盘的unix时间戳
  18.  
  19. redis 127.0.0.1:6379> monitor #实时监测服务器接收到的请求
  20.  
  21. redis 127.0.0.1:6379> slowlog len #查询慢查询日志条数(integer) 3
  22.  
  23. redis 127.0.0.1:6379> slowlog get #返回所有的慢查询日志,最大值取决于slowlog-max-len配置
  24.  
  25. redis 127.0.0.1:6379> slowlog get 2 #打印两条慢查询日志
  26.  
  27. redis 127.0.0.1:6379> slowlog reset #清空慢查询日志信息

Redis内存数据库快速入门的更多相关文章

  1. Redis之快速入门与应用[教程/总结]

    内容概要 因为项目中用户注册发送验证码,需要学习redis内存数据库,故而下午花了些时间进行初步学习.本博文性质属于对今日redis学习内容的小结.在看本博文前或者看完后,可以反问自己三个问题:Red ...

  2. Redis 快速入门

    Redis 快速入门 谈到Redis,大家应该都不陌生.它是用c语言开发的一个高性能键值数据库,主要用于缓存领域.本章通过Redis的安装,Redis的五大数据类型,Redis的Java客户端,Red ...

  3. Redis快速入门:安装、配置和操作

    本文是有关Redis的系列技术文章之一.在之前的文章中介绍了<Redis快速入门:初识Redis>,对Redis有了一个初步的了解.今天继续为大家介绍Redis如何安装.配置和操作. 系列 ...

  4. Redis快速入门及实现

    redis的概念 (1)Redis的优点 以下是Redis的一些优点. 异常快 - Redis非常快,每秒可执行大约110000次的设置(SET)操作,每秒大约可执行81000次的读取/获取(GET) ...

  5. [你必须知道的NOSQL系列]专题二:Redis快速入门

    一.前言 在前一篇博文介绍了MongoDB基本操作,本来打算这篇博文继续介绍MongoDB的相关内容的,例如索引,主从备份等内容的,但是发现这些内容都可以通过官方文档都可以看到,并且都非常详细,所以这 ...

  6. 二:Redis快速入门及应用

    Redis的使用难吗?不难,Redis用好容易吗?不容易.Redis的使用虽然不难,但与业务结合的应用场景特别多.特别紧,用好并不容易.我们希望通过一篇文章及Demo,即可轻松.快速入门并学会应用. ...

  7. Redis快速入门及应用

    Redis的使用难吗?不难,Redis用好容易吗?不容易.Redis的使用虽然不难,但与业务结合的应用场景特别多.特别紧,用好并不容易.我们希望通过一篇文章及Demo,即可轻松.快速入门并学会应用.一 ...

  8. Redis 十分钟快速入门

    本教程是一个快速入门教程,所以Redis的命令只是简单介绍了几个常用的,如果有其他需求请求官网查看API 使用. 1. Redis简介 Redis 是完全开源免费的,遵守BSD协议,是一个高性能的ke ...

  9. 中小型研发团队架构实践五:Redis快速入门及应用

    Redis的使用难吗?不难,Redis用好容易吗?不容易.Redis的使用虽然不难,但与业务结合的应用场景特别多.特别紧,用好并不容易.我们希望通过一篇文章及Demo,即可轻松.快速入门并学会应用. ...

随机推荐

  1. 浅入浅出Typescript Decorators

    临时起的兴趣,想写一篇关于ts decorator的文章,就花小半天整理了一下...  这东西,在ES2017里好像也有... 文档的话看这里. 因为临时,就没想写太多文字介绍,带少许文字说明直接开撸 ...

  2. Node.js 使用 RSA 做加密

    RSA RSA加密算法是一种非对称加密算法. 假设 A 与 B 通信.A 和 B 都提供一个公开的公钥.A 把需要传递的信息,先用自己的私钥签名,再用 B 的公钥加密.B 接收到这串密文后,用自己的私 ...

  3. 函数式编程之-定义能够支持Partial application的函数

    是时候介绍如何在F#中定义函数了,在你没有接触过函数式编程语言之前,你也许会觉得C#/Java的语法已经够丰富了,有什么任务做不了呢?当你读过函数式编程之Currying和函数式编程之Partial ...

  4. 使用docker搭建数据分析环境

    注:早在学习<云计算>这门课之前就已经知道docker,学习这门课时老师还鼓励我们自己尝试一下:但是直到去年年底才有机会尝试,用过之后感觉确实很好用.最近需要部署几个shiny应用,又回顾 ...

  5. 【ASP.NET MVC系列】浅谈ASP.NET MVC 视图与控制器传递数据

    ASP.NET MVC系列文章 [01]浅谈Google Chrome浏览器(理论篇) [02]浅谈Google Chrome浏览器(操作篇)(上) [03]浅谈Google Chrome浏览器(操作 ...

  6. maven创建一个简单的web项目

    1.确认maven插件和配置在eclipse中已经完成 如果没完成,可参考这篇博客:http://www.cnblogs.com/mmzs/p/8191979.html 2.在eclipse中用mav ...

  7. Docker在Linux上运行NetCore系列(四)使用私有Nuget与多个本地包引用运行ASPNetCore

    转发请注明此文章作者与路径,请尊重原著,违者必究. 本篇文章演示了使用Dockerfile在Linux(ubuntu16.04)系统上构建ASPNetCore应用,并且在一个解决方案中存在多个项目之间 ...

  8. Docker虚拟机实战

    安装Docker虚拟机 ◆ 先更新yum软件管理器,然后再安装Docker    #更新yum软件管理器    yum -y update    #安装Docker    yum install -y ...

  9. ABP Changing Httpcode status

    小弟初来乍到,分享一些工作学习中遇到的问题和解决方式,如有不准确或是有错误的地方,希望不吝赐教,谢过了.  --Dogtwo 起因: ABP 中异常处理的思路是很清晰的.一共五种类型的异常类. Abp ...

  10. asp.net 二级域名表单认证情况下共享Cookie

    二级域名之间共享Cookie,很重要的一点就是配置,如下: domain设置为.ahdqxx.com,如果你的域名是www.ahdqxx.com,mall.ahdqxx.com,那么请设置你的doma ...