未验证 提交 4499a3a7 编写于 作者: C Changjian Gao 提交者: GitHub

Update doc: add notice about omit username in Redis URL (#296)

* Update doc: add notice about omit username in Redis URL

* Update README.md
Co-authored-by: NDavies Liu <davies@juicedata.io>
上级 888f1cdb
......@@ -55,6 +55,8 @@ $ cd juicefs
$ make
```
For users in China, it's recommended to set `GOPROXY` to speed up compilation, e.g. [Goproxy China](https://github.com/goproxy/goproxy.cn).
### Dependency
A Redis server (>= 2.8) is needed for metadata, please follow [Redis Quick Start](https://redis.io/topics/quickstart).
......@@ -71,7 +73,9 @@ Assume you have a Redis server running locally, we can create a volume called `t
$ ./juicefs format localhost test
```
It will create a volume with default settings. If there Redis server is not running locally, the address could be specified using URL, for example, `redis://user:password@host:6379/1`, the password can also be specified by environment variable `REDIS_PASSWORD` to hide it from command line options.
It will create a volume with default settings. If there Redis server is not running locally, the address could be specified using URL, for example, `redis://username:password@host:6379/1`, the password can also be specified by environment variable `REDIS_PASSWORD` to hide it from command line options.
**Note: After Redis 6.0.0, [`AUTH`](https://redis.io/commands/auth) command was extended with two arguments, i.e. username and password. If you use Redis < 6.0.0, just omit the username parameter in the URL, e.g. `redis://:password@host:6379/1`.**
As JuiceFS relies on object storage to store data, you can specify a object storage using `--storage`, `--bucket`, `--access-key` and `--secret-key`. By default, it uses a local directory to serve as an object store, for all the options, please see `./juicefs format -h`.
......
......@@ -74,7 +74,9 @@ $ make
$ ./juicefs format localhost test
```
它会使用默认参数来格式化。如果 Redis 服务不在本地,你可以像这样完整填写它的地址:`redis://user:password@host:6379/1`。Redis 密码可以通过环境变量 `REDIS_PASSWORD` 来指定,避免暴露在命令行选项中。
它会使用默认参数来格式化。如果 Redis 服务不在本地,你可以像这样完整填写它的地址:`redis://username:password@host:6379/1`。Redis 密码可以通过环境变量 `REDIS_PASSWORD` 来指定,避免暴露在命令行选项中。
**注意:Redis 6.0.0 版本以后 [`AUTH`](https://redis.io/commands/auth) 命令支持两个参数,也就是 username 和 password。如果你使用的 Redis 版本小于 6.0.0,省略 URL 中的 username 参数即可,例如 `redis://:password@host:6379/1`。**
JuiceFS 还需要一个对象存储,可以通过参数 `--storage``--bucket``--access-key``--secret-key` 来指定。它默认会使用本地目录来模拟一个对象存储用于测试,详细的参数请看 `./juicefs format -h`
......
......@@ -64,3 +64,7 @@ There are two solutions to this problem:
## `/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1` or `/go/pkg/tool/linux_amd64/compile: signal: killed`
This error may caused by GCC version is too low, please try to upgrade your GCC to 5.4+.
## `format: ERR wrong number of arguments for 'auth' command`
This error means you use Redis < 6.0.0 and specify username in Redis URL when execute `juicefs format` command. Only Redis >= 6.0.0 supports specify username, so you need omit the username parameter in the URL, e.g. `redis://:password@host:6379/1`.
......@@ -64,3 +64,7 @@ JuiceFS 内置多级缓存(主动失效),一旦缓存预热好,访问的
## `/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1` 或者 `/go/pkg/tool/linux_amd64/compile: signal: killed`
这个错误有可能是因为 GCC 版本过低导致,请尝试升级 GCC 到 5.4 及以上版本。
## `format: ERR wrong number of arguments for 'auth' command`
这个错误意味着你使用的 Redis 版本小于 6.0.0 同时在执行 `juicefs format` 命令时指定了 username 参数。只有 Redis 6.0.0 版本以后才支持指定 username,因此你需要省略 URL 中的 username 参数,例如 `redis://:password@host:6379/1`
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册