windows server下redis安装(含安装包)

windows server下redis安装(含安装包)

redis安装

在这里分享一下redis在windows server服务器下的redis安装,其实redis的安装在windows下还是比较容易也是非常简单的,在最后也会有安装包来分享出来。
1.首先将下载下来的redis安装包传到我们用的windows server服务器上,这里我们还是放到C盘的ceshi文件夹中,然后安装包中包含服务端和客户端,我们这里安装的是服务端。
2.通过win+R的方式启动cmd命令
3.根据我们存放的redis文件夹进入redis安装目录

C:\Users\Administrator>cd /

C:\>cd ceshi

C:\ceshi>cd redis

C:\ceshi\redis>cd 服务

C:\ceshi\redis\服务>cd Redis-x64-3.2.100

4.启动redis服务

C:\ceshi\redis\服务\Redis-x64-3.2.100>redis-server.exe  redis.windows.conf

当出现以下内容,证明服务已打开

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

[2572] 04 Jun 15:44:56.803 # Server started, Redis version 3.2.100
[2572] 04 Jun 15:44:56.803 * DB loaded from disk: 0.000 seconds
[2572] 04 Jun 15:44:56.803 * The server is now ready to accept connections on po
rt 6379

redis配置

redis的配置主要是对远程客户端的连接,根据上文我们也看到了这个端口使用的是6379,第一次安装的时候redis是没有密码的,所以这里我们根据我们使用cmd命令打开的redis.windows.conf文件进行配置
这里需要配置的是IP登录地址的配置和protected-mode的配置,首先注释掉bind127.0.0.1,这样我们就可以通过别的IP地址来访问这个服务器的redis,同时将允许外部网络可以直接设置到允许的状态
这里我把这一段前面和后面的内容都复制出来,免得找不到地方

# ~~~ WARNING ~~~ If the computer running Redis is directly exposed to the
# internet, binding to all the interfaces is dangerous and will expose the
# instance to everybody on the internet. So by default we uncomment the
# following bind directive, that will force Redis to listen only into
# the IPv4 lookback interface address (this means Redis will be able to
# accept connections only from clients running into the same computer it
# is running).
#
# IF YOU ARE SURE YOU WANT YOUR INSTANCE TO LISTEN TO ALL THE INTERFACES
# JUST COMMENT THE FOLLOWING LINE.
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

#bind 127.0.0.1

# Protected mode is a layer of security protection, in order to avoid that
# Redis instances left open on the internet are accessed and exploited.
#
# When protected mode is on and if:
#
# 1) The server is not binding explicitly to a set of addresses using the
#    "bind" directive.
# 2) No password is configured.
#
# The server only accepts connections from clients connecting from the
# IPv4 and IPv6 loopback addresses 127.0.0.1 and ::1, and from Unix domain
# sockets.
#
# By default protected mode is enabled. You should disable it only if
# you are sure you want clients from other hosts to connect to Redis
# even if no authentication is configured, nor a specific set of interfaces
# are explicitly listed using the "bind" directive.

protected-mode no

# Accept connections on the specified port, default is 6379 (IANA #815344).
# If port 0 is specified Redis will not listen on a TCP socket.
port 6379

redis连接

1.打开我们安装包的客户端进行安装,这里基本上一直下一步就好,也没什么好说的,打开以后选择连接到Redis服务器。
在这里插入图片描述
2.连接设置中地址我们填写我们服务器的IP地址,本地的话直接可以通过127.0.0.1进行连接,不要忘记输入连接名。
在这里插入图片描述
3.最后双击我们新添加的Redis服务器完成连接在这里插入图片描述

Redis安装包

链接:https://pan.baidu.com/s/1bZ6noC9f4XrW7AFbzRCqgg 
提取码:5j1h 
  • 4
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值