测试环境:Linux version 3.10.0-1062.7.1.el7.x86_64 (mockbuild@kbuilder.bsys.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-39) (GCC) ) #1 SMP Mon Dec 2 17:33:29 UTC 2019
make[2]: 离开目录“/opt/redis-5.0.8/deps” CC adlist.o CC quicklist.o CC ae.o CC anet.o CC dict.o CC server.o CC sds.o CC zmalloc.o CC lzf_c.o CC lzf_d.o CC pqsort.o CC zipmap.o CC sha1.o CC ziplist.o CC release.o CC networking.o CC util.o CC object.o CC db.o CC replication.o CC rdb.o CC t_string.o CC t_list.o CC t_set.o CC t_zset.o CC t_hash.o CC config.o CC aof.o CC pubsub.o CC multi.o CC debug.o CC sort.o CC intset.o CC syncio.o CC cluster.o CC crc16.o CC endianconv.o CC slowlog.o CC scripting.o CC bio.o CC rio.o CC rand.o CC memtest.o CC crc64.o CC bitops.o CC sentinel.o CC notify.o CC setproctitle.o CC blocked.o CC hyperloglog.o CC latency.o CC sparkline.o CC redis-check-rdb.o CC redis-check-aof.o CC geo.o CC lazyfree.o CC module.o CC evict.o CC expire.o CC geohash.o CC geohash_helper.o CC childinfo.o CC defrag.o CC siphash.o CC rax.o CC t_stream.o CC listpack.o CC localtime.o CC lolwut.o CC lolwut5.o LINK redis-server INSTALL redis-sentinel CC redis-cli.o LINK redis-cli CC redis-benchmark.o LINK redis-benchmark INSTALL redis-check-rdb INSTALL redis-check-aof
Hint: It's a good idea to run 'make test' ;) make[1]: 离开目录“/opt/redis-5.0.8/src”
26876:C 26 May 2020 09:56:57.357 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo 26876:C 26 May 2020 09:56:57.357 # Redis version=5.0.8, bits=64, commit=00000000, modified=0, pid=26876, just started 26876:C 26 May 2020 09:56:57.357 # Warning: no config file specified, using the default config. In order to specify a config file use src/redis-server /path/to/redis.conf 26876:M 26 May 2020 09:56:57.358 * Increased maximum number of open files to 10032 (it was originally set to 1024). _._ _.-``__ ''-._ _.-`` `. `_. ''-._ Redis 5.0.8 (00000000/0) 64 bit .-`` .-```. ```\/ _.,_ ''-._ ( ' , .-` | `, ) Running in standalone mode |`-._`-...-` __...-.``-._|'` _.-'| Port: 6379 | `-._ `._ / _.-' | PID: 26876 `-._ `-._ `-./ _.-' _.-' |`-._`-._ `-.__.-' _.-'_.-'| | `-._`-._ _.-'_.-' | http://redis.io `-._ `-._`-.__.-'_.-' _.-' |`-._`-._ `-.__.-' _.-'_.-'| | `-._`-._ _.-'_.-' | `-._ `-._`-.__.-'_.-' _.-' `-._ `-.__.-' _.-' `-._ _.-' `-.__.-'
26876:M 26 May 2020 09:56:57.362 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128. 26876:M 26 May 2020 09:56:57.362 # Server initialized 26876:M 26 May 2020 09:56:57.362 # 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. 26876:M 26 May 2020 09:56:57.362 # 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. 26876:M 26 May 2020 09:56:57.363 * Ready to accept connections
后台启动
1 2 3 4 5
vim redis.conf
daemonize no # 改成 daemonize yes
启动:
1 2 3 4
[root@zhang redis-5.0.8]# src/redis-server redis.conf 29472:C 26 May 2020 10:01:41.246 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo 29472:C 26 May 2020 10:01:41.246 # Redis version=5.0.8, bits=64, commit=00000000, modified=0, pid=29472, just started 29472:C 26 May 2020 10:01:41.246 # Configuration loaded