暂无图片
暂无图片
1
暂无图片
暂无图片
暂无图片

redis下载安装

原创 黄堋 2020-05-26
1145

作为一名DBA,当我想学习一个数据库的时候,第一个想知道的即为那儿下载和如何安装,以便尽快成功安装后进行更深入的试验学习。
1.下载redis:

http://download.redis.io/releases/
本次选择2020年4月17日发布的5.0.9

2.解压redis
[root@dblight ~]# tar zxvf redis-5.0.9.tar.gz
Make redis
[root@dblight ~]# cd redis-5.0.9/
[root@dblight redis-5.0.9]# make

3.Make结束后进入src目录,运行./redis-server 即可运行redis,我们使用后台的方式运行redis

[root@dblight redis-5.0.9]# cd src
[root@dblight src]# nohup ./redis-server > redis-server.log 2>&1 &
[1] 126885
[root@dblight src]# tail -400f redis-server.log
nohup: ignoring input
126885:C 29 Apr 2020 19:40:36.833 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
126885:C 29 Apr 2020 19:40:36.833 # Redis version=5.0.9, bits=64, commit=00000000, modified=0, pid=126885, just started
126885:C 29 Apr 2020 19:40:36.833 # Warning: no config file specified, using the default config. In order to specify a config file use ./redis-server /path/to/redis.conf
126885:M 29 Apr 2020 19:40:36.834 * Increased maximum number of open files to 10032 (it was originally set to 1024).
126885:M 29 Apr 2020 19:40:36.836 * Running mode=standalone, port=6379.
126885:M 29 Apr 2020 19:40:36.836 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
126885:M 29 Apr 2020 19:40:36.836 # Server initialized
126885:M 29 Apr 2020 19:40:36.836 # 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.
126885:M 29 Apr 2020 19:40:36.836 # 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.
126885:M 29 Apr 2020 19:40:36.837 * DB loaded from disk: 0.000 seconds
126885:M 29 Apr 2020 19:40:36.837 * Ready to accept connections

4.简单对redis可用性进行检查
同样是src目录
[root@dblight src]# ./redis-cli
127.0.0.1:6379> set first dbligth
OK
127.0.0.1:6379> get first
“dbligth”

「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

文章被以下合辑收录

评论