maas 中间件安装文档
# 云平台所需中间件安装手册
# postgresql 安装文档
目前,MAAS服务安装的 PostgreSQL(版本: 15.6) 支持仅限于 amd64 架构 Ubuntu、Kylin、Centos、OpenEuler、Redhat. aarch64 架构支持 Kylin、OpenEuler、Redhat、Ubuntu 操作系统
- 安装postgresql
注: 使用maas-8.0.3 安装包
$ ./bin/maas.sh middleware postgresql install
17:53:18.60 INFO ==> create postgres user and group
groupadd: group 'postgres' already exists
useradd: user 'postgres' already exists
17:53:18.62 INFO ==> check postgres postgres user
could not change directory to "/root/maas-8.0.3": Permission denied
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
The database cluster will be initialized with locale "en_US.UTF-8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".
Data page checksums are disabled.
fixing permissions on existing directory /opt/postgresql/data ... ok
creating subdirectories ... ok
selecting dynamic shared memory implementation ... posix
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default time zone ... Asia/Shanghai
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok
initdb: warning: enabling "trust" authentication for local connections
initdb: hint: You can change this by editing pg_hba.conf or using the option -A, or --auth-local and --auth-host, the next time you run initdb.
Success. You can now start the database server using:
/opt/postgresql/bin/pg_ctl -D /opt/postgresql/data -l logfile start
17:53:19.46 INFO ==> Allow all incoming connections from any IP
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
- 启动postgresql
# 启动postgresql
$ ./bin/maas.sh middleware postgresql start
waiting for server to start.... done
server started
# 停止postgresql
$ ./bin/maas.sh middleware postgresql stop
waiting for server to shut down.... done
server stopped
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
- 初始化postgresql数据库用户名密码
$ ./bin/maas.sh middleware postgresql init
Initializing database connection configuration...
Database: test1
Username: admin
Password:
ERROR: role "admin" already exists
ALTER ROLE
CREATE DATABASE
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
- 卸载postgresql数据库
$ ./bin/maas.sh middleware postgresql uninstall
Stopping the 'postgres' service before removal.
Starting the uninstallation process for package 'postgresql'. Initiated by user 'postgres'.
uninstall postgresql success!
1
2
3
4
5
6
2
3
4
5
6
编辑页面 (opens new window)