100%[=========================================================================================================================================>] 1,966,337 55.7KB/s in 39s
[root@localhost redis]# [root@localhost redis]# ls redis-5.0.4.tar.gz [root@localhost redis]#
解压
1 2 3 4 5 6
[root@localhost redis]# tar xzf redis-5.0.4.tar.gz -C /usr/redis/ [root@localhost redis]# cd /usr/redis/ [root@localhost redis]# ls redis-5.0.4 [root@localhost redis]#
编译
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
[root@localhost redis-5.0.4]# yum install gcc-c++ [root@localhost redis-5.0.4]# make ............ 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
[root@localhost redis-5.0.4]# src/redis-server 2189:C 30 Jan 2021 01:49:16.869 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo 2189:C 30 Jan 2021 01:49:16.869 # Redis version=5.0.4, bits=64, commit=00000000, modified=0, pid=2189, just started 2189:C 30 Jan 2021 01:49:16.869 # Warning: no config file specified, using the default config. In order to specify a config file use src/redis-server /path/to/redis.conf 2189:M 30 Jan 2021 01:49:16.871 * Increased maximum number of open files to 10032 (it was originally set to 1024). _._ _.-``__ ''-._ _.-`` `. `_. ''-._ Redis 5.0.4 (00000000/0) 64 bit .-`` .-```. ```\/ _.,_ ''-._ ( ' , .-` | `, ) Running in standalone mode |`-._`-...-` __...-.``-._|'` _.-'| Port: 6379 | `-._ `._ / _.-' | PID: 2189 `-._ `-._ `-./ _.-' _.-' |`-._`-._ `-.__.-' _.-'_.-'| | `-._`-._ _.-'_.-' | http://redis.io `-._ `-._`-.__.-'_.-' _.-' |`-._`-._ `-.__.-' _.-'_.-'| | `-._`-._ _.-'_.-' | `-._ `-._`-.__.-'_.-' _.-' `-._ `-.__.-' _.-' `-._ _.-' `-.__.-'
2189:M 30 Jan 2021 01:49:16.873 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128. 2189:M 30 Jan 2021 01:49:16.874 # Server initialized 2189:M 30 Jan 2021 01:49:16.874 # 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. 2189:M 30 Jan 2021 01:49:16.874 # 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. 2189:M 30 Jan 2021 01:49:16.903 * DB loaded from disk: 0.029 seconds 2189:M 30 Jan 2021 01:49:16.903 * Ready to accept connections
启动客户端
1 2 3 4 5 6 7
[root@localhost redis-5.0.4]# src/redis-cli 127.0.0.1:6379> set name yangl OK 127.0.0.1:6379> get name "yangl" 127.0.0.1:6379>