[26720] 21 Dec 23:38:07.069 # Server started, Redis version 2.8.18
[26720] 21 Dec 23:38:07.070 # 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.
[26720] 21 Dec 23:38:07.072 # 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.
[26720] 21 Dec 23:38:07.078 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
[26720] 21 Dec 23:38:07.078 * The server is now ready to accept connections on port 6379
注意:这时候redis是独占方式启动的,默认端口6379,要连接redis需要从新打开一个窗口
如果想改变Redis启动方式,可以修改Redis配置文件redis.conf(解压后的目录里就有,这里是:/usr/local/redis/redis-2.8.18)
关于redis.conf中的参数,后面我会专门写一遍博客来解释,期待吧^_^
你可以使用内置的客户端连接Redis
[root@localhost redis-2.8.18]# ./src/redis-cli
127.0.0.1:6379> set mykey wangxiuli
OK
127.0.0.1:6379> get mykey
"wangxiuli"
127.0.0.1:6379>
是不是很简单,我们已经安装成功了。
Ubuntu 14.04下Redis安装及简单测试