缓存数据库redis快速搭建

本文介绍了如何快速搭建Redis缓存数据库,包括从redis.cn下载最新安装包,解压并安装,通过README.md文件了解安装方法,测试环境验证无误,然后启动Redis服务,最后在新窗口中成功链接Redis服务器,确保可以正常使用。

安装

从redis.cn下载最新redis包。

解压安装包


进入目录


打开README.md,查看install方法


测试环境是可以正常使用


如果出现 

\o/ All tests passed without errors!

表示成功,表示redis环境没有问题

安装路径



启动redis


若出现

2725:C 01 Jun 19:24:23.646 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
2725:C 01 Jun 19:24:23.647 # Redis version=4.0.9, bits=32, commit=00000000, modified=0, pid=2725, just started
2725:C 01 Jun 19:24:23.647 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
2725:M 01 Jun 19:24:23.648 * Increased maximum number of open files to 10032 (it was originally set to 1024).
2725:M 01 Jun 19:24:23.649 # Warning: 32 bit instance detected but no memory limit set. Setting 3 GB maxmemory limit with 'noeviction' policy now.
                _._                                                  
           _.-``__ ''-._                                             
      _.-``    `.  `_.  ''-._           Redis 4.0.9 (00000000/0) 32 bit
  .-`` .-```.  ```\/    _.,_ ''-._                                   
 (    '      ,       .-`  | `,    )     Running in standalone mode
 |`-._`-...-` __...-.``-._|'` _.-'|     Port: 6379
 |    `-._   `._    /     _.-'    |     PID: 2725
  `-._    `-._  `-./  _.-'    _.-'                                   
 |`-._`-._    `-.__.-'    _.-'_.-'|                                  
 |    `-._`-._        _.-'_.-'    |           http://redis.io        
  `-._    `-._`-.__.-'_.-'    _.-'                                   
 |`-._`-._    `-.__.-'    _.-'_.-'|                                  
 |    `-._`-._        _.-'_.-'    |                                  
  `-._    `-._`-.__.-'_.-'    _.-'                                   
      `-._    `-.__.-'    _.-'                                       
          `-._        _.-'                                           
              `-.__.-'                                               

2725:M 01 Jun 19:24:23.650 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
2725:M 01 Jun 19:24:23.650 # Server initialized
2725:M 01 Jun 19:24:23.650 # 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.
2725:M 01 Jun 19:24:23.650 # 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.
2725:M 01 Jun 19:24:23.650 * Ready to accept connections

代表启动成功。

链接redis服务器

新打开一个窗口


出现


说明链接成功


出现以上内容说明可以正常的使用redis服务器。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值