article/postgresql_and_edb/centos搭建edb12.md
2023-04-06 14:51:36 +08:00

33 lines
938 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

```shell
-A method设置认证方式比如method的值可以是peer、ident、md5、trust等值
--auth-host=method这个选项用来设置远程主机连接的认证方法
--auth-local=method这个选项用来设置本地主机连接的认证方法
-E encoding设置服务器端的编码方式
-U user :设置服务器的超级用户
--pwfile=filename设置超级用户的密码文件从filename文件中的第一行读取一般用于设置比较复杂的密码或者用于自动化处理。
-W :后面不带任何数值,表示在初始化时手动输入密码。
-D/--pgdata这个用来设置存放PostgreSQL数据库文件和配置文件所在目录。
```
```shell
#改密码
\password
```
```sh
PGSETUP_INITDB_OPTIONS="-E UTF-8 -D 数据路径" /usr/edb/as12/bin/edb-as-12-setup initdb
#注意 更改数据路径需要修改 service 文件
```
```
systemctl start edb-as-12
```