├── LICENSE
├── README.md
├── inno script
├── redis-cygwin.iss
└── redis-msys2.iss
└── step
├── step_1.png
├── step_2.png
├── step_3.png
└── step_4.png
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2021 Lucifer
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Windows Redis Server
3 | version: '7.0.4'
4 | ---
5 |
6 | ## Windows Redis Server
7 |
8 | #### 说明:
9 |
10 | > 从`Redis`官方源码中编译的`Windows`平台可用的`Redis Server`程序, 分别编译的版本为`cygwin`和`msys2`, 功能上无差别, 可任意选择. 可选择`exe`安装程序自动安装为Windows系统服务,或可配合nssm手动安装为Windows服务开机自启动. 方便Windows环境下Redis的调试和日常开发使用.
11 |
12 | ### _重要提示_: 仅供开发环境使用,生产环境会有性能问题.
13 |
14 | #### Windows平台其他版本Redis
15 |
16 | 1. `tporadowski / redis`
17 |
18 | > `地址`: [https://github.com/tporadowski/redis](https://github.com/tporadowski/redis)
19 | > `版本`: 5.0.14
20 | > `说明`:
21 | >
22 | > > Native port of Redis for Windows. Redis is an in-memory database that persists on disk. The data model is key-value, but many different kind of values are supported: Strings, Lists, Sets, Sorted Sets, Hashes, Streams, HyperLogLogs. This repository contains unofficial port of Redis to Windows.
23 |
24 | 2. `microsoftarchive / redis`
25 |
26 | > `地址`: [https://github.com/microsoftarchive/redis](https://github.com/microsoftarchive/redis)
27 | > `版本`: 3.0.504
28 | > `说明`:
29 | >
30 | > > Redis is an in-memory database that persists on disk. The data model is key-value, but many different kind of values are supported: Strings, Lists, Sets, Sorted Sets, Hashes.
31 |
32 | ### 安装为系统服务:
33 |
34 | #### 第一种 (自动安装) , 推荐:+1::+1::+1::
35 |
36 |
37 | 自动安装为系统服务
38 |
39 | > 从[此处](https://github.com/X-Lucifer/winredis/releases)任意选择`.exe`后缀的可执行程序下载即可. `msys2`或`cygwin`版本功能无差别.
40 |
41 |
42 |
43 | #### 第二种 (手动安装), 不推荐:-1::-1::-1::
44 |
45 |
46 | 使用nssm手动安装redis为系统服务
47 |
48 | 1. 从[此处](https://github.com/X-Lucifer/winredis/releases)任意选择`.tar`后缀的压缩包文件下载解压. `msys2`或`cygwin`版本功能无差别.
49 |
50 | 2. 以`管理员身份`运行`cmd`或`powershell`, 并在当前目录执行以下命令:
51 |
52 | ```shell
53 | .\nssm install
54 | ```
55 |
56 | 3. 打开服务安装窗体, 按图示设置好对应的参数, 点击`install service`按钮即可
57 |
58 | 参考以下步骤:
59 |
60 | 4. 第一步

61 |
62 | 5. 第二步

63 |
64 | 6. 第三步

65 |
66 | 7. 第四步

67 |
68 |
69 |
70 | #### 相关源码和其他软件
71 |
72 | 1. `redis`源码: [https://github.com/redis/redis](https://github.com/redis/redis)
73 | 2. `redis`官网: [https://redis.io](https://redis.io/)
74 | 3. `msys2`: [https://www.msys2.org/](https://www.msys2.org/)
75 | 4. `cygwin`: [https://www.cygwin.com/](https://www.cygwin.com/)
76 | 5. `nssm`: [https://www.nssm.cc/](https://www.nssm.cc/)
77 |
--------------------------------------------------------------------------------
/inno script/redis-cygwin.iss:
--------------------------------------------------------------------------------
1 | ; Script generated by the Inno Script Studio Wizard.
2 | ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
3 |
4 | #define MyAppName "Redis"
5 | #define MyAppPublisher "Lucifer"
6 | #define MyAppURL "https://github.com/X-Lucifer/winredis"
7 | #define MyAppExeName "nssm.exe"
8 | #define MyCopyright "Copyright © Lucifer. All Rights Reserved."
9 | #define MyDescription "Windows Redis Service"
10 | #define MyAppPlatform "cygwin"
11 | ;动态链接库
12 | #define MyLibRuntime "cygwin1.dll"
13 | #define MyLibSsl "cygssl-1.1.dll"
14 | #define MyLibCrypto "cygcrypto-1.1.dll"
15 | #define MyLibZ "cygz.dll"
16 | #define Suffix "lucifer"
17 | ;升级需要更新的代码块
18 | #define MyPath "D:\Publish\Redis"
19 | #define MyAppVersion "7.0.4"
20 |
21 | [Setup]
22 | ; NOTE: The value of AppId uniquely identifies this application.
23 | ; Do not use the same AppId value in installers for other applications.
24 | ; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
25 | AppId={{300D5622-0EC5-46AF-AB7E-9AE0648D0B2C}
26 | AppName={#MyAppName}
27 | AppVersion={#MyAppVersion}
28 | AppVerName={#MyAppName} {#MyAppVersion}
29 | AppPublisher={#MyAppPublisher}
30 | AppPublisherURL={#MyAppURL}
31 | AppSupportURL={#MyAppURL}
32 | AppUpdatesURL={#MyAppURL}
33 | DefaultDirName={pf}\{#MyAppName}
34 | DefaultGroupName={#MyAppName}
35 | DisableProgramGroupPage=yes
36 | OutputDir={#MyPath}
37 | OutputBaseFilename=redis-{#MyAppVersion}-{#MyAppPlatform}
38 | SetupIconFile={#MyPath}\redis.ico
39 | Compression=lzma
40 | SolidCompression=yes
41 | WizardStyle=modern
42 | DisableReadyPage=True
43 | DisableFinishedPage=True
44 | AppCopyright={#MyCopyright}
45 | EnableDirDoesntExistWarning=True
46 | DirExistsWarning=no
47 | UninstallDisplayIcon={uninstallexe}
48 | UninstallDisplayName={#MyAppName}
49 | ArchitecturesInstallIn64BitMode=x64 ia64
50 | VersionInfoVersion={#MyAppVersion}
51 | VersionInfoCompany={#MyAppPublisher}
52 | VersionInfoDescription={#MyDescription}
53 | VersionInfoTextVersion={#MyAppVersion}
54 | VersionInfoProductName={#MyAppName}
55 | UsePreviousGroup=False
56 | AppendDefaultGroupName=False
57 |
58 | [Languages]
59 | Name: "english"; MessagesFile: "compiler:Default.isl"
60 |
61 | [Files]
62 | Source: "{#MyPath}\redis-{#MyAppPlatform}\nssm.exe"; DestDir: "{app}"; Flags: ignoreversion
63 | Source: "{#MyPath}\redis-{#MyAppPlatform}\{#MyLibRuntime}"; DestDir: "{app}"; Flags: ignoreversion
64 | Source: "{#MyPath}\redis-{#MyAppPlatform}\{#MyLibSsl}"; DestDir: "{app}"; Flags: ignoreversion
65 | Source: "{#MyPath}\redis-{#MyAppPlatform}\{#MyLibCrypto}"; DestDir: "{app}"; Flags: ignoreversion
66 | Source: "{#MyPath}\redis-{#MyAppPlatform}\{#MyLibZ}"; DestDir: "{app}"; Flags: ignoreversion
67 | Source: "{#MyPath}\redis-{#MyAppPlatform}\redis.conf"; DestDir: "{app}"; Flags: ignoreversion
68 | Source: "{#MyPath}\redis-{#MyAppPlatform}\redis-benchmark-{#Suffix}.exe"; DestDir: "{app}"; Flags: ignoreversion
69 | Source: "{#MyPath}\redis-{#MyAppPlatform}\redis-cli-{#Suffix}.exe"; DestDir: "{app}"; Flags: ignoreversion
70 | Source: "{#MyPath}\redis-{#MyAppPlatform}\redis-server-{#Suffix}.exe"; DestDir: "{app}"; Flags: ignoreversion
71 | ; NOTE: Don't use "Flags: ignoreversion" on any shared system files
72 |
73 |
74 | [Run]
75 | Filename: "{app}\nssm.exe"; Parameters: "install Redis ""{app}\redis-server-{#Suffix}.exe"" redis.conf"; WorkingDir: "{app}\"; Description: "安装为Windows服务";
76 | Filename: "{app}\nssm.exe"; Parameters: "set Redis DisplayName {#MyAppName}"; WorkingDir: "{app}"; Description: "设置服务名称";
77 | Filename: "{app}\nssm.exe"; Parameters: "set Redis Description ""{#MyDescription}"""; WorkingDir: "{app}"; Description: "设置服务描述";
78 | Filename: "{cmd}"; Parameters: " /c mklink /h ""{app}\redis-sentinel-{#Suffix}.exe"" ""{app}\redis-server-{#Suffix}.exe""";WorkingDir: "{app}\";
79 | Filename: "{cmd}"; Parameters: " /c mklink /h ""{app}\redis-check-rdb-{#Suffix}.exe"" ""{app}\redis-server-{#Suffix}.exe""";WorkingDir: "{app}\";
80 | Filename: "{cmd}"; Parameters: " /c mklink /h ""{app}\redis-check-aof-{#Suffix}.exe"" ""{app}\redis-server-{#Suffix}.exe""";WorkingDir: "{app}\";
81 |
82 | [UninstallRun]
83 | Filename: "{app}\nssm.exe"; Parameters: "stop {#MyAppName}";
84 | Filename: "{app}\nssm.exe"; Parameters: "remove {#MyAppName} confirm";
85 | Filename: "{cmd}"; Parameters: " /c del ""{app}\redis-*.exe"" /f /s /q ";WorkingDir: "{app}\";
86 |
--------------------------------------------------------------------------------
/inno script/redis-msys2.iss:
--------------------------------------------------------------------------------
1 | ; Script generated by the Inno Script Studio Wizard.
2 | ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
3 |
4 | #define MyAppName "Redis"
5 | #define MyAppPublisher "Lucifer"
6 | #define MyAppURL "https://github.com/X-Lucifer/winredis"
7 | #define MyAppExeName "nssm.exe"
8 | #define MyCopyright "Copyright © Lucifer. All Rights Reserved."
9 | #define MyDescription "Windows Redis Service"
10 | #define MyAppPlatform "msys2"
11 | ;动态链接库
12 | #define MyLibRuntime "msys-2.0.dll"
13 | #define MyLibSsl "msys-ssl-1.1.dll"
14 | #define MyLibCrypto "msys-crypto-1.1.dll"
15 | #define MyLibZ "msys-z.dll"
16 | #define Suffix "lucifer"
17 | ;升级需要更新的代码块
18 | #define MyPath "D:\Publish\Redis"
19 | #define MyAppVersion "7.0.4"
20 |
21 | [Setup]
22 | ; NOTE: The value of AppId uniquely identifies this application.
23 | ; Do not use the same AppId value in installers for other applications.
24 | ; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
25 | AppId={{300D5622-0EC5-46AF-AB7E-9AE0648D0B2C}
26 | AppName={#MyAppName}
27 | AppVersion={#MyAppVersion}
28 | AppVerName={#MyAppName} {#MyAppVersion}
29 | AppPublisher={#MyAppPublisher}
30 | AppPublisherURL={#MyAppURL}
31 | AppSupportURL={#MyAppURL}
32 | AppUpdatesURL={#MyAppURL}
33 | DefaultDirName={pf}\{#MyAppName}
34 | DefaultGroupName={#MyAppName}
35 | DisableProgramGroupPage=yes
36 | OutputDir={#MyPath}
37 | OutputBaseFilename=redis-{#MyAppVersion}-{#MyAppPlatform}
38 | SetupIconFile={#MyPath}\redis.ico
39 | Compression=lzma
40 | SolidCompression=yes
41 | WizardStyle=modern
42 | DisableReadyPage=True
43 | DisableFinishedPage=True
44 | AppCopyright={#MyCopyright}
45 | EnableDirDoesntExistWarning=True
46 | DirExistsWarning=no
47 | UninstallDisplayIcon={uninstallexe}
48 | UninstallDisplayName={#MyAppName}
49 | ArchitecturesInstallIn64BitMode=x64 ia64
50 | VersionInfoVersion={#MyAppVersion}
51 | VersionInfoCompany={#MyAppPublisher}
52 | VersionInfoDescription={#MyDescription}
53 | VersionInfoTextVersion={#MyAppVersion}
54 | VersionInfoProductName={#MyAppName}
55 | UsePreviousGroup=False
56 | AppendDefaultGroupName=False
57 |
58 | [Languages]
59 | Name: "english"; MessagesFile: "compiler:Default.isl"
60 |
61 | [Files]
62 | Source: "{#MyPath}\redis-{#MyAppPlatform}\nssm.exe"; DestDir: "{app}"; Flags: ignoreversion
63 | Source: "{#MyPath}\redis-{#MyAppPlatform}\{#MyLibRuntime}"; DestDir: "{app}"; Flags: ignoreversion
64 | Source: "{#MyPath}\redis-{#MyAppPlatform}\{#MyLibSsl}"; DestDir: "{app}"; Flags: ignoreversion
65 | Source: "{#MyPath}\redis-{#MyAppPlatform}\{#MyLibCrypto}"; DestDir: "{app}"; Flags: ignoreversion
66 | Source: "{#MyPath}\redis-{#MyAppPlatform}\{#MyLibZ}"; DestDir: "{app}"; Flags: ignoreversion
67 | Source: "{#MyPath}\redis-{#MyAppPlatform}\redis.conf"; DestDir: "{app}"; Flags: ignoreversion
68 | Source: "{#MyPath}\redis-{#MyAppPlatform}\redis-benchmark-{#Suffix}.exe"; DestDir: "{app}"; Flags: ignoreversion
69 | Source: "{#MyPath}\redis-{#MyAppPlatform}\redis-cli-{#Suffix}.exe"; DestDir: "{app}"; Flags: ignoreversion
70 | Source: "{#MyPath}\redis-{#MyAppPlatform}\redis-server-{#Suffix}.exe"; DestDir: "{app}"; Flags: ignoreversion
71 | ; NOTE: Don't use "Flags: ignoreversion" on any shared system files
72 |
73 |
74 | [Run]
75 | Filename: "{app}\nssm.exe"; Parameters: "install Redis ""{app}\redis-server-{#Suffix}.exe"" redis.conf"; WorkingDir: "{app}\"; Description: "安装为Windows服务";
76 | Filename: "{app}\nssm.exe"; Parameters: "set Redis DisplayName {#MyAppName}"; WorkingDir: "{app}"; Description: "设置服务名称";
77 | Filename: "{app}\nssm.exe"; Parameters: "set Redis Description ""{#MyDescription}"""; WorkingDir: "{app}"; Description: "设置服务描述";
78 | Filename: "{cmd}"; Parameters: " /c mklink /h ""{app}\redis-sentinel-{#Suffix}.exe"" ""{app}\redis-server-{#Suffix}.exe""";WorkingDir: "{app}\";
79 | Filename: "{cmd}"; Parameters: " /c mklink /h ""{app}\redis-check-rdb-{#Suffix}.exe"" ""{app}\redis-server-{#Suffix}.exe""";WorkingDir: "{app}\";
80 | Filename: "{cmd}"; Parameters: " /c mklink /h ""{app}\redis-check-aof-{#Suffix}.exe"" ""{app}\redis-server-{#Suffix}.exe""";WorkingDir: "{app}\";
81 |
82 | [UninstallRun]
83 | Filename: "{app}\nssm.exe"; Parameters: "stop {#MyAppName}";
84 | Filename: "{app}\nssm.exe"; Parameters: "remove {#MyAppName} confirm";
85 | Filename: "{cmd}"; Parameters: " /c del ""{app}\redis-*.exe"" /f /s /q ";WorkingDir: "{app}\";
86 |
--------------------------------------------------------------------------------
/step/step_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/X-Lucifer/winredis/9ddf9fcfa8d237c95d014d48efe40da8c278085a/step/step_1.png
--------------------------------------------------------------------------------
/step/step_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/X-Lucifer/winredis/9ddf9fcfa8d237c95d014d48efe40da8c278085a/step/step_2.png
--------------------------------------------------------------------------------
/step/step_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/X-Lucifer/winredis/9ddf9fcfa8d237c95d014d48efe40da8c278085a/step/step_3.png
--------------------------------------------------------------------------------
/step/step_4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/X-Lucifer/winredis/9ddf9fcfa8d237c95d014d48efe40da8c278085a/step/step_4.png
--------------------------------------------------------------------------------