命令行输入:
$ wget http://download.redis.io/releases/redis-3.2.8.tar.gz
$ tar xzf redis-3.2.8.tar.gz
$ cd redis-3.2.8
$ make
安装完成
$cd src/
$ ./
redis-server
显示如下内容
6874:C 25 Feb 10:51:25.082 # Warning: no config file specified, using the default config. In order to specify a config file use ./redis-server /path/to/redis.conf
6874:M 25 Feb 10:51:25.087 # Not listening to IPv6: unsupproted
_._
_.-``__ ''-._
_.-`` `. `_. ''-._ Redis 3.2.8 (00000000/0) 64 bit
.-`` .-```. ```\/ _.,_ ''-._
( ' , .-` | `, ) Running in standalone mode
|`-._`-...-` __...-.``-._|'` _.-'| Port: 6379
| `-._ `._ / _.-' | PID: 6874
`-._ `-._ `-./ _.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' | http://redis.io
`-._ `-._`-.__.-'_.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' |
`-._ `-._`-.__.-'_.-' _.-'
`-._ `-.__.-' _.-'
`-._ _.-'
`-.__.-'
6874:M 25 Feb 10:51:25.088 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
6874:M 25 Feb 10:51:25.088 # Server started, Redis version 3.2.8
6874:M 25 Feb 10:51:25.088 # 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.
6874:M 25 Feb 10:51:25.088 # 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.
6874:M 25 Feb 10:51:25.088 * DB loaded from disk: 0.000 seconds
6874:M 25 Feb 10:51:25.088 * The server is now ready to accept connections on port 6379
新开一个命令行,
cd redis安装的src,执行./redis-cli
测试
redis> set foo bar
OK
redis> get foo
"bar"