自动安装步骤
自动安装步骤
脚本将安装过程编排为 11 个编号步骤。其中创建 halo 用户、数据目录、归档、兼容模式 4 个步骤包含交互输入(见安装参数交互),其余步骤全自动执行,无需人工干预。完整步骤如下:
1、Start installing database dependencies # 安装数据库依赖(自动)
2、Creating halo user # 创建 halo 用户(交互)
3、Creating database directory # 创建数据目录(交互)
4、Checking halo installation version # 检查安装版本(自动)
5、Initializing halo database # 初始化数据库 initdb(自动)
6、Configuring halo database # 配置 pg_hba.conf、postgresql.conf(自动)
7、Configuring archive log # 配置归档日志(交互)
8、Copying license.lic # 拷贝授权文件到 product/dbms/16(自动)
9、Starting halo database # 启动数据库(自动)
10、Create compatible mode database # 创建兼容模式数据库(交互)
11、Configuring huge pages # 配置大页(自动)
兼容模式数据库
数据库启动后,脚本询问需要创建的兼容模式数据库:
10、Create compatible mode database? Enter all/oracle/mysql/postgresql, press Enter to skip
all
PostgreSQL mode port set to: 5432
Restarting halo database
Oracle mode port set to: 1521
Restarting halo database
MySQL mode port set to: 3306
Restarting halo database
Creating MySQL compatible mode database
Creating mysql user
Creating mysql extension
Completed creating all compatible mode databases
步骤 10 兼容模式数据库 → 步骤 11 配置大页 → 安装完成 的实际连续输出如下:
10. Create compatible mode database? Enter all/oracle/mysql/postgresql, press Enter to skip
all
PostgreSQL mode port set to: 5432
Restarting halo database
Oracle mode port set to: 1521
MySQL mode port set to: 3306
Restarting halo database
Creating MySQL compatible mode database
Creating mysql user
Completed creating all compatible mode databases
11. Configuring huge pages
[root@master product]#
说明: 实际输出中三种兼容模式端口依次设定为 PostgreSQL
5432、Oracle1521、MySQL3306,每设定一项即Restarting halo database重启数据库使配置生效;末尾打印11. Configuring huge pages后回到 shell 提示符,表示整个安装流程结束。
| 输入值 | 含义 |
|---|---|
all | 创建全部兼容模式(Oracle + MySQL + PostgreSQL) |
oracle | 仅创建 Oracle 兼容模式 |
mysql | 仅创建 MySQL 兼容模式 |
postgresql | 仅创建 PostgreSQL 兼容模式 |
| (回车) | 跳过,不创建兼容模式数据库 |
注意: 兼容模式决定数据库的 SQL 语法与行为风格。若应用需要兼容 Oracle/MySQL 语法,选
all或对应模式;纯 PostgreSQL 应用可选postgresql。三种兼容模式分别监听 1521(Oracle)、3306(MySQL)、5432(PostgreSQL)端口。
安装完成
兼容模式数据库创建完成后,脚本继续配置大页(huge pages)并完成安装:
11、Configuring huge pages
至此,Halo 单机数据库一键安装全部完成,数据库已成功启动并可用。步骤 11 配置大页 → 回到 shell 提示符 的实际输出如下:
11. Configuring huge pages
[root@master product]#
说明: 出现
[root@master product]#提示符即表示一键安装脚本执行结束、控制权交回 shell,数据库已在后台运行。