Redis在windows下的配置

时间:2021-07-13 08:35:42
Redis在windows下的配置(在windows-64下安装redis,请参考微软redis的github:https://github.com/MSOpenTech/redis/releases)

下面是windows32的配置
下载地址http://files.cnblogs.com/files/cuiwenyuan/Redis-3.2.100-Windows-32.zip 假设安装目录为E:\wrcold520\Redis-3.2.-Windows-\Redis
、启动没有参数配置的Redis:
()双击redis-server.exe
()在cmd命令窗口下运行redis-server或者redis-server.exe # 示例:
Microsoft Windows [版本 6.1.]
版权所有 (c) Microsoft Corporation。保留所有权利。 E:\wrcold520\Redis-3.2.-Windows-\Redis>redis-server
[] Feb ::38.750 # Warning: no config file specified, using the defaul
t config. In order to specify a config file use redis-server /path/to/redis.conf [] Feb ::38.753 # Warning: bit instance detected but no memory lim
it set. Setting GB maxmemory limit with 'noeviction' policy now.
_._
_.-``__ ''-._
_.-`` `. `_. ''-._ Redis 3.0. (/) bit
.-`` .-```. ```\/ _.,_ ''-._
( ' , .-` | `, ) Running in standalone mode
|`-._`-...-` __...-.``-._|'` _.-'| Port:
| `-._ `._ / _.-' | PID: 6788
`-._ `-._ `-./ _.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' | http://redis.io
`-._ `-._`-.__.-'_.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' |
`-._ `-._`-.__.-'_.-' _.-'
`-._ `-.__.-' _.-'
`-._ _.-'
`-.__.-' [] Feb ::38.755 # Server started, Redis version 3.0.
[] Feb ::38.755 * DB loaded from disk: 0.000 seconds
[] Feb ::38.756 * The server is now ready to accept connections on po
rt 、带配置文件启动Redis 在cmd命令窗口下运行:redis-server redis.windows.conf或者redis-server.exe redis.windows.conf # 示例:
Microsoft Windows [版本 6.1.]
版权所有 (c) Microsoft Corporation。保留所有权利。 E:\wrcold520\Redis-3.2.-Windows-\Redis>redis-server redis.windows.conf
[] Feb ::07.046 # Warning: bit instance detected but no memory lim
it set. Setting GB maxmemory limit with 'noeviction' policy now.
_._
_.-``__ ''-._
_.-`` `. `_. ''-._ Redis 3.0. (/) bit
.-`` .-```. ```\/ _.,_ ''-._
( ' , .-` | `, ) Running in standalone mode
|`-._`-...-` __...-.``-._|'` _.-'| Port:
| `-._ `._ / _.-' | PID: 7540
`-._ `-._ `-./ _.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' | http://redis.io
`-._ `-._`-.__.-'_.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' |
`-._ `-._`-.__.-'_.-' _.-'
`-._ `-.__.-' _.-'
`-._ _.-'
`-.__.-' [] Feb ::07.047 # Server started, Redis version 3.0.
[] Feb ::07.048 * DB loaded from disk: 0.000 seconds
[] Feb ::07.048 * The server is now ready to accept connections on po
rt 、将redis加入windows服务
()在cmd命令窗口下运行:redis-server.exe --service-install redis.windows.conf --loglevel verbose ### 示例:
Microsoft Windows [版本 6.1.]
版权所有 (c) Microsoft Corporation。保留所有权利。 E:\wrcold520\Redis-3.2.-Windows-\Redis>redis-server.exe --service-install r
edis.windows.conf --loglevel verbose
[] Feb ::21.950 # Granting read/write access to 'NT AUTHORITY\Network
Service' on: "E:\wrcold520\Redis-3.2.100-Windows-32\Redis" "E:\wrcold520\Redis-3
.2.100-Windows-\Redis\"
[] Feb ::21.950 # Redis successfully installed as a service. ()启动redis服务
在cmd命令窗口下运行:redis-server --service-start
### 示例:
E:\wrcold520\Redis-3.2.-Windows-\Redis>redis-server --service-start
[] Feb ::18.046 # Redis service successfully started.
()关闭redis服务
在cmd命令窗口下运行:redis-server --service-stop
### 示例:
E:\wrcold520\Redis-3.2.-Windows-\Redis>redis-server --service-stop
[] Feb ::28.098 # Redis service successfully stopped. 、移除redis的windows服务
在cmd命令窗口下运行:redis-server --service-uninstall ### 示例:
E:\wrcold520\Redis-3.2.-Windows-\Redis>redis-server --service-uninstall
[] Feb ::18.735 # Redis service successfully uninstalled.