Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CN/modules/ROOT/pages/master/installation_guide.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,16 @@ $ initdb -D /usr/ivory-5/data
....
其中-D参数用来指定数据库的数据目录。更多参数使用方法,请使用initdb --help命令获取。
....
[NOTE]
====
`initdb` 默认按 Oracle 兼容模式初始化(等价于 `-m oracle`),该模式会在初始化阶段安装 `uuid-ossp` 扩展。若系统上找不到该扩展,`initdb` 会因 `FATAL: extension "uuid-ossp" is not available` 失败,并删除刚创建的数据目录。

- 用社区发布的 rpm 或 deb 包安装时通常无需额外操作;如不确定,先用下面的语句自检。
- 从源码构建时,必须在配置阶段显式指定 UUID 库,例如 `./configure --prefix=/usr/local/ivorysql/ivorysql-5 --with-uuid=e2fs`。漏掉该参数时 `configure` 不会报错,但 `make` 会在 `contrib/uuid-ossp` 处因 `#error "please use configure's --with-uuid switch to select a UUID library"` 中断。
- 自检语句:`SELECT name, default_version, installed_version FROM pg_available_extensions WHERE name = 'uuid-ossp';`,正常结果应包含 `uuid-ossp | 1.1 | 1.1`。
- 如确实需要在不带该扩展的情况下初始化,可显式使用 PG 模式:`initdb -D /usr/ivory-5/data -m pg`(PG 模式不安装该扩展)。
====


** 启动数据库服务

Expand Down
10 changes: 10 additions & 0 deletions EN/modules/ROOT/pages/master/installation_guide.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,16 @@ $ initdb -D /usr/ivory-5/data

For more options, refer to initdb --help.
....
[NOTE]
====
By default `initdb` initializes the cluster in Oracle-compatible mode (the same as `-m oracle`), and that mode installs the `uuid-ossp` extension during initialization. If the extension is not available on the system, `initdb` fails with `FATAL: extension "uuid-ossp" is not available` and removes the data directory it has just created.

- Installing from the community rpm or deb package usually requires no extra step; if you are unsure, run the check below first.
- When IvorySQL is built from source, the UUID library must be selected at configuration time, for example `./configure --prefix=/usr/local/ivorysql/ivorysql-5 --with-uuid=e2fs`. Without that option `configure` still succeeds, but `make` stops in `contrib/uuid-ossp` with `#error "please use configure's --with-uuid switch to select a UUID library"`.
- Check: `SELECT name, default_version, installed_version FROM pg_available_extensions WHERE name = 'uuid-ossp';` should report `uuid-ossp | 1.1 | 1.1`.
- If initialization really has to run without the extension, request PG mode explicitly: `initdb -D /usr/ivory-5/data -m pg`, which does not install it.
====


** Starting IvorySQL service

Expand Down
Loading