redis安装报错No such file or directory解决方案

redis安装报错:

c:\Redis>redis-server
[10648] 11 May 16:46:30.046 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
[10648] 11 May 16:46:30.053 # Creating Server TCP listening socket *:6379: bind: No such file or directory

之所以会出现这个问题,是因为redis服务器已经启动
执行以下命令:

1. redis-cli.exe     #进入redis的客户端,如果没有配置环境变量,需要进入到redis的安装目录下执行
2. shutdown                               #关闭redis原来的服务器
3. exit                                   #退出客户端
4. redis-server.exe redis.windows.conf    #重启redis的服务器

以上的命令如果没有配置redis的环境变量,都需要进入到redis的安装目录下执行的。

命令执行以后,在redis-server执行后都能看到下面的界面:

c:\Redis>redis-cli.exe
127.0.0.1:6379> shutdown
not connected> exit

c:\Redis>redis-server.exe redis.windows.conf
                _._
           _.-``__ ''-._
      _.-``    `.  `_.  ''-._           Redis 3.2.100 (00000000/0) 64 bit
  .-`` .-```.  ```\/    _.,_ ''-._
 (    '      ,       .-`  | `,    )     Running in standalone mode
 |`-._`-...-` __...-.``-._|'` _.-'|     Port: 6379
 |    `-._   `._    /     _.-'    |     PID: 10864
  `-._    `-._  `-./  _.-'    _.-'
 |`-._`-._    `-.__.-'    _.-'_.-'|
 |    `-._`-._        _.-'_.-'    |           http://redis.io
  `-._    `-._`-.__.-'_.-'    _.-'
 |`-._`-._    `-.__.-'    _.-'_.-'|
 |    `-._`-._        _.-'_.-'    |
  `-._    `-._`-.__.-'_.-'    _.-'
      `-._    `-.__.-'    _.-'
          `-._        _.-'
              `-.__.-'

[10864] 11 May 16:47:44.219 # Server started, Redis version 3.2.100
[10864] 11 May 16:47:44.221 * DB loaded from disk: 0.000 seconds
[10864] 11 May 16:47:44.221 * The server is now ready to accept connections on port 6379

猜你喜欢

转载自blog.csdn.net/erice_s/article/details/80283908