windows install and deploy as a service under Redis
One: Download
download link:
windows版本:
https://github.com/MSOpenTech/redis/releases
Linux版本:
官网下载:
http://www.redis.cn/
git下载
https://github.com/antirez/redis/releases
We're talking about installation deployment under the windows, the windows currently the latest version is: 3.2.100.
Download, offers a variety of downloadable content,
Redis-x64-3.2.100.msi under windows, the easiest installation files, convenient, direct Redis will write windows services.
Redis-x64-3.2.100.zip need to extract the installation of this is discussed next.
Source code (zip) zip compressed version of the source code
Source code (tar.gz) tar.gz compressed version of the source code
II: Installation
Extracting installer
Unzip the downloaded Redis-x64-3.2.100.zip to an address.
Start command
Redis assigned to the directory by cmd.
Use the command: redis-server.exe to start the service
appears this effect, indicating that the service starts successfully.
Start another cmd, redis in this directory, use the command: redis-cli.exe start the client, connect to the server
appears this effect, indicating that the launch customer of success.
Three: deployment
Due to the above, although the redis service starts, however, as long as a close cmd window, redis service shut down. Therefore, the redis set a windows service.
Before installation, windows service that does not contain redis services
Install windows service
安装命令: redis-server.exe --service-install redis.windows.conf 使用命令,安装成功,如图所以:
最后的参数 --loglevel verbose表示记录日志等级
安装之后,windows目前的服务列表
常用的redis服务命令。
卸载服务:redis-server --service-uninstall
开启服务:redis-server --service-start
停止服务:redis-server --service-stop
重命名服务:redis-server --service-name name
重命名服务,需要写在前三个参数之后,例如:
The following would install and start three separate instances of Redis as a service: 以下将会安装并启动三个不同的Redis实例作服务: redis-server --service-install --service-name redisService1 --port 10001 redis-server --service-start --service-name redisService1 redis-server --service-install --service-name redisService2 --port 10002 redis-server --service-start --service-name redisService2 redis-server --service-install --service-name redisService3 --port 10003 redis-server --service-start --service-name redisService3
四:测试
启动服务
redis-server --service-start
客户端
命令:
精简模式:
redis-cli.exe
指定模式:
redis-cli.exe -h 127.0.0.1 -p 6379 -a requirepass (-h 服务器地址 -p 指定端口号 -a 连接数据库的密码[可以在redis.windows.conf中配置],默认无密码)
测试读写数据
安装测试成功。
五:Redis桌面管理工具
推荐使用的桌面管理工具:
https://redisdesktop.com/download
一:下载
下载地址:
windows版本:
https://github.com/MSOpenTech/redis/releases
Linux版本:
官网下载:
http://www.redis.cn/
git下载
https://github.com/antirez/redis/releases
我们现在讨论的是windows下的安装部署,目前windows下最新版本是:3.2.100。
下载地址,提供多种下载内容,
Redis-x64-3.2.100.msi是在windows下,最简单的安装文件,方便,直接会将Redis写入windows服务。
Redis-x64-3.2.100.zip是需要解压安装的,接下来讨论的是这种。
Source code (zip) 源码的zip压缩版
Source code (tar.gz) 源码的tar.gz压缩版
二:安装
解压安装
将下载的Redis-x64-3.2.100.zip 解压到某个地址。
Start command
Redis assigned to the directory by cmd.
Use the command: redis-server.exe to start the service
appears this effect, indicating that the service starts successfully.
Start another cmd, redis in this directory, use the command: redis-cli.exe start the client, connect to the server
appears this effect, indicating that the launch customer of success.
Three: deployment
Due to the above, although the redis service starts, however, as long as a close cmd window, redis service shut down. Therefore, the redis set a windows service.
Before installation, windows service that does not contain redis services
Install windows service
Installation command: redis-server.exe --service-install redis.windows.conf use the command, the installation is successful, as it is:
the last parameter --loglevel verbose logging level representation
after installation, windows current list of services
Commonly used redis service commands.
Uninstall service: redis-server --service-uninstall
Open service: redis-server --service-start
Stop Service: redis-server --service-stop
Rename Service: redis-server --service-name name
After renaming the service, you need to write the first three parameters, such as:
The following would install and start three separate instances of Redis as a service: 以下将会安装并启动三个不同的Redis实例作服务: redis-server --service-install --service-name redisService1 --port 10001 redis-server --service-start --service-name redisService1 redis-server --service-install --service-name redisService2 --port 10002 redis-server --service-start --service-name redisService2 redis-server --service-install --service-name redisService3 --port 10003 redis-server --service-start --service-name redisService3
Four: Test
Start Service
redis-server --service-start
Client
command:
精简模式:
redis-cli.exe
指定模式:
redis-cli.exe -h 127.0.0.1 -p 6379 -a requirepass (-h 服务器地址 -p 指定端口号 -a 连接数据库的密码[可以在redis.windows.conf中配置],默认无密码)
Test read and write data
Installation test was successful.
Five: Redis desktop management tools
Recommended desktop management tools:
https://redisdesktop.com/download