Skip to content
Merged
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
34 changes: 13 additions & 21 deletions CN/modules/ROOT/pages/v4.5/3.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ IvorySQL数据库目前支持的操作系统包括但不限于CentOS 8.X、CentO

[[快速安装]]
== 快速安装
....
快速开始示例所使用的操作系统为CentOS Stream 9。
....
快速开始示例所使用的操作系统为CentOS Stream 9。
=== 从yum源安装IvorySQL数据库

** 安装前准备
Expand All @@ -52,16 +50,14 @@ gpgcheck=0
```
保存退出后,安装IvorySQL4
```
$ sudo dnf install -y IvorySQL-4.5
$ sudo dnf install -y ivorysql4-4.5
```
....

正确安装后,数据库将被安装在/opt/IvorySQL-4.5/路径下的IvorySQL-version(如:IvorySQL-4.5)文件夹内
....
正确安装后,数据库将被安装在/usr/ivory-4/文件夹内

执行以下命令为ivorysql用户赋权:
```
$ sudo chown -R ivorysql:ivorysql /opt/IvorySQL-4.5
$ sudo chown -R ivorysql:ivorysql /usr/ivory-4
```
[[配置环境变量]]
** 配置环境变量
Expand All @@ -70,9 +66,9 @@ $ sudo chown -R ivorysql:ivorysql /opt/IvorySQL-4.5

将以下配置写入~/.bash_profile文件并使用source命令该文件使环境变量生效:
```
PATH=/opt/IvorySQL-4.5/bin:$PATH
PATH=/usr/ivory-4/bin:$PATH
export PATH
PGDATA=/opt/IvorySQL-4.5/data
PGDATA=/usr/ivory-4/data
export PGDATA
```
```
Expand All @@ -82,16 +78,14 @@ $ source ~/.bash_profile
** 数据库初始化

```
$ initdb -D /opt/IvorySQL-4.5/data
$ initdb -D /usr/ivory-4/data
```
....
其中-D参数用来指定数据库的数据目录。更多参数使用方法,请使用initdb --help命令获取。
....
其中-D参数用来指定数据库的数据目录。更多参数使用方法,请使用initdb --help命令获取。

** 启动数据库服务

```
$ pg_ctl -D /opt/IvorySQL-4.5/data -l ivory.log start
$ pg_ctl -D /usr/ivory-4/data -l ivory.log start
```

其中-D参数用来指定数据库的数据目录,如果<<配置环境变量>> 配置了PGDATA,则该参数可以省略。-l参数用来指定日志目录。更多参数使用方法,请使用pg_ctl --help命令获取。
Expand All @@ -100,7 +94,7 @@ $ pg_ctl -D /opt/IvorySQL-4.5/data -l ivory.log start
查看确认数据库启动成功:
```
$ ps -ef | grep postgres
ivorysql 3214 1 0 20:35 ? 00:00:00 /opt/IvorySQL-4.5/bin/postgres -D /opt/IvorySQL-4.5/data
ivorysql 3214 1 0 20:35 ? 00:00:00 /usr/ivory-4/bin/postgres -D /usr/ivory-4/data
ivorysql 3215 3214 0 20:35 ? 00:00:00 postgres: checkpointer
ivorysql 3216 3214 0 20:35 ? 00:00:00 postgres: background writer
ivorysql 3218 3214 0 20:35 ? 00:00:00 postgres: walwriter
Expand Down Expand Up @@ -138,14 +132,12 @@ Type "help" for help.

ivorysql=#
```
....
其中-d参数用来指定想要连接到的数据库名称。IvorySQL默认使用ivorysql数据库,但较低版本的IvorySQL首次使用时需用户先连接postgres数据库,然后自己创建ivorysql数据库。较高版本的IvorySQL则已为用户创建好ivorysql数据库,可以直接连接。
其中-d参数用来指定想要连接到的数据库名称。IvorySQL默认使用ivorysql数据库,但较低版本的IvorySQL首次使用时需用户先连接postgres数据库,然后自己创建ivorysql数据库。较高版本的IvorySQL则已为用户创建好ivorysql数据库,可以直接连接。

更多参数使用方法,请使用psql --help命令获取。
....
更多参数使用方法,请使用psql --help命令获取。

TIP: Docker运行IvorySQL时,需要添加额外参数,如 psql -d ivorysql -U ivorysql -h 127.0.0.1 -p 5434

现在可以开始使用IvorySQL啦!就是这么简单!

想要获得更多安装方式,请参考xref:v4.5/6.adoc[安装指南]
想要获得更多安装方式,请参考xref:v4.5/6.adoc[安装指南]
58 changes: 17 additions & 41 deletions CN/modules/ROOT/pages/v4.5/6.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -35,27 +35,6 @@ gpgcheck=0
$ sudo dnf install -y IvorySQL-4.5
```

** 查看安装结果
```
dnf search IvorySQL
```
查看结果说明如下:
|====
| 序号 | 包名 | 描述
| 1 | ivorysql4.x86_64 | IvorySQL客户端程序和库文件
| 2 | ivorysql4-contrib.x86_64 | 随IvorySQL发布的已贡献的源代码和二进制文件
| 3 | ivorysql4-devel.x86_64 | IvorySQL开发头文件和库
| 4 | ivorysql4-docs.x86_64 | IvorySQL的额外文档
| 5 | ivorysql4-libs.x86_64 | 所有IvorySQL客户端所需的共享库
| 6 | ivorysql4-llvmjit.x86_64 | 对IvorySQL的即时编译支持
| 7 | ivorysql4-plperl.x86_64 | 用于IvorySQL的过程语言Perl
| 8 | ivorysql4-plpython3.x86_64 | 用于IvorySQL的过程语言Python3
| 9 | ivorysql4-pltcl.x86_64 | 用于IvorySQL的过程语言Tcl
| 10 | ivorysql4-server.x86_64 | 创建和运行IvorySQL服务器所需的程序
| 11 | ivorysql4-test.x86_64 | 随IvorySQL发布的测试套件
| 12 | ivorysql-release.noarch | 瀚高基础软件股份有限公司的Yum源配置RPM包
|====

[[docker安装]]
== docker安装

Expand Down Expand Up @@ -104,7 +83,7 @@ $ sudo wget https://github.com/IvorySQL/IvorySQL/releases/download/IvorySQL_4.5/
```
$ sudo yum --disablerepo=* localinstall *.rpm
```
数据库将被安装在/opt/IvorySQL-4.5/路径下。
数据库将被安装在/usr/ivory-4/路径下。

[[源码安装]]
== 源码安装
Expand All @@ -125,7 +104,7 @@ $ git checkout -b IVORY_REL_4_STABLE origin/IVORY_REL_4_STABLE

在IvorySQL目录下,执行以下命令进行配置,请使用--prefix指定安装目录:
```
$ ./configure --prefix=/usr/local/ivorysql/ivorysql-4
$ ./configure --prefix=/usr/ivory-4/
```
** 编译

Expand Down Expand Up @@ -166,7 +145,7 @@ $ sudo wget https://github.com/IvorySQL/IvorySQL/releases/download/IvorySQL_4.5/
```
$ sudo dpkg -i IvorySQL-4.5-a50789d-20250304.amd64.deb
```
数据库将被安装在/opt/IvorySQL-4.5/路径下。
数据库将被安装在/usr/ivory-4/路径下。

== 启动数据库
参考<<yum源安装>>、<<rpm安装>>、<<源码安装>>、<<deb安装>>的用户,需要手动启动数据库。
Expand All @@ -175,9 +154,9 @@ $ sudo dpkg -i IvorySQL-4.5-a50789d-20250304.amd64.deb

+

执行以下命令为安装用户赋权,示例用户为ivorysql,安装目录为/opt/IvorySQL-4.5/:
执行以下命令为安装用户赋权,示例用户为ivorysql,安装目录为/usr/ivory-4/:
```
$ sudo chown -R ivorysql:ivorysql /opt/IvorySQL-4.5/
$ sudo chown -R ivorysql:ivorysql /usr/ivory-4/
```
[[配置环境变量]]
** 配置环境变量
Expand All @@ -186,9 +165,9 @@ $ sudo chown -R ivorysql:ivorysql /opt/IvorySQL-4.5/

将以下配置写入用户的~/.bash_profile文件并使用source命令该文件使环境变量生效:
```
PATH=/opt/IvorySQL-4.5/bin:$PATH
PATH=/usr/ivory-4/bin:$PATH
export PATH
PGDATA=/opt/IvorySQL-4.5/data
PGDATA=/usr/ivory-4/data
export PGDATA
```
```
Expand All @@ -197,17 +176,15 @@ $ source ~/.bash_profile
** 数据库初始化

```
$ mkdir /opt/IvorySQL-4.5/data
$ initdb -D /opt/IvorySQL-4.5/data
$ mkdir /usr/ivory-4/data
$ initdb -D /usr/ivory-4/data
```
....
其中-D参数用来指定数据库的数据目录。更多参数使用方法,请使用initdb --help命令获取。
....
其中-D参数用来指定数据库的数据目录。更多参数使用方法,请使用initdb --help命令获取。

** 启动数据库服务

```
$ pg_ctl -D /opt/IvorySQL-4.5/data -l ivory.log start
$ pg_ctl -D /usr/ivory-4/data -l ivory.log start
```

其中-D参数用来指定数据库的数据目录,如果<<配置环境变量>> 配置了PGDATA,则该参数可以省略。-l参数用来指定日志目录。更多参数使用方法,请使用pg_ctl --help命令获取。
Expand All @@ -216,7 +193,7 @@ $ pg_ctl -D /opt/IvorySQL-4.5/data -l ivory.log start
查看确认数据库启动成功:
```
$ ps -ef | grep postgres
ivorysql 130427 1 0 02:45 ? 00:00:00 /opt/IvorySQL-4.5/bin/postgres -D /opt/IvorySQL-4.5/data
ivorysql 130427 1 0 02:45 ? 00:00:00 /usr/ivory-4/bin/postgres -D /usr/ivory-4/data
ivorysql 130428 130427 0 02:45 ? 00:00:00 postgres: checkpointer
ivorysql 130429 130427 0 02:45 ? 00:00:00 postgres: background writer
ivorysql 130431 130427 0 02:45 ? 00:00:00 postgres: walwriter
Expand Down Expand Up @@ -254,8 +231,7 @@ TIP: Docker运行IvorySQL时,需要添加额外参数,参考:psql -d ivory

执行以下命令依次卸载:
```
$ sudo dnf remove -y IvorySQL-4.5
$ sudo rpm -e ivorysql-release-4.2-1.noarch
$ sudo dnf remove -y ivorysql4-4.5
```

=== docker安装的卸载
Expand All @@ -272,7 +248,7 @@ $ docker rmi ivorysql/ivorysql:4.5-ubi8
执行以下命令卸载并清理文件夹:
```
$ sudo yum remove --disablerepo=* ivorysql4\*
$ sudo rm -rf /opt/IvorySQL-4.5
$ sudo rm -rf /usr/ivory-4/
```

=== 源码安装的卸载
Expand All @@ -281,13 +257,13 @@ $ sudo rm -rf /opt/IvorySQL-4.5
```
$ sudo make uninstall
$ make clean
$ sudo rm -rf /opt/IvorySQL-4.5
$ sudo rm -rf /usr/ivory-4/
```

=== deb安装的卸载

执行以下命令卸载数据库并清理文件夹:
```
$ sudo dpkg -P IvorySQL-4.5
$ sudo rm -rf /opt/IvorySQL-4.5
```
$ sudo rm -rf /usr/ivory-4/
```
34 changes: 14 additions & 20 deletions EN/modules/ROOT/pages/v4.5/3.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ Currently, IvorySQL supports but is not limited to linux(CentOS 8.X/CentOS Strea

[[quick-installation]]
== Quick installation
....
The operating system used for the quick start is CentOS Stream 9.
....
The operating system used for the quick start is CentOS Stream 9.
=== yum installation

** Pre-requirements
Expand All @@ -51,7 +49,7 @@ gpgcheck=0
```
After saving and exiting, you can install IvorySQL 4 with the following steps
```
$ sudo dnf install -y IvorySQL-4.5
$ sudo dnf install -y ivorysql4-4.5
```

[[setting-environment-variables]]
Expand All @@ -61,9 +59,9 @@ $ sudo dnf install -y IvorySQL-4.5

Add below contents in ~/.bash_profile file and source to make it effective:
```
PATH=/opt/IvorySQL-4.5/bin:$PATH
PATH=/usr/ivory-4/bin:$PATH
export PATH
PGDATA=/opt/IvorySQL-4.5/data
PGDATA=/usr/ivory-4/data
export PGDATA
```
```
Expand All @@ -73,29 +71,27 @@ $ source ~/.bash_profile
** Initializing database

```
$ initdb -D /opt/IvorySQL-4.5/data
$ initdb -D /usr/ivory-4/data
```
....
The -D option specifies the directory where the database cluster should be stored. This is the only information required by initdb, but you can avoid writing it by setting the PGDATA environment variable, which can be convenient since the database server can find the database directory later by the same variable.
The -D option specifies the directory where the database cluster should be stored. This is the only information required by initdb, but you can avoid writing it by setting the PGDATA environment variable, which can be convenient since the database server can find the database directory later by the same variable.

For more options, refer to initdb --help.
....
For more options, refer to initdb --help.

** Starting IvorySQL service

```
$ pg_ctl -D /opt/IvorySQL-4.5/data -l ivory.log start
$ pg_ctl -D /usr/ivory-4/data -l ivory.log start
```

The -D option specifies the file system location of the database configuration files. If this option is omitted, the environment variable PGDATA in <<setting-environment-variables>> is used. -l option appends the server log output to filename. If the file does not exist, it is created.
The -D option specifies the file system location of the database configuration files. If this option is omitted, the environment variable PGDATA in <<setting-environment-variables>> is used. -l option appends the server log output to filename. If the file does not exist, it is created.

For more options, refer to pg_ctl --help.
For more options, refer to pg_ctl --help.


Confirm it’s successfully started:
```
$ ps -ef | grep postgres
ivorysql 3214 1 0 20:35 ? 00:00:00 /opt/IvorySQL-4.5/bin/postgres -D /opt/IvorySQL-4.5/data
ivorysql 3214 1 0 20:35 ? 00:00:00 /usr/ivory-4/bin/postgres -D /usr/ivory-4/data
ivorysql 3215 3214 0 20:35 ? 00:00:00 postgres: checkpointer
ivorysql 3216 3214 0 20:35 ? 00:00:00 postgres: background writer
ivorysql 3218 3214 0 20:35 ? 00:00:00 postgres: walwriter
Expand Down Expand Up @@ -133,14 +129,12 @@ Type "help" for help.

ivorysql=#
```
....
The -d option specifies the name of the database to connect to. ivorysql is the default database of IvorySQL. However,IvorySQL of lower versions need the users themselves to connect to postgres database at the first connection and then create the ivorysql database.The latest IvorySQL can do all these for users.
The -d option specifies the name of the database to connect to. ivorysql is the default database of IvorySQL. However,IvorySQL of lower versions need the users themselves to connect to postgres database at the first connection and then create the ivorysql database.The latest IvorySQL can do all these for users.

For more options, refer to psql --help.
....
For more options, refer to psql --help.

TIP: When running IvorySQL in Docker, additional parameters need to be added, like: psql -d ivorysql -U ivorysql -h 127.0.0.1 -p 5434

Now you can start your journey of IvorySQL! Enjoy!

To explore additional installation methods, please refer to the xref:v4.5/6.adoc[Installation].
To explore additional installation methods, please refer to the xref:v4.5/6.adoc[Installation].
Loading