缓存数据库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服务器。

你可能感兴趣的:(Linux)