C:\Users\Administrator>cd c:\

c:\>cd redis-2.6

c:\redis-2.6>redis-server.exe redis.conf

测试redis

    1. redis-cli
    2. redis 127.0.0.1:6379> set foo 123
    3. OK
    4. redis 127.0.0.1:6379> get foo
    5. "123"
    6. redis 127.0.0.1:6379> exit

4.关闭服务
redis-cli shutdown
如果端口变化可以指定端口:
redis-cli -p 6379 shutdown
127.0.0.1:6379> i+j
Could not connect to Redis at 127.0.0.1:6379: Connection refused
not connected> set w 3
Could not connect to Redis at 127.0.0.1:6379: Connection refused
not connected>

5.启动服务
[root@localhost src]# redis-server
[24502] 28 Oct 01:54:35.784 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
[24502] 28 Oct 01:54:35.784 * Increased maximum number of open files to 10032 (it was originally set to 1024).
                _._                                                  
          _.-``__ ''-._                                            
      _.-``    `.  `_.  ''-._          Redis 2.8.13 (00000000/0) 64 bit
  .-`` .-```.  ```\/    _.,_ ''-._                                  
 (    '      ,      .-`  | `,    )    Running in stand alone mode
 |`-._`-...-` __...-.``-._|'` _.-'|    Port: 6379
 |    `-._  `._    /    _.-'    |    PID: 24502
  `-._    `-._  `-./  _.-'    _.-'                                  
 |`-._`-._    `-.__.-'    _.-'_.-'|                                  
 |    `-._`-._        _.-'_.-'    |          http://redis.io        
  `-._    `-._`-.__.-'_.-'    _.-'                                  
 |`-._`-._    `-.__.-'    _.-'_.-'|                                  
 |    `-._`-._        _.-'_.-'    |                                  
  `-._    `-._`-.__.-'_.-'    _.-'                                  
      `-._    `-.__.-'    _.-'                                      
          `-._        _.-'                                          
              `-.__.-'                                              
[24502] 28 Oct 01:54:35.786 # Server started, Redis version 2.8.13
[24502] 28 Oct 01:54:35.786 # 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.
[24502] 28 Oct 01:54:35.786 * DB loaded from disk: 0.000 seconds
[24502] 28 Oct 01:54:35.786 * The server is now ready to accept connections on port 6379

redis 启动的更多相关文章

  1. Redis 错误1067:进程意外终止,Redis不能启动,Redis启动不了

    Redis 错误1067:进程意外终止,Redis不能启动,Redis启动不了 >>>>>>>>>>>>>>> ...

  2. redis启动过程源码解析

    redis整个程序的入口函数在server.c中的main函数,函数调用关系如下图1,调用顺序为从上到下,从左至右. 图1 redis启动函数调用图 main函数源码如下,1-55行根据配置文件和启动 ...

  3. 【搬运工】redis 启动和关闭

    如果是用apt-get或者yum install安装的redis,可以直接通过下面的命令停止/启动/重启redis /etc/init.d/redis-server stop /etc/init.d/ ...

  4. Redis深入学习笔记(一)Redis启动数据加载流程

    这两年使用Redis从单节点到主备,从主备到一主多从,再到现在使用集群,碰到很多坑,所以决定深入学习下Redis工作原理并予以记录. 本系列主要记录了Redis工作原理的一些要点,当然配置搭建和使用这 ...

  5. redis启动出错Creating Server TCP listening socket 127.0.0.1:6379: bind: No error(转)

    redis启动出错Creating Server TCP listening socket 127.0.0.1:6379: bind: No error   windows下安装Redis第一次启动报 ...

  6. redis 启动停止脚本

    redis 启动停止脚本,该redis需要密码登录,如没有密码,去掉stop函数里的 -a #!/bin/sh # #chkconfig: 2345 80 90 # Simple Redis init ...

  7. Redis入门到高可用(二)—— Redis启动及使用

    1. 三种启动方式 ♦️  最简启动 ./redis-server 使用Redis默认配置进行启动; ♦️  动态参数启动 * redis-server --port 6380  更改端口为6380并 ...

  8. redis启动停止+密码认证

    redis启动停止命令 ./bin/redis-server redis.conf ./bin/redis-cli -h 127.0.0.1 -p 6379 shutdown flushall ——& ...

  9. Redis 启动警告错误解决[转]

    Redis 启动警告错误解决 启动错误 1.WARNING overcommit_memory is set to 0! Background save may fail under low memo ...

  10. windows下redis启动失败提示maxheap flag

    windows下redis启动失败 D:\redis>redis-server.exe redis.conf [] Oct ::39.789 # The Windows version of R ...

随机推荐

  1. (转)微信小程序开发—弹出框

    原文地址 <span style="font-family:Comic Sans MS;font-size:18px;color:#333333;"><view ...

  2. jquery IE中加载xml

    $.ajax({ url: 'xml/myXML.xml', dataType: ($.browser.msie) ? "text" : "xml", time ...

  3. 使用DolphinPHP的框架中的excel插件导入数据

    直接上函数吧 public function importfile() { if ($this->request->isPost()) { if($_POST['files']) { Cu ...

  4. [Flex+JAVA]建立Flex+java项目,并实现基本功能

    1新建JAVA WEB项目 新建后的web文件包截图 3添加Flex项目,右键,添加.更改项目类型,天剑Flex项目类型

  5. javascript,移动划过超链接鼠标变手型

    用css控制鼠标样式的语法如下:<span style="cursor:*">文本或其它页面元素</span>把 * 换成如下15个效果的一种: 下面是对这 ...

  6. java位运算(操作)的使用

    位操作是程序设计中对位模式按位或二进制数的一元和二元操作. 在许多古老的微处理器上, 位运算比加减运算略快, 通常位运算比乘除法运算要快很多. 在现代架构中, 情况并非如此:位运算的运算速度通常与加法 ...

  7. Oracle掌管权限和角色

    转自:https://blog.csdn.net/without_bont/article/details/79862112 掌管权限和角色 这一部分我们主要看oracle中如何管理权限和角色,权限和 ...

  8. HashMap怎样解决碰撞问题

    碰撞:HashMap运用put方法存储多个元素时,计算得出相同的hashCode,在put时出现冲突. 处理:利用“拉链法”处理HashCode的碰撞问题:当我们将键值对传递给put方法时,他调用键对 ...

  9. day15-函数进阶

    1.函数嵌套 多个函数嵌套在一起即为函数嵌套 在调用函数时,函数需在调用之前定义,如果函数在调用之后才定义,则不能被成功调用.当定义多个函数时,函数名称不能相同,否则后定义的函数会将之前的函数覆盖,即 ...

  10. Windows下MongoDB安装配置

    一.安装 官网下载,一般选择community server版本下载,如果是企业可以选择enterprise版本,个人使用的话community就可以了,附上链接:https://www.mongod ...