主頁 > 資料庫 > Redis安裝與啟動

Redis安裝與啟動

2021-01-03 06:33:48 資料庫

 概述

Redis【REmote DIctionary Server】作為當前比較流行的NoSql資料庫,以其高性能,高可用的的特點,應用越來越廣泛,深得各大企業和開發人員的青睞,本文主要簡述Redis的下載,安裝,啟動,關閉的整個流程,僅供學習分享使用,如有不足之處,還請指正,

什么是Redis?

Redis 是完全開源的,遵守 BSD 協議,是一個高性能的 key-value 資料庫, Redis 與其他 key - value 快取產品有以下三個特點:
  1. Redis支持資料的持久化,可以將記憶體中的資料保存在磁盤中,重啟的時候可以再次加載進行使用,
  2. Redis不僅僅支持簡單的key-value型別的資料,同時還提供list,set,zset,hash等資料結構的存盤,
  3. Redis支持資料的備份,即master-slave模式的資料備份,

Redis 優勢

  • 性能極高 – Redis能讀的速度是110000次/s,寫的速度是81000次/s ,
  • 豐富的資料型別 – Redis支持二進制案例的 Strings, Lists, Hashes, Sets 及 Ordered Sets 資料型別操作,
  • 原子 – Redis的所有操作都是原子性的,意思就是要么成功執行要么失敗完全不執行,單個操作是原子性的,多個操作也支持事務,即原子性,通過MULTI和EXEC指令包起來,
  • 豐富的特性 – Redis還支持 publish/subscribe, 通知, key 過期等等特性,

Redis安裝環境

  • 作業系統:Linux CentOS 7.0 64位作業系統
  • Redis版本:穩定版 redis6.0.9

Redis下載安裝包

Redis的安裝包,可以到Redis官網進行下載最新穩定版本,目前的穩定版本為redis6.0.9,如下所示:

Redis安裝

1. 下載安裝包【redis-6.0.9.tar.gz】以后,通過Xftp工具,上傳到Linux系統中 HOME/DownLoad中,然后切換到home/DownLoad 并通過 【tar -zxvf redis-6.0.9.tar.gz 】進行解壓到當前目錄,如下所示:

2. 通過過cp -r redis-6.0.9 /usr/local/src/redis 命令,將復制解壓后的目錄到/usr/local/src目錄下,并修改檔案夾名稱為redis,如下所示:

3. 通過gcc -v命令檢測gcc是否安裝,如下所示:

 4. 如果沒有安裝,則通過yum install gcc-c++命令進行安裝,如下所示:

5. gcc安裝成功后,進入到/usr/local/src/redis/deps目錄下,對hiredis lua jemalloc linenoise 四個進行預編譯,命令為【 make hiredis lua jemalloc linenoise 】編譯程序無error出現,則表示預編譯成功,如下所示:

  1 [root@bogon deps]# ls
  2 hiredis  jemalloc  linenoise  lua  Makefile  README.md  update-jemalloc.sh
  3 [root@bogon deps]# make hiredis lua jemalloc linenoise
  4 MAKE hiredis
  5 cd hiredis && make static 
  6 make[1]: Entering directory `/usr/local/src/redis/deps/hiredis'
  7 make[1]: Nothing to be done for `static'.
  8 make[1]: Leaving directory `/usr/local/src/redis/deps/hiredis'
  9 MAKE lua
 10 cd lua/src && make all CFLAGS="-O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' " MYLDFLAGS="" AR="ar rcu"
 11 make[1]: Entering directory `/usr/local/src/redis/deps/lua/src'
 12 make[1]: Nothing to be done for `all'.
 13 make[1]: Leaving directory `/usr/local/src/redis/deps/lua/src'
 14 MAKE jemalloc
 15 cd jemalloc && ./configure --with-version=5.1.0-0-g0 --with-lg-quantum=3 --with-jemalloc-prefix=je_ --enable-cc-silence CFLAGS="-std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops " LDFLAGS=""
 16 configure: WARNING: unrecognized options: --enable-cc-silence
 17 checking for xsltproc... /usr/bin/xsltproc
 18 checking for gcc... gcc
 19 checking whether the C compiler works... yes
 20 checking for C compiler default output file name... a.out
 21 checking for suffix of executables... 
 22 checking whether we are cross compiling... no
 23 checking for suffix of object files... o
 24 checking whether we are using the GNU C compiler... yes
 25 checking whether gcc accepts -g... yes
 26 checking for gcc option to accept ISO C89... none needed
 27 checking whether compiler is cray... no
 28 checking whether compiler supports -std=gnu11... yes
 29 checking whether compiler supports -Wall... yes
 30 checking whether compiler supports -Wshorten-64-to-32... no
 31 checking whether compiler supports -Wsign-compare... yes
 32 checking whether compiler supports -Wundef... yes
 33 checking whether compiler supports -Wno-format-zero-length... yes
 34 checking whether compiler supports -pipe... yes
 35 checking whether compiler supports -g3... yes
 36 checking how to run the C preprocessor... gcc -E
 37 checking for g++... g++
 38 checking whether we are using the GNU C++ compiler... yes
 39 checking whether g++ accepts -g... yes
 40 checking whether g++ supports C++14 features by default... no
 41 checking whether g++ supports C++14 features with -std=c++14... no
 42 checking whether g++ supports C++14 features with -std=c++0x... no
 43 checking whether g++ supports C++14 features with +std=c++14... no
 44 checking whether g++ supports C++14 features with -h std=c++14... no
 45 configure: No compiler with C++14 support was found
 46 checking for grep that handles long lines and -e... /usr/bin/grep
 47 checking for egrep... /usr/bin/grep -E
 48 checking for ANSI C header files... yes
 49 checking for sys/types.h... yes
 50 checking for sys/stat.h... yes
 51 checking for stdlib.h... yes
 52 checking for string.h... yes
 53 checking for memory.h... yes
 54 checking for strings.h... yes
 55 checking for inttypes.h... yes
 56 checking for stdint.h... yes
 57 checking for unistd.h... yes
 58 checking whether byte ordering is bigendian... no
 59 checking size of void *... 8
 60 checking size of int... 4
 61 checking size of long... 8
 62 checking size of long long... 8
 63 checking size of intmax_t... 8
 64 checking build system type... x86_64-pc-linux-gnu
 65 checking host system type... x86_64-pc-linux-gnu
 66 checking whether pause instruction is compilable... yes
 67 checking number of significant virtual address bits... 48
 68 checking for ar... ar
 69 checking for nm... nm
 70 checking for gawk... gawk
 71 checking malloc.h usability... yes
 72 checking malloc.h presence... yes
 73 checking for malloc.h... yes
 74 checking whether malloc_usable_size definition can use const argument... no
 75 checking for library containing log... -lm
 76 checking whether __attribute__ syntax is compilable... yes
 77 checking whether compiler supports -fvisibility=hidden... yes
 78 checking whether compiler supports -fvisibility=hidden... yes
 79 checking whether compiler supports -Werror... yes
 80 checking whether compiler supports -herror_on_warning... no
 81 checking whether tls_model attribute is compilable... yes
 82 checking whether compiler supports -Werror... yes
 83 checking whether compiler supports -herror_on_warning... no
 84 checking whether alloc_size attribute is compilable... yes
 85 checking whether compiler supports -Werror... yes
 86 checking whether compiler supports -herror_on_warning... no
 87 checking whether format(gnu_printf, ...) attribute is compilable... yes
 88 checking whether compiler supports -Werror... yes
 89 checking whether compiler supports -herror_on_warning... no
 90 checking whether format(printf, ...) attribute is compilable... yes
 91 checking for a BSD-compatible install... /usr/bin/install -c
 92 checking for ranlib... ranlib
 93 checking for ld... /usr/bin/ld
 94 checking for autoconf... false
 95 checking for memalign... yes
 96 checking for valloc... yes
 97 checking whether compiler supports -O3... yes
 98 checking whether compiler supports -O3... yes
 99 checking whether compiler supports -funroll-loops... yes
100 checking configured backtracing method... N/A
101 checking for sbrk... yes
102 checking whether utrace(2) is compilable... no
103 checking whether a program using __builtin_unreachable is compilable... yes
104 checking whether a program using __builtin_ffsl is compilable... yes
105 checking LG_PAGE... 12
106 checking pthread.h usability... yes
107 checking pthread.h presence... yes
108 checking for pthread.h... yes
109 checking for pthread_create in -lpthread... yes
110 checking dlfcn.h usability... yes
111 checking dlfcn.h presence... yes
112 checking for dlfcn.h... yes
113 checking for dlsym... no
114 checking for dlsym in -ldl... yes
115 checking whether pthread_atfork(3) is compilable... yes
116 checking whether pthread_setname_np(3) is compilable... yes
117 checking for library containing clock_gettime... none required
118 checking whether clock_gettime(CLOCK_MONOTONIC_COARSE, ...) is compilable... yes
119 checking whether clock_gettime(CLOCK_MONOTONIC, ...) is compilable... yes
120 checking whether mach_absolute_time() is compilable... no
121 checking whether compiler supports -Werror... yes
122 checking whether syscall(2) is compilable... yes
123 checking for secure_getenv... yes
124 checking for sched_getcpu... yes
125 checking for sched_setaffinity... yes
126 checking for issetugid... no
127 checking for _malloc_thread_cleanup... no
128 checking for _pthread_mutex_init_calloc_cb... no
129 checking for TLS... yes
130 checking whether C11 atomics is compilable... no
131 checking whether GCC __atomic atomics is compilable... yes
132 checking whether GCC __sync atomics is compilable... yes
133 checking whether Darwin OSAtomic*() is compilable... no
134 checking whether madvise(2) is compilable... yes
135 checking whether madvise(..., MADV_FREE) is compilable... no
136 checking whether madvise(..., MADV_DONTNEED) is compilable... yes
137 checking whether madvise(..., MADV_DO[NT]DUMP) is compilable... yes
138 checking whether madvise(..., MADV_[NO]HUGEPAGE) is compilable... yes
139 checking whether to force 32-bit __sync_{add,sub}_and_fetch()... no
140 checking whether to force 64-bit __sync_{add,sub}_and_fetch()... no
141 checking for __builtin_clz... yes
142 checking whether Darwin os_unfair_lock_*() is compilable... no
143 checking whether Darwin OSSpin*() is compilable... no
144 checking whether glibc malloc hook is compilable... yes
145 checking whether glibc memalign hook is compilable... yes
146 checking whether pthreads adaptive mutexes is compilable... yes
147 checking whether compiler supports -D_GNU_SOURCE... yes
148 checking whether compiler supports -Werror... yes
149 checking whether compiler supports -herror_on_warning... no
150 checking whether strerror_r returns char with gnu source is compilable... yes
151 checking for stdbool.h that conforms to C99... yes
152 checking for _Bool... yes
153 configure: creating ./config.status
154 config.status: creating Makefile
155 config.status: creating jemalloc.pc
156 config.status: creating doc/html.xsl
157 config.status: creating doc/manpages.xsl
158 config.status: creating doc/jemalloc.xml
159 config.status: creating include/jemalloc/jemalloc_macros.h
160 config.status: creating include/jemalloc/jemalloc_protos.h
161 config.status: creating include/jemalloc/jemalloc_typedefs.h
162 config.status: creating include/jemalloc/internal/jemalloc_preamble.h
163 config.status: creating test/test.sh
164 config.status: creating test/include/test/jemalloc_test.h
165 config.status: creating config.stamp
166 config.status: creating bin/jemalloc-config
167 config.status: creating bin/jemalloc.sh
168 config.status: creating bin/jeprof
169 config.status: creating include/jemalloc/jemalloc_defs.h
170 config.status: include/jemalloc/jemalloc_defs.h is unchanged
171 config.status: creating include/jemalloc/internal/jemalloc_internal_defs.h
172 config.status: include/jemalloc/internal/jemalloc_internal_defs.h is unchanged
173 config.status: creating test/include/test/jemalloc_test_defs.h
174 config.status: test/include/test/jemalloc_test_defs.h is unchanged
175 config.status: executing include/jemalloc/internal/public_symbols.txt commands
176 config.status: executing include/jemalloc/internal/private_symbols.awk commands
177 config.status: executing include/jemalloc/internal/private_symbols_jet.awk commands
178 config.status: executing include/jemalloc/internal/public_namespace.h commands
179 config.status: executing include/jemalloc/internal/public_unnamespace.h commands
180 config.status: executing include/jemalloc/internal/size_classes.h commands
181 config.status: executing include/jemalloc/jemalloc_protos_jet.h commands
182 config.status: executing include/jemalloc/jemalloc_rename.h commands
183 config.status: executing include/jemalloc/jemalloc_mangle.h commands
184 config.status: executing include/jemalloc/jemalloc_mangle_jet.h commands
185 config.status: executing include/jemalloc/jemalloc.h commands
186 configure: WARNING: unrecognized options: --enable-cc-silence
187 ===============================================================================
188 jemalloc version   : 5.1.0-0-g0
189 library revision   : 2
190 
191 CONFIG             : --with-version=5.1.0-0-g0 --with-lg-quantum=3 --with-jemalloc-prefix=je_ --enable-cc-silence 'CFLAGS=-std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops ' LDFLAGS=
192 CC                 : gcc
193 CONFIGURE_CFLAGS   : -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops
194 SPECIFIED_CFLAGS   : -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops 
195 EXTRA_CFLAGS       : 
196 CPPFLAGS           : -D_GNU_SOURCE -D_REENTRANT
197 CXX                : g++
198 CONFIGURE_CXXFLAGS : -fvisibility=hidden -O3
199 SPECIFIED_CXXFLAGS : 
200 EXTRA_CXXFLAGS     : 
201 LDFLAGS            : 
202 EXTRA_LDFLAGS      : 
203 DSO_LDFLAGS        : -shared -Wl,-soname,$(@F)
204 LIBS               : -lm  -lpthread -ldl
205 RPATH_EXTRA        : 
206 
207 XSLTPROC           : /usr/bin/xsltproc
208 XSLROOT            : 
209 
210 PREFIX             : /usr/local
211 BINDIR             : /usr/local/bin
212 DATADIR            : /usr/local/share
213 INCLUDEDIR         : /usr/local/include
214 LIBDIR             : /usr/local/lib
215 MANDIR             : /usr/local/share/man
216 
217 srcroot            : 
218 abs_srcroot        : /usr/local/src/redis/deps/jemalloc/
219 objroot            : 
220 abs_objroot        : /usr/local/src/redis/deps/jemalloc/
221 
222 JEMALLOC_PREFIX    : je_
223 JEMALLOC_PRIVATE_NAMESPACE
224                    : je_
225 install_suffix     : 
226 malloc_conf        : 
227 autogen            : 0
228 debug              : 0
229 stats              : 1
230 prof               : 0
231 prof-libunwind     : 0
232 prof-libgcc        : 0
233 prof-gcc           : 0
234 fill               : 1
235 utrace             : 0
236 xmalloc            : 0
237 log                : 0
238 lazy_lock          : 0
239 cache-oblivious    : 1
240 cxx                : 0
241 ===============================================================================
242 cd jemalloc && make CFLAGS="-std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops " LDFLAGS="" lib/libjemalloc.a
243 make[1]: Entering directory `/usr/local/src/redis/deps/jemalloc'
244 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
245 nm -a src/jemalloc.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/jemalloc.sym
246 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
247 nm -a src/arena.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/arena.sym
248 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
249 nm -a src/background_thread.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/background_thread.sym
250 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
251 nm -a src/base.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/base.sym
252 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
253 nm -a src/bin.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/bin.sym
254 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
255 nm -a src/bitmap.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/bitmap.sym
256 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
257 nm -a src/ckh.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/ckh.sym
258 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
259 nm -a src/ctl.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/ctl.sym
260 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
261 nm -a src/div.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/div.sym
262 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
263 nm -a src/extent.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/extent.sym
264 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
265 nm -a src/extent_dss.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/extent_dss.sym
266 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
267 nm -a src/extent_mmap.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/extent_mmap.sym
268 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
269 nm -a src/hash.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/hash.sym
270 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
271 nm -a src/hooks.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/hooks.sym
272 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
273 nm -a src/large.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/large.sym
274 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
275 nm -a src/log.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/log.sym
276 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
277 nm -a src/malloc_io.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/malloc_io.sym
278 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
279 nm -a src/mutex.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/mutex.sym
280 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
281 nm -a src/mutex_pool.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/mutex_pool.sym
282 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
283 nm -a src/nstime.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/nstime.sym
284 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
285 nm -a src/pages.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/pages.sym
286 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
287 nm -a src/prng.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/prng.sym
288 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
289 nm -a src/prof.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/prof.sym
290 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
291 nm -a src/rtree.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/rtree.sym
292 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
293 nm -a src/stats.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/stats.sym
294 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
295 nm -a src/sz.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/sz.sym
296 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
297 nm -a src/tcache.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/tcache.sym
298 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
299 nm -a src/ticker.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/ticker.sym
300 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
301 nm -a src/tsd.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/tsd.sym
302 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
303 nm -a src/witness.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/witness.sym
304 /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
305 gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/jemalloc.o src/jemalloc.c
306 gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/arena.o src/arena.c
307 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
308 gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/base.o src/base.c
309 gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/bin.o src/bin.c
310 gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/bitmap.o src/bitmap.c
311 gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/ckh.o src/ckh.c
312 gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/ctl.o src/ctl.c
313 gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/div.o src/div.c
314 gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/extent.o src/extent.c
315 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
316 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
317 gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/hash.o src/hash.c
318 gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/hooks.o src/hooks.c
319 gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/large.o src/large.c
320 gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/log.o src/log.c
321 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
322 gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/mutex.o src/mutex.c
323 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
324 gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/nstime.o src/nstime.c
325 gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/pages.o src/pages.c
326 gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/prng.o src/prng.c
327 gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/prof.o src/prof.c
328 gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/rtree.o src/rtree.c
329 gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/stats.o src/stats.c
330 gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/sz.o src/sz.c
331 gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/tcache.o src/tcache.c
332 gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/ticker.o src/ticker.c
333 gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/tsd.o src/tsd.c
334 gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/witness.o src/witness.c
335 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
336 make[1]: Leaving directory `/usr/local/src/redis/deps/jemalloc'
337 MAKE linenoise
338 cd linenoise && make
339 make[1]: Entering directory `/usr/local/src/redis/deps/linenoise'
340 make[1]: `linenoise.o' is up to date.
341 make[1]: Leaving directory `/usr/local/src/redis/deps/linenoise'
342 [root@bogon deps]# 
View Code

6. 預編譯成功后,則回傳上級目錄進一步對redis進行編譯,命令為【make】,編譯程序如下所示:

 1 [root@bogon redis]# make
 2 cd src && make all
 3 make[1]: Entering directory `/usr/local/src/redis/src'
 4     CC Makefile.dep
 5 make[1]: Leaving directory `/usr/local/src/redis/src'
 6 make[1]: Entering directory `/usr/local/src/redis/src'
 7     CC server.o
 8     CC sds.o
 9     CC zmalloc.o
10     CC lzf_c.o
11     CC lzf_d.o
12     CC pqsort.o
13     CC zipmap.o
14     CC sha1.o
15     CC ziplist.o
16     CC release.o
17     CC networking.o
18     CC util.o
19     CC object.o
20     CC db.o
21     CC replication.o
22     CC rdb.o
23     CC t_string.o
24     CC t_list.o
25     CC t_set.o
26     CC t_zset.o
27     CC t_hash.o
28     CC config.o
29     CC aof.o
30     CC pubsub.o
31     CC multi.o
32     CC debug.o
33     CC sort.o
34     CC intset.o
35     CC syncio.o
36     CC cluster.o
37     CC crc16.o
38     CC endianconv.o
39     CC slowlog.o
40     CC scripting.o
41     CC bio.o
42     CC rio.o
43     CC rand.o
44     CC memtest.o
45     CC crcspeed.o
46     CC crc64.o
47     CC bitops.o
48     CC sentinel.o
49     CC notify.o
50     CC setproctitle.o
51     CC blocked.o
52     CC hyperloglog.o
53     CC latency.o
54     CC sparkline.o
55     CC redis-check-rdb.o
56     CC redis-check-aof.o
57     CC geo.o
58     CC lazyfree.o
59     CC module.o
60     CC evict.o
61     CC expire.o
62     CC geohash.o
63     CC geohash_helper.o
64     CC childinfo.o
65     CC defrag.o
66     CC siphash.o
67     CC rax.o
68     CC t_stream.o
69     CC listpack.o
70     CC localtime.o
71     CC lolwut.o
72     CC lolwut5.o
73     CC lolwut6.o
74     CC acl.o
75     CC gopher.o
76     CC tracking.o
77     CC connection.o
78     CC tls.o
79     CC sha256.o
80     CC timeout.o
81     CC setcpuaffinity.o
82     LINK redis-server
83     INSTALL redis-sentinel
84     CC redis-cli.o
85     LINK redis-cli
86     CC redis-benchmark.o
87     LINK redis-benchmark
88     INSTALL redis-check-rdb
89     INSTALL redis-check-aof
90 
91 Hint: It's a good idea to run 'make test' ;)
92 
93 make[1]: Leaving directory `/usr/local/src/redis/src'
View Code

當出現如下所示,則表示編譯成功,如下所示:

 6. 編譯成功后,則顯示如下所示:

7. 通過mkdir /usr/local/redis 命令在/usr/local目錄下,創建redis檔案夾,然后通過make install PREFIX=/usr/local/redis 命令進行安裝redis,

 8. 安裝成功后,切換到/usr/local/redis/bin目錄下進行查看,存在如下所示檔案則表示安裝成功,

 9. 在root目錄下,創建myredis檔案夾,并將/usr/local/src/redis/redis.conf 檔案復制到myredis檔案夾下,【目的:方便后續修改】

復制命令為【cp redis.conf /root/myredis】執行程序如下所示:

 1 [root@bogon bin]# mkdir /root/myredis
 2 [root@bogon bin]# cd ../../
 3 [root@bogon local]# cd src
 4 [root@bogon src]# ls
 5 redis
 6 [root@bogon src]# cd redis
 7 [root@bogon redis]# ll
 8 total 292
 9 -rw-r--r--.  1 root root 108806 Jan  1 20:50 00-RELEASENOTES
10 -rw-r--r--.  1 root root     51 Jan  1 20:50 BUGS
11 -rw-r--r--.  1 root root   2499 Jan  1 20:50 CONTRIBUTING
12 -rw-r--r--.  1 root root   1487 Jan  1 20:50 COPYING
13 drwxr-xr-x.  6 root root    192 Jan  1 21:00 deps
14 -rw-r--r--.  1 root root     11 Jan  1 20:50 INSTALL
15 -rw-r--r--.  1 root root    151 Jan  1 20:50 Makefile
16 -rw-r--r--.  1 root root   6888 Jan  1 20:50 MANIFESTO
17 -rw-r--r--.  1 root root  21099 Jan  1 20:50 README.md
18 -rw-r--r--.  1 root root  84841 Jan  1 20:50 redis.conf
19 -rwxr-xr-x.  1 root root    275 Jan  1 20:50 runtest
20 -rwxr-xr-x.  1 root root    280 Jan  1 20:50 runtest-cluster
21 -rwxr-xr-x.  1 root root    795 Jan  1 20:50 runtest-moduleapi
22 -rwxr-xr-x.  1 root root    281 Jan  1 20:50 runtest-sentinel
23 -rw-r--r--.  1 root root  10744 Jan  1 20:50 sentinel.conf
24 drwxr-xr-x.  3 root root   8192 Jan  1 21:11 src
25 drwxr-xr-x. 11 root root    182 Jan  1 20:50 tests
26 -rw-r--r--.  1 root root   3055 Jan  1 20:50 TLS.md
27 drwxr-xr-x.  9 root root   4096 Jan  1 20:50 utils
28 [root@bogon redis]# cp redis.conf /root/myredis
View Code

10. 復制成功后,到/root/myredis進行查看,如下所示:

 Redis啟動

切換到usr/local/redis/bin目錄,通過命令【./redis-server /root/myredis/redis.conf】進行啟動,啟動成功后,如下所示:

redis默認的視窗是前臺顯示,不可以關閉的,需要重新打開一個視窗,通過redis客戶端【/usr/local/redis/bin/redis-cli】進行訪問,如下所示:

通過按Ctrl+C,可以關閉redis打開的服務端視窗,回傳命令視窗,如下所示:

修改Redis為后臺運行

redis默認為視窗運行,一旦關閉,則停止,可以通過修改組態檔/root/myredis/redis.conf,使redis后臺運行,如下所示:

關于Linux下如何修改檔案,可參考上一篇博文,

重新啟動redis,則以守護行程運行,如下所示:

查看Redis行程

通過命令【ps -ef|grep redis】查看redis相關行程,如下所示:

 Redis關閉服務

通過命令【./redis-cli shutdown】關閉redis服務,如下所示:

 以上就是Redis的下載,安裝,啟動,關閉的整個流程,

 備注

冬夜讀書示子聿(yù)

陸游 〔宋代〕

古人學問無遺力,少壯工夫老始成,
紙上得來終覺淺,絕知此事要躬行, 

轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/243810.html

標籤:其他

上一篇:關于“預售”業務功能的設計

下一篇:MySQL選擇填慷訓礎題

標籤雲
其他(157675) Python(38076) JavaScript(25376) Java(17977) C(15215) 區塊鏈(8255) C#(7972) AI(7469) 爪哇(7425) MySQL(7132) html(6777) 基礎類(6313) sql(6102) 熊猫(6058) PHP(5869) 数组(5741) R(5409) Linux(5327) 反应(5209) 腳本語言(PerlPython)(5129) 非技術區(4971) Android(4554) 数据框(4311) css(4259) 节点.js(4032) C語言(3288) json(3245) 列表(3129) 扑(3119) C++語言(3117) 安卓(2998) 打字稿(2995) VBA(2789) Java相關(2746) 疑難問題(2699) 细绳(2522) 單片機工控(2479) iOS(2429) ASP.NET(2402) MongoDB(2323) 麻木的(2285) 正则表达式(2254) 字典(2211) 循环(2198) 迅速(2185) 擅长(2169) 镖(2155) 功能(1967) .NET技术(1958) Web開發(1951) python-3.x(1918) HtmlCss(1915) 弹簧靴(1913) C++(1909) xml(1889) PostgreSQL(1872) .NETCore(1853) 谷歌表格(1846) Unity3D(1843) for循环(1842)

熱門瀏覽
  • GPU虛擬機創建時間深度優化

    **?桔妹導讀:**GPU虛擬機實體創建速度慢是公有云面臨的普遍問題,由于通常情況下創建虛擬機屬于低頻操作而未引起業界的重視,實際生產中還是存在對GPU實體創建時間有苛刻要求的業務場景。本文將介紹滴滴云在解決該問題時的思路、方法、并展示最終的優化成果。 從公有云服務商那里購買過虛擬主機的資深用戶,一 ......

    uj5u.com 2020-09-10 06:09:13 more
  • 可編程網卡芯片在滴滴云網路的應用實踐

    **?桔妹導讀:**隨著云規模不斷擴大以及業務層面對延遲、帶寬的要求越來越高,采用DPDK 加速網路報文處理的方式在橫向縱向擴展都出現了局限性。可編程芯片成為業界熱點。本文主要講述了可編程網卡芯片在滴滴云網路中的應用實踐,遇到的問題、帶來的收益以及開源社區貢獻。 #1. 資料中心面臨的問題 隨著滴滴 ......

    uj5u.com 2020-09-10 06:10:21 more
  • 滴滴資料通道服務演進之路

    **?桔妹導讀:**滴滴資料通道引擎承載著全公司的資料同步,為下游實時和離線場景提供了必不可少的源資料。隨著任務量的不斷增加,資料通道的整體架構也隨之發生改變。本文介紹了滴滴資料通道的發展歷程,遇到的問題以及今后的規劃。 #1. 背景 資料,對于任何一家互聯網公司來說都是非常重要的資產,公司的大資料 ......

    uj5u.com 2020-09-10 06:11:05 more
  • 滴滴AI Labs斬獲國際機器翻譯大賽中譯英方向世界第三

    **桔妹導讀:**深耕人工智能領域,致力于探索AI讓出行更美好的滴滴AI Labs再次斬獲國際大獎,這次獲獎的專案是什么呢?一起來看看詳細報道吧! 近日,由國際計算語言學協會ACL(The Association for Computational Linguistics)舉辦的世界最具影響力的機器 ......

    uj5u.com 2020-09-10 06:11:29 more
  • MPP (Massively Parallel Processing)大規模并行處理

    1、什么是mpp? MPP (Massively Parallel Processing),即大規模并行處理,在資料庫非共享集群中,每個節點都有獨立的磁盤存盤系統和記憶體系統,業務資料根據資料庫模型和應用特點劃分到各個節點上,每臺資料節點通過專用網路或者商業通用網路互相連接,彼此協同計算,作為整體提供 ......

    uj5u.com 2020-09-10 06:11:41 more
  • 滴滴資料倉庫指標體系建設實踐

    **桔妹導讀:**指標體系是什么?如何使用OSM模型和AARRR模型搭建指標體系?如何統一流程、規范化、工具化管理指標體系?本文會對建設的方法論結合滴滴資料指標體系建設實踐進行解答分析。 #1. 什么是指標體系 ##1.1 指標體系定義 指標體系是將零散單點的具有相互聯系的指標,系統化的組織起來,通 ......

    uj5u.com 2020-09-10 06:12:52 more
  • 單表千萬行資料庫 LIKE 搜索優化手記

    我們經常在資料庫中使用 LIKE 運算子來完成對資料的模糊搜索,LIKE 運算子用于在 WHERE 子句中搜索列中的指定模式。 如果需要查找客戶表中所有姓氏是“張”的資料,可以使用下面的 SQL 陳述句: SELECT * FROM Customer WHERE Name LIKE '張%' 如果需要 ......

    uj5u.com 2020-09-10 06:13:25 more
  • 滴滴Ceph分布式存盤系統優化之鎖優化

    **桔妹導讀:**Ceph是國際知名的開源分布式存盤系統,在工業界和學術界都有著重要的影響。Ceph的架構和演算法設計發表在國際系統領域頂級會議OSDI、SOSP、SC等上。Ceph社區得到Red Hat、SUSE、Intel等大公司的大力支持。Ceph是國際云計算領域應用最廣泛的開源分布式存盤系統, ......

    uj5u.com 2020-09-10 06:14:51 more
  • es~通過ElasticsearchTemplate進行聚合~嵌套聚合

    之前寫過《es~通過ElasticsearchTemplate進行聚合操作》的文章,這一次主要寫一個嵌套的聚合,例如先對sex集合,再對desc聚合,最后再對age求和,共三層嵌套。 Aggregations的部分特性類似于SQL語言中的group by,avg,sum等函式,Aggregation ......

    uj5u.com 2020-09-10 06:14:59 more
  • 爬蟲日志監控 -- Elastc Stack(ELK)部署

    傻瓜式部署,只需替換IP與用戶 導讀: 現ELK四大組件分別為:Elasticsearch(核心)、logstash(處理)、filebeat(采集)、kibana(可視化) 下載均在https://www.elastic.co/cn/downloads/下tar包,各組件版本最好一致,配合fdm會 ......

    uj5u.com 2020-09-10 06:15:05 more
最新发布
  • day02-2-商鋪查詢快取

    功能02-商鋪查詢快取 3.商鋪詳情快取查詢 3.1什么是快取? 快取就是資料交換的緩沖區(稱作Cache),是存盤資料的臨時地方,一般讀寫性能較高。 快取的作用: 降低后端負載 提高讀寫效率,降低回應時間 快取的成本: 資料一致性成本 代碼維護成本 運維成本 3.2需求說明 如下,當我們點擊商店詳 ......

    uj5u.com 2023-04-20 08:33:24 more
  • MySQL中binlog備份腳本分享

    關于MySQL的二進制日志(binlog),我們都知道二進制日志(binlog)非常重要,尤其當你需要point to point災難恢復的時侯,所以我們要對其進行備份。關于二進制日志(binlog)的備份,可以基于flush logs方式先切換binlog,然后拷貝&壓縮到到遠程服務器或本地服務器 ......

    uj5u.com 2023-04-20 08:28:06 more
  • day02-短信登錄

    功能實作02 2.功能01-短信登錄 2.1基于Session實作登錄 2.1.1思路分析 2.1.2代碼實作 2.1.2.1發送短信驗證碼 發送短信驗證碼: 發送驗證碼的介面為:http://127.0.0.1:8080/api/user/code?phone=xxxxx<手機號> 請求方式:PO ......

    uj5u.com 2023-04-20 08:27:27 more
  • 快取與資料庫雙寫一致性幾種策略分析

    本文將對幾種快取與資料庫保證資料一致性的使用方式進行分析。為保證高并發性能,以下分析場景不考慮執行的原子性及加鎖等強一致性要求的場景,僅追求最終一致性。 ......

    uj5u.com 2023-04-20 08:26:48 more
  • sql陳述句優化

    問題查找及措施 問題查找 需要找到具體的代碼,對其進行一對一優化,而非一直把關注點放在服務器和sql平臺 降低簡化每個事務中處理的問題,盡量不要讓一個事務拖太長的時間 例如檔案上傳時,應將檔案上傳這一步放在事務外面 微軟建議 4.啟動sql定時執行計劃 怎么啟動sqlserver代理服務-百度經驗 ......

    uj5u.com 2023-04-20 08:26:35 more
  • 云時代,MySQL到ClickHouse資料同步產品對比推薦

    ClickHouse 在執行分析查詢時的速度優勢很好的彌補了MySQL的不足,但是對于很多開發者和DBA來說,如何將MySQL穩定、高效、簡單的同步到 ClickHouse 卻很困難。本文對比了 NineData、MaterializeMySQL(ClickHouse自帶)、Bifrost 三款產品... ......

    uj5u.com 2023-04-20 08:26:29 more
  • sql陳述句優化

    問題查找及措施 問題查找 需要找到具體的代碼,對其進行一對一優化,而非一直把關注點放在服務器和sql平臺 降低簡化每個事務中處理的問題,盡量不要讓一個事務拖太長的時間 例如檔案上傳時,應將檔案上傳這一步放在事務外面 微軟建議 4.啟動sql定時執行計劃 怎么啟動sqlserver代理服務-百度經驗 ......

    uj5u.com 2023-04-20 08:25:13 more
  • Redis 報”OutOfDirectMemoryError“(堆外記憶體溢位)

    Redis 報錯“OutOfDirectMemoryError(堆外記憶體溢位) ”問題如下: 一、報錯資訊: 使用 Redis 的業務介面 ,產生 OutOfDirectMemoryError(堆外記憶體溢位),如圖: 格式化后的報錯資訊: { "timestamp": "2023-04-17 22: ......

    uj5u.com 2023-04-20 08:24:54 more
  • day02-2-商鋪查詢快取

    功能02-商鋪查詢快取 3.商鋪詳情快取查詢 3.1什么是快取? 快取就是資料交換的緩沖區(稱作Cache),是存盤資料的臨時地方,一般讀寫性能較高。 快取的作用: 降低后端負載 提高讀寫效率,降低回應時間 快取的成本: 資料一致性成本 代碼維護成本 運維成本 3.2需求說明 如下,當我們點擊商店詳 ......

    uj5u.com 2023-04-20 08:24:03 more
  • day02-短信登錄

    功能實作02 2.功能01-短信登錄 2.1基于Session實作登錄 2.1.1思路分析 2.1.2代碼實作 2.1.2.1發送短信驗證碼 發送短信驗證碼: 發送驗證碼的介面為:http://127.0.0.1:8080/api/user/code?phone=xxxxx<手機號> 請求方式:PO ......

    uj5u.com 2023-04-20 08:23:11 more