美文网首页
Redis 安装

Redis 安装

作者: SmartBin | 来源:发表于2019-03-30 17:14 被阅读0次

Windows系统安装

下载地址:https://github.com/MSOpenTech/redis/releases

例如下载Rdeis-x64-3.2.100.zip压缩包

解压缩,放至安装路径,如C盘根路径

修改redis.windows.conf或redis.windows-service.conf配置文件:

1、设置maxmemory 大小,例如 :

maxmemory 1024000000

2、设置redis密码:

requirepass 123456

将redis 安装路径添加至PATH系统变量中。

启动redis:

redis-server.exe redis.windows.conf

该启动为手动启动,关闭cmd窗口就会关闭redis 服务。

打开新的CMD窗口,连接Redis服务,命令为:

redis-cli.exe

输入密码命令:

auth 123456

可以将Redis设置为Windows的服务,就不需要手动启动,命令为:

redis-server --service-install redis.windows-service.conf --loglevel verbose

输入命令后没有报错,表示成功了,刷新服务,多了一个redis服务。

查看服务方式:右键单击计算机->管理->服务和应用程序->服务,可以发现名为Redis的服务

注意:

手动启动Redis服务使用的是redis.windows.conf配置文件,将其添加为Windows服务后,由系统启动Redis服务使用的是redis.windows-service.conf配置文件。

相关文章

网友评论

      本文标题:Redis 安装

      本文链接:https://www.haomeiwen.com/subject/ehrsbqtx.html