# 在不安裝 Redis 服務器的情況下安裝 Redis CLI [TOC] ###### tags: `redis` --- ## 前置作業 - 安裝 npm。 ## 安裝 Redis CLI ```shell % npm i -g redis-cli ``` ## 指令說明 ``` rdcli [OPTIONS] [cmd [arg [arg ...]]] Options: --help Show help [boolean] --version Show version number [boolean] -h, --host Server hostname (default: 127.0.0.1). [string] [default: "127.0.0.1"] -p, --port Server port (default: 6379). [number] [default: 6379] -s, --socket Server socket (overrides hostname and port). [string] -a, --auth Server password. [string] -u Server URI. [string] -m, --mode Server Type, only redis available now. [choices: "redis"] [default: "redis"] -c, --cluster Enable cluster mode (follow -ASK and -MOVED redirections). [boolean] [default: false] --tls Establish a secure TLS connection. [boolean] [default: false] ``` ## 連線驗證 ```shell % rdcli -h SERVER_HOST_NAME -a SERVER_PASSWORD -p SERVER_PORT ``` ## 參考資料 - [How to Install Redis CLI Without Installing Redis Server (Even on Windows)](https://redis.com/blog/get-redis-cli-without-installing-redis-server/)
×
Sign in
Email
Password
Forgot password
or
Sign in via Google
Sign in via Facebook
Sign in via X(Twitter)
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
Continue with a different method
New to HackMD?
Sign up
By signing in, you agree to our
terms of service
.