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. ES6入门箭头函数

    箭头函数: 箭头函数可以与变量结构相结合(箭头函数返回对象的时候必须要在对象外边加()) 注意: 1️⃣函数体内的this是定义时所在的对象,而不是使用时的对象 2️⃣不可以当成构造函数,不可用new ...

  2. [转]access 标准表达式中数据类型不匹配

    好久没有用access,今儿遇到一个特别让人无语的问题: access数据表的Date/Time类型的字段,假如字段名为dtime: 如果直接用dtime=‘2013/9/6 10:50:21’,sq ...

  3. scala变量类型和性质

    最高的父类型为Any,最低类型为Nothing Any is the supertype of all types, also called the top type. It defines cert ...

  4. 获取手机浏览器IP的函数

    function GetIP() { if (!empty($_SERVER['HTTP_CLIENT_IP'])) { //如果变量是非空或非零的值,则 empty()返回 FALSE. $IP = ...

  5. 最好的ie版本检测方式

    预备知识:NodeList的实时性 通过 document.getElementsByTagName,document.forms ,document.images  等方法获取到nodelist以后 ...

  6. RecyclerView通用适配器

    在Android开发中使用列表呈现数据的情况很多,现在我们常用RecyclerView呈现列表,为了开发敏捷和代码优雅,我们现在来打造<?xml version="1.0" ...

  7. python学习笔记_week22

    note 知识点概要 - Session - CSRF - Model操作 - Form验证(ModelForm) - 中间件 - 缓存 - 信号 内容详细: 1. Session 基于Cookie做 ...

  8. python学习笔记_week18

    note 1.JS 正则 test - 判断字符串是否符合规定的正则 rep = /\d+/; rep.test("asdfoiklfasdf89asdfasdf") # true ...

  9. 水仙花在python3在pycharm的实现

    ---恢复内容开始--- #方法一:#-*- coding: utf-8-*-while True: num = input("请输入一个三位数") num = int(num) ...

  10. twisted之Deferred类的分析

    @_oldStyle class Deferred: called = False#类变量,在实例中引用时会自动在实例中生成 paused = False _debugInfo = None _sup ...