栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 数据库 > 缓存机制 > Redis缓存

Redis环境安装配置

Redis缓存 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

Redis环境安装配置

要在Ubuntu上安装Redis,打开终端并键入以下命令 -

[yiibai@ubuntu:~]$ sudo apt-get update 
[yiibai@ubuntu:~]$ sudo apt-get install redis-server

这将在Ubuntu机器上安装Redis。

启动Redis

[yiibai@ubuntu:~]$ redis-server
[2988] 07 Feb 17:09:42.485 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
[2988] 07 Feb 17:09:42.488 # Unable to set the max number of files limit to 10032 (Operation not permitted), setting the max clients configuration to 3984.
[2988] 07 Feb 17:09:42.490 # Warning: 32 bit instance detected but no memory lim
  _._
    _.-``__ ''-._
      _.-``    `.  `_.  ''-._    Redis 2.8.4 (00000000/0) 32 bit
  .-`` .-```.  ```/    _.,_ ''-._
 (    '      ,.-`  | `,    )     Running in stand alone mode
 |`-._`-...-` __...-.``-._|'` _.-'|     Port: 6379
 |    `-._   `._    /     _.-'    |     PID: 2988
  `-._    `-._  `-./  _.-'    _.-'
 |`-._`-._    `-.__.-'    _.-'_.-'|
 |    `-._`-._ _.-'_.-'    |    http://redis.io
  `-._    `-._`-.__.-'_.-'    _.-'
 |`-._`-._    `-.__.-'    _.-'_.-'|
 |    `-._`-._ _.-'_.-'    |
  `-._    `-._`-.__.-'_.-'    _.-'
      `-._    `-.__.-'    _.-'
   `-._ _.-'
`-.__.-'

[2988] 07 Feb 17:09:42.581 # Server started, Redis version 2.8.4
[2988] 07 Feb 17:09:42.582 # WARNING overcommit_memory is set to 0! Background s    ' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_m
[2988] 07 Feb 17:09:42.582 * The server is now ready to accept connections on po

检查Redis是否正在工作

[yiibai@ubuntu:~]$ redis-cli

这将打开一个redis提示,如下所示 -

redis 127.0.0.1:6379>

在上面的提示中,127.0.0.1是计算机的IP地址,6379是运行Redis服务器的端口。 现在键入以下PING命令。

redis 127.0.0.1:6379> ping 
PONG

这表明Redis已成功在您的计算机上安装了。

在Ubuntu上安装Redis桌面管理

要在Ubuntu上安装Redis桌面管理器,可从 http://redisdesktop.com/download 下载该软件包,安装即可。

打开下载的软件包并安装。

Redis桌面管理器将提供用于管理Redis的键和数据的UI。


转载请注明:文章转载自 www.mshxw.com
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号