1:ダウンロード
ではここで、インストールパッケージをダウンロードします。
2:解凍
特定のディレクトリに直接解凍するだけです。
3:一時サービスモードの開始
このメソッドはすぐに開始できますが、システムのサービスに追加されることはありません。
3.1:開始
D:\program_files\Redis-x64-2.8.2402>redis-server.exe redis.windows.conf
_._
_.-``__ ''-._
_.-`` `. `_. ''-._ Redis 2.8.2402 (00000000/0) 64 bit
.-`` .-```. ```\/ _.,_ ''-._
( ' , .-` | `, ) Running in stand alone mode
|`-._`-...-` __...-.``-._|'` _.-'| Port: 6379
| `-._ `._ / _.-' | PID: 24480
`-._ `-._ `-./ _.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' | http://redis.io
`-._ `-._`-.__.-'_.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' |
`-._ `-._`-.__.-'_.-' _.-'
`-._ `-.__.-' _.-'
`-._ _.-'
`-.__.-'
[24480] 28 Oct 09:39:51.705 # Server started, Redis version 2.8.2402
[24480] 28 Oct 09:39:51.707 * The server is now ready to accept connections on port 6379
3.2:クライアント接続テスト
D:\program_files\Redis-x64-2.8.2402>redis-cli.exe -h 127.0.0.1 -p 6379
127.0.0.1:6379> set name dongshidaddy
OK
127.0.0.1:6379> get name
3.3:パスワードを有効にしてテストする
- パスワード
を有効にするとrequirepass
、コメントが削除され、独自のパスワードが設定されます。ここで、パスワードをとして設定します12345678
。
requirepass 12345678
。 - サービスを再起動し
ctrl+C
て古いウィンドウを削除してから、startコマンドを再度実行してください。
D:\program_files\Redis-x64-2.8.2402>redis-server.exe redis.windows.conf
...
[24480] 28 Oct 09:49:22.780 # User requested shutdown...
[24480] 28 Oct 09:49:22.780 * Saving the final RDB snapshot before exiting.
[24480] 28 Oct 09:49:22.830 * DB saved on disk
[24480] 28 Oct 09:49:22.830 # Redis is now ready to exit, bye bye...
D:\program_files\Redis-x64-2.8.2402>redis-server.exe redis.windows.conf
_._
_.-``__ ''-._
_.-`` `. `_. ''-._ Redis 2.8.2402 (00000000/0) 64 bit
.-`` .-```. ```\/ _.,_ ''-._
( ' , .-` | `, ) Running in stand alone mode
|`-._`-...-` __...-.``-._|'` _.-'| Port: 6379
| `-._ `._ / _.-' | PID: 23828
`-._ `-._ `-./ _.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' | http://redis.io
`-._ `-._`-.__.-'_.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' |
`-._ `-._`-.__.-'_.-' _.-'
`-._ `-.__.-' _.-'
`-._ _.-'
`-.__.-'
[23828] 28 Oct 09:51:33.699 # Server started, Redis version 2.8.2402
[23828] 28 Oct 09:51:33.699 * DB loaded from disk: 0.000 seconds
[23828] 28 Oct 09:51:33.700 * The server is now ready to accept connections on port 6379
- 接続
D:\program_files\Redis-x64-2.8.2402>redis-cli.exe -h 127.0.0.1 -p 6379
127.0.0.1:6379> set age 32
(error) NOAUTH Authentication required.
127.0.0.1:6379> auth 12345678
OK
127.0.0.1:6379> set age 32
OK
127.0.0.1:6379> get age
"32"
ctrl+C
サービスを停止し、フォローアップを続けます。
4:サービスに追加
4.1:登録サービス
D:\program_files\Redis-x64-2.8.2402>redis-server.exe --service-install redis.windows.conf --service-name dongshidaddy-redis-server --loglevel verbose
[2452] 28 Oct 09:59:19.506 # Granting read/write access to 'NT AUTHORITY\NetworkService' on: "D:\program_files\Redis-x64-2.8.2402" "D:\program_files\Redis-x64-2.8.2402\"
[2452] 28 Oct 09:59:19.507 # Redis successfully installed as a service.
登録が成功したら、win+r
->services.msc
サービスの表示に移動します。
4.2:サービスを開始します
D:\program_files\Redis-x64-2.8.2402>redis-server.exe --service-start --service-name dongshidaddy-redis-server
[10508] 28 Oct 10:21:56.212 # Redis service successfully started.
4.2:接続テスト
D:\program_files\Redis-x64-2.8.2402>redis-cli.exe -h 127.0.0.1 -p 6379
127.0.0.1:6379> set gender man
(error) NOAUTH Authentication required.
127.0.0.1:6379> auth 12345678
OK
127.0.0.1:6379> set gender man
OK
127.0.0.1:6379> get gender
"man"