本文是在CentOS7.4下安装Redis
下载redis
在download下载redis
wget http://download.redis.io/releases/redis-5.0.9.tar.gz
安装依赖
yum -y install gcc gcc-c++ libstdc++-devel
安装Redis
# tar -zxvf redis-5.0.9.tar.gz && cd redis-5.0.9
# make
启动
# src/redis-server
13731:C 03 Dec 2020 17:49:28.106 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
13731:C 03 Dec 2020 17:49:28.106 # Redis version=5.0.9, bits=64, commit=00000000, modified=0, pid=13731, just started
13731:C 03 Dec 2020 17:49:28.106 # Warning: no config file specified, using the default config. In order to specify a config file use src/redis-server /path/to/redis.conf
13731:M 03 Dec 2020 17:49:28.108 * Increased maximum number of open files to 10032 (it was originally set to 1024).
_._
_.-``__ ''-._
_.-`` `. `_. ''-._ Redis 5.0.9 (00000000/0) 64 bit
.-`` .-```. ```\/ _.,_ ''-._
( ' , .-` | `, ) Running in standalone mode
|`-._`-...-` __...-.``-._|'` _.-'| Port: 6379
| `-._ `._ / _.-' | PID: 13731
`-._ `-._ `-./ _.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' | http://redis.io
`-._ `-._`-.__.-'_.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' |
`-._ `-._`-.__.-'_.-' _.-'
`-._ `-.__.-' _.-'
`-._ _.-'
`-.__.-'
13731:M 03 Dec 2020 17:49:28.110 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
13731:M 03 Dec 2020 17:49:28.110 # Server initialized
13731:M 03 Dec 2020 17:49:28.110 # 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.
13731:M 03 Dec 2020 17:49:28.110 # 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.
13731:M 03 Dec 2020 17:49:28.110 * Ready to accept connections