Some commonly used commands to the Internet to collect redis used in windows, preserved for yourself.

Redis on Windows installation and service management Redis itself does not support windows, but Microsoft's team maintains a version under Windows
1) Administrator cmd to open a command window
λ redis-server --service-install redis.windows -service .conf --service-name redis6379
shortcut Win + R to open the run services.msc services Manager, you can see Redis is already installed on your system services the go, and the service does not start.
2) Uninstall service:
Parameters: - service-uninstall
it from the registry to delete Redis service configuration information. In a successful uninstallation, the message will be shown success, Redis will exit.
At the same time, this command does not stop the service.
D: \ the Redis
[lambda] Redis-Server---service Uninstall --service-name redis6379
[11752] 12 is 22 is-Nov: 06: 07.395 # UNINSTALLED the Redis-Service successfully.
. 3) to start the service: net start redis
Stop Service: NET STOP Redis
. 4 ) redis.windows.conf configuration file
bind binding ip address, the production environment, you need to configure IP native
daemonize yes, redis daemon is not supported under windows, can be installed as a service;
Log folder: logfile "./logs/server_log.txt" need to manually build logs folder
data folder: dir ./datas/ need to manually build datas folder, the default data file name dump.rdb
protection mode: protected-mode yes , if you need access to other machines, then yes to nO
5) Redis persistence configuration
1.snapshotting snapshot mode (the default mode) has been tested, if not particularly high in the case of the conformance requirements, the use of snapshots, high performance ;
2.append-only File (aof way)
aof setting:
appendOnly yes // start aof persistent way
appendfsync always // a way to receive a disk write command persistent, recommended
appendfsync everysec // writes per second a compromise
appendfsync no // persistent fully guaranteed performance according os
6) master-slave configuration

  1. slaveof <masterip> <mastport>
    2.masterauth <master-password>

redis client
redis-cli -h 127.0.0.1 -p 6379

Guess you like

Origin blog.51cto.com/butcher36/2459657