Tibero_Install

2022-04-07 00:00:00 数据库 文件 安装 输入 字符集

Tibero安装

1 Windows下tibero的安装
安装注意事项:

(1) WIN7下安装要使用管理员身份运行

(2) 安装前关掉系统自带的防火墙及用户安装的杀毒软件等

(3) 在使用命令行安装时,打开CMD窗口要以管理员身份打开

(4) 系统要安装JDK,建议版本是1.5.17版本以上

1.1 图形界面安装
(1) 双击tibero_rdbms_5_win.exe的文件,之后会运行TIBERO RDBMS5的安装器

注意:WIN7环境下要右击“以管理员身份运行”

(2) 正常运行安装器,会出现如下画面

首先,开始安装前,选好产品语言(korean或english)之后再选择安装类型

Tibero rdbms 5 full installation:典型安装,安装TIBERO的server 端和client端

Tibero rdbms 5 cleint install:只安装client

(3) 接下来会显示welcom画面,介绍tibero rdbms的安装内容,点击“NEXT”进行下一步。

(4) 下面显示选择tibero rdbms安装目录的画面,选择好安装目录后,点击“NEXT”进行下一步

注意:安装目录中不能有空格

(5) 输入SID之后,点击“NEXT”进行下一步

注意:在输入SID时,必须注意以下几点:

在服务器之内,SID必须为值;

SID可以是‘数字、字母、- 、_’等的组合;

SID不能包含特殊符号,个字符不可以为数字



(6) 安装类型选择“TYPICAL”或“custom”中之一并点“NEXT”进行下一步,本次示例选择“CUSTOM”

(7) 选择是否安装TBADMIN和HELP文档

(8) 输入端口号、数据块大小、数据文件路径后点“NEXT”进行下一步

(9) 选择字符集

注意:数据库字符集和客户端字符集要一致,否则容易产生乱码

(10) 输入SYS的密码

(11) 安装信息确认

(12) 开始安装,进度条显示安装情况

1.2 手动安装
一般情况下,在WINDOWS下的手动安装是由于安装包中的license过期或其它原因导致不能使用图形界面安装的一种替代方案

(1) 在WINDOWS上使用解压工具对tibero_5_windows.exe文件进行解压

(2) 打开解压后的文件夹,找到Tibero_5_S1401_Win_x86_64_trial\com\binary\win64(此时注意,如果是32位的安装包,则打开Tibero_5_S1401_Win_x86_64_trial\com\binary\win32)目录下的.tar.gz的文件

(3) 向产品供应商相关数据库人员申请license,申请license时要向申请人员提供主机名和数据库的版本信息

(4) 配置环境变量

右击“我的电脑”――“属性”――“系统设置”――“环境变量”――“系统变量”――新建

TB_HOME c:\tibero5

TB_SID tibero5

TB_NLS_LANG UTF8

在PATH环境变量的原有基础上加上;%TB_HOME%\bin;%TB_HOME%\client\bin





(5) 解压tibero_5_windows.tar.gz,并将授权文件license.xml放到license目录下

(6) 将位于%TB_HOME%\bin和%TB_HOME%\lib的.ddl .lib .pad等文件复制到c:\windows和c:\windows\syswow64。要注意,32bit计算机要复制到c:\windows和c:\windows\system32目录下.

(7) 注册服务

以管理员身份打开cmd命令行窗口;

执行tbinstall%TB_HOME% %TB_SID%的命令。在执行此命令前,先执行cscript//H:cscript



(8) 生成参数文件及监听文件

cd%TB_HOME%\config

gen_tip.bat

(9) 启动数据库到nomount阶段

(10) 建库

脚本如下:

create database "tibero5" 数据库名

user sys identified by tibero SYS的密码

maxinstances 8

maxdatafiles 100

character set UTF8 数据库字符集

NATIONAL CHARACTER SET UTF16 国家字符集

logfile group 1 ('log001.log')

size 100M,

group 2 ('log002.log')

size 100M,

group 3 ('log003.log')

size 100M

maxloggroups 255

maxlogmembers 8

noarchivelog

datafile 'system001.tdf'

size 100M

autoextend on next 100M

maxsize unlimited

DEFAULT TABLESPACE USERS

datafile 'usr001.tdf'

size 100M

autoextend on next 100M

maxsize unlimited

DEFAULT TEMPORARY TABLESPACE TEMP

tempfile 'temp001.tdf'

size 100M

autoextend on next 100M

maxsize unlimited

extent management local autoallocate

undo tablespace undo

datafile 'undo001.tdf'

size 100M

autoextend on next 100M

maxsize unlimited

extent management local autoallocate;



(11) 启动数据库到OPEN阶段

(12) 执行system.vbs创建数据字典

注意:执行system.vbs时sys的密码要和建库时的密码一样,SYSCAT的密码一定要输入syscat.



2 Linux下tibero的安装
1.1.命令行安装
(1) 安装JDK

检测系统的JDK情况,如果JDK在1.5.17以上就不用安装了,否则需要安装JDK。



(2) 创建用户和组

# groupadd dba

# useradd -d/home/tibero -g dba -p tibero -s /bin/bash tibero



(3) 配置tibero的环境变量

$ vi .bash_profile

####### SET JAVA ENVIRONMENT ####

#JAVA_HOME=/usr/java/jdk1.7.0_05

#PATH=$JAVA_HOME/bin:$PATH

####### SET TBRIGHTENVIROMENT ####

export TB_HOME=/home/tibero/tibero5

export TB_SID=tb5

export TB_PROF_DIR=$TB_HOME/bin/prof

export PATH=.:$TB_HOME/bin:$TB_HOME/client/bin:$PATH

exportLD_LIBRARY_PATH=$TB_HOME/lib:$TB_HOME/client/lib:$LD_LIBRARY_PATH

exportTB_NLS_LANG=UTF8



####### SET alias ####

alias dba='tbsql sys/tibero'

alias tbcfg='cd $TB_HOME/config'

alias tblog='cd$TB_HOME/instance/$TB_SID/log/tracelog'

alias tbclt='cd $TB_HOME/client/config'

alias tbcfgv='vi $TB_HOME/config/$TB_SID.tip'

alias tbcli='cd ${TB_HOME}/client/config'

alias tbcliv='vi ${TB_HOME}/client/config/tbdsn.tbr'

$ source .bash_profile 使环境变量生效



(4) 把数据库安装包拷贝到tibero 的家目录并更改安装包的权限

# chown tibero:dba/home/tibero/ tibero_RDBMS_5_Linux_x86_20101018.bin

# chmod +x tibero_RDBMS_5_Linux_x86_20101018.bin

(5) 安装数据库

[tibero@hptest ~]$./tibero_RDBMS_5_Linux_x86_20101018.bin

Please wait a moment...

======================================================

Introduction

------------------------ --

TBright Installer will guide youthrough the installation of TBright RDBMS.

It is strongly recommended thatyou quit all programs before

continuing with thisinstallation.

Respond to each prompt to proceedto the next step in the

installation.

You may cancel this installationat any time by typing

'quit'. PRESS <ENTER> TO CONTINUE:

======================================================

Choose Install Folder

--------------------------

Please specify a base locationfor TBright to be installed.

TBright RDBMS will be installedunder TB_HOME directory.

-> Default Install Path:%TB_HOME%

( TB_HOME : /home/tibero/tibero5/tibero )

ENTER AN ABSOLUTE PATH,

OR PRESS <ENTER> TO ACCEPT THE DEFAULT:/home/tibero/tibero5 输入TB_HOME的目录

->Install Path : /home/tibero/tibero5

( TB_HOME : /home/tibero/tibero5 )

Is this correct?(y/n) y

======================================================

SID

---------------------------

Each instance is uniquelyidentified by SID,

and the database is references bythe instance.

TB SID (DEFAULT:tibero):tb5 输入TB_SID

======================================================

Select Installation Type

--------------------------

Please select the InstallationType to install.

-> 1- Typical <default>

2- Custom

ENTER THE NUMBER FOR THE INSTALLSET, OR PRESS

<ENTER> TO ACCEPT THE DEFAULT :1 选择是典型安装还是自定义安装

Listener Port (DEFAULT: 8629) isbusy.

You should proceed 2- Customize.

Do you want to install TBAdmin? (y/n) y 是否安装TBADMIN

Do you want to install help files? (y/n) y 是否安装帮助文档

======================================================

Listener Port (DEFAULT: 8629) :8729 输入数据库的端口号

DATABASE BLOCK SIZE(K) (Default: 8) :8 输入数据块大小

DATA FILE PATH (DEFAULT: /home/tibero/tibero5/instance/tb5/database):

======================================================

Character Set Configuration

--------------------------

Please select the defaultcharacter set.

1. MSWIN949 <Default>

2. GBK

3. UTF8

4. ASCII

5. EUC-KR

6. SHIFT-JIS

7. JA16SJIS

8. JA16SJISTILDE

9. JA16EUC

10. JA16EUCTILDE

>2 选择数据库字符集

======================================================

National Character SetConfiguration

--------------------------

Please select the defaultnational character set.

1. UTF16 <Default>

2. UTF8

>-1 选择国家字符集,一般都是UTF16

======================================================

TB_NLS_LANG Character SetConfiguration

--------------------------

Please select the defaultTB_NLS_LANG character set.

0. Noting<Default>

1. MSWIN949

2. GBK

3. UTF8

4. ASCII

5. EUC-KR

6. SHIFT-JIS

7. JA16SJIS

8. JA16SJISTILDE

9. JA16EUC

10. JA16EUCTILDE

>2 选择客户端字符集,一般要设置成和数据库字符集相同,否则容易出现乱码

======================================================

Account Configuration

--------------------------

Please set the password forAdministrator Accounts.

Sys password :

Confirm Sys password :

Do you want to use the Sys password forSyscat, STELLA and STELLA1?(y/n) y

======================================================

Pre-Installation Summary

-------------------------

Please Review the FollowingInformation Before Continuing.

Product Name : TBright RDBMS

TB_HOME : /home/TBdb/TBright

TB_SID : TBdb

Install Folder : /home/TBdb/TBright

Install Set : Customize(TBright RDBMS,TBAdmin, help files)

Listener Port : 8729

DataBase BLOCK SIZE(K) : 8

DATA FILE PATH : /home/TBdb/TBright/instance/TBdb/database

Character Set : GBK

National Character Set : UTF16

Is this information correct?(y/n) y

======================================================

InstallingTBright RDBMS

--------------------------

(100) Tibero RDBMS uncompressedcompletely

(100) TbAdmin uncompressedcompletely

(100) Help files uncompressedcompletely

0 50 100 (%)

|=========|========|

Installation completed



1.2.手动安装
(1) 准备tibero_5_linux.tar.gz数据库安装包和license.xml(授权)的文件

向特脉克斯公司的相关数据库人员申请license,申请license时要向申请人员提供主机名和数据库的版本信息



(2) 创建组和用户

# groupadd dba

# useradd -d/home/tibero -g dba -p tibero -s /bin/bash tibero



(3) 拷贝安装文件和license.xml到tibero的家目录下,并解压安装文件,把license.xml放到解压后的license目录下

$ tar zxf tibero5-bin-5.0-linux32_noir-72402-opt.tar.gz

$ cp license.xml./tibero5/license/



(4) 配置环境变量

$ vi .bash_profile

####### SET JAVA ENVIRONMENT ####

#JAVA_HOME=/usr/java/jdk1.7.0_05

#PATH=$JAVA_HOME/bin:$PATH

####### SET TIBEROENVIROMENT ####

export TB_HOME=/home/tibero/tibero5

export TB_SID=tb5

export TB_PROF_DIR=$TB_HOME/bin/prof

export PATH=.:$TB_HOME/bin:$TB_HOME/client/bin:$PATH

exportLD_LIBRARY_PATH=$TB_HOME/lib:$TB_HOME/client/lib:$LD_LIBRARY_PATH

exportTB_NLS_LANG=UTF8

####### SET ALIAS####

alias dba='tbsql sys/tibero'

alias tbcfg='cd $TB_HOME/config'

alias tblog='cd$TB_HOME/instance/$TB_SID/log/tracelog'

alias tbclt='cd $TB_HOME/client/config'

alias tbcfgv='vi $TB_HOME/config/$TB_SID.tip'

alias tbcli='cd ${TB_HOME}/client/config'

alias tbcliv='vi ${TB_HOME}/client/config/tbdsn.tbr'



$ source .bash_profile 使环境变量生效



(5) 生成参数文件及监听文件

$cd $TB_HOME/config

$./gen_tip.sh

[tibero@ibmtest ~]$ cd $TB_HOME/config

[tibero@ibmtest config]$ ./gen_tip.sh

Using TB_SID "tb5"

/home/tibero/tibero5/config/tb5.tip generated

/home/tibero/tibero5/config/psm_commands generated

/home/tibero/tibero5/client/config/tbdsn.tbr generated.

Running client/config/gen_esql_cfg.sh

Done.



(6) 启动数据库到nomount阶段

$tbboot nomount

[tibero@ibmtest config]$ tbboot nomount

listener port = 8629

change core dump dir to /home/tibero/tibero5/bin/prof

Tibero 5

Copyright (c) 2008, 2009, 2011, 2012 Tibero Corporation. All rights reserved.

Tibero instance started TB (NOMOUNT mode).



(7) 建库

$tbsql sys/tibero

SQL>createdatabase "tb5" --数据库名

user sys identified by tibero --sys的密码

maxinstances 8

maxdatafiles 100

character set UTF8 --数据库字符集

NATIONAL CHARACTER SET UTF16 --国家字符集

logfile group 1 ('log001.log')

size 100M,

group 2 ('log002.log')

size 100M,

group 3 ('log003.log')

size 100M

maxloggroups 255

maxlogmembers 8

noarchivelog

datafile 'system001.tdf'

size 100M

autoextend on next 100M

maxsize unlimited

DEFAULT TABLESPACEUSERS

datafile 'usr001.tdf'

size 100M

autoextend on next 100M

maxsize unlimited

DEFAULT TEMPORARYTABLESPACE TEMP

tempfile 'temp001.tdf'

size 100M

autoextend on next 100M

maxsize unlimited

extent management localautoallocate

undo tablespace undo

datafile 'undo001.tdf'

size 100M

autoextend on next 100M

maxsize unlimited

extent management localautoallocate;



(8) 启动数据库到OPEN阶段

$tbboot

[tibero@ibmtest config]$ tbboot

listener port = 8629

change core dump dir to /home/tibero/tibero5/bin/prof

Tibero 5

Copyright (c) 2008, 2009, 2011, 2012 Tibero Corporation. All rights reserved.

Tibero instance started TB (NORMAL mode)



(9) 执行system.sh脚本生成数据库所需要的数据字典

$cd $TB_HOME/scripts

$./system.sh

[tibero@ibmtest config]$ cd $TB_HOME/scripts

[tibero@ibmtest scripts]$ ./system.sh

Enter SYS password:

tibero 此密码一定要和创建数据库时的密码一样



Enter SYSCAT password:

Syscat 此处的密码一定要输入syscat



Creating the role DBA...

Create default system users & roles?(Y/N):

y

Creating packages for sql:

Running /home/tibero/tibero5/scripts/pkg/pkg_dbms_*.sql...

Running /home/tibero/tibero5/scripts/pkg/pkg_dbms_sql.sql...

Creating public synonyms for system packages...

Creating auxiliary tables used in static views...

Create system tables related to profile?(Y/N):

y



Creating system tables related to profile...

Creating static views...

Creating static view descriptions...

Creating packages for statistics:

Running /home/tibero/tibero5/scripts/pkg/pkg_sys_util.sql...

Running /home/tibero/tibero5/scripts/pkg/pkg_dbms_stats_internal.sql...

Running /home/tibero/tibero5/scripts/pkg/pkg_dbms_stats.sql...

Register dbms_stats job to Job Scheduler?(Y/N):

y



Registering dbms_stats job to Job Scheduler...

Creating packages for log errors:

Running /home/tibero/tibero5/scripts/pkg/pkg_dbms_errlog.sql...

Creating packages for mview:

Running /home/tibero/tibero5/scripts/rewrite_table.sql...

Running /home/tibero/tibero5/scripts/pkg/pkg_dbms_mview_util.sql...

Running /home/tibero/tibero5/scripts/pkg/pkg_dbms_mview.sql...

Running /home/tibero/tibero5/scripts/pkg/pkg_dbms_mview_refresh_util.sql...

Running /home/tibero/tibero5/scripts/pkg/pkg_dbms_redefinition_stats.sql...

Running /home/tibero/tibero5/scripts/pkg/pkg_dbms_redefinition.sql...

Creating packages for text:

…………………………

…………………………..

Creating dynamic performance views...

Creating dynamic performance view descriptions...

Check APM status..

Stop APM

Create apm tables?(Y/N):

y



Dropping tables used in APM...

Creating auxiliary tables used in APM...

Creating packages for APM...

Running /home/tibero/tibero5/scripts/pkg/pkg_dbms_apm.sql...

Start APM

Creating spatial meta tables and views ...

Creating internal system tables...

Done.

For details, check /home/tibero/tibero5/instance/tb5/log/system_init.log.





(10)验证system.sh是否执行成功

$tbsql sys/tibero

SQL>ls

注意:如果有信息,则说明执行成功;如果没有,则不成功,重新执行sytem.sh即可


————————————————
版权声明:本文为CSDN博主「豆宝娘亲」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/seven_duan/article/details/52699513

相关文章