구축 테스트 환경
- OS : Centos 7.9
- DB : Tibero 6 (DB 6.0 FS07_CS_2005)
시스템 설정
<유저 및 그룹 생성>
[root@tiberovm ~]# groupadd dba
[root@tiberovm ~]# useradd -g dba -G dba tibero6
[root@tiberovm ~]# passwd tibero6
Changing password for user tibero6.
New password:tibero
BAD PASSWORD: The password is shorter than 8 characters
Retype new password:tibero
passwd: all authentication tokens updated successfully.
[root@tiberovm ~]# vi /etc/sysctl.conf
kernel.shmmni = 4096
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.sem = 10000 32000 10000 10000
fs.file-max = 6815744
net.ipv4.ip_local_port_range = 1024 65500
[root@tiberovm ~]# vi /etc/security/limits.conf
tibero6 soft nproc 2047
tibero6 hard nproc 16384
tibero6 soft nofile 1024
tibero6 hard nofile 65536
디렉토리 생성 및 환경파일 설정
<Tibero Home>
[tibero6@tiberovm ~]$ mkdir /tibero_engine
<control file / datafile>
[tibero6@tiberovm ~]$ mkdir /tibero_engine/tbdata
<archive file>
[tibero6@tiberovm ~]$ mkdir -p /tibero_engine/tbdata/arch
<Control/Data/Log file duplication>
[tibero6@tiberovm ~]$ mkdir -p /tibero_engine/tbdata/backup
[tibero6@tiberovm ~]$ vi .bash_profile
### User ENV ###
export PS1="[`whoami`@`hostname`:\$PWD]$ "
### JAVA ENV
export JAVA_HOME=/usr/java/default
export JDK_HOME=$JAVA_HOME
export PATH=$JAVA_HOME/bin:$PATH
### TIBERO ENV
export TB_BASE=/tibero_engine
export TB_HOME=$TB_BASE/tibero6
export TB_SID=TB6
export LD_LIBRARY_PATH=$TB_HOME/lib:$TB_HOME/client/lib
export SHLIB_PATH=$LD_LIBRARY_PATH
export LIBPATH=$LD_LIBRARY_PATH
export PATH=$TB_HOME/bin:$TB_HOME/client/bin:$PATH
export TB_PROF_DIR=$TB_HOME/bin/prof
### TBINARY ENV
export TBINARY_PATH=$TB_BASE/tbinary
export PATH=$TBINARY_PATH/monitor:$PATH
### TIBERO Alias
alias tbbase="cd $TB_BASE"
alias tbhome="cd $TB_HOME"
alias tbcfg="cd $TB_HOME/config"
alias tbcli="cd $TB_HOME/client"
alias tbscr="cd $TB_HOME/scripts"
alias tbcfgv="vi $TB_HOME/config/$TB_SID.tip"
alias tbcliv="vi $TB_HOME/client/config/tbdsn.tbr"
alias tblog="cd $TB_BASE/log/$TB_SID"
alias tbi='cd $TB_BASE/tbinary/'
alias tm='cd $TB_BASE/tbinary/monitor;monitor;cd -'
alias tb='tbsql sys/tibero'
Tibero 설치
<Tibero Engine 압축 해제>
[tibero6@tiberovm tmp]$ cp tibero6-bin-FS07_CS_2005-linux64-186930-opt-tested.tar.gz /tibero_engine/
[tibero6@tiberovm tmp]$ cd /tibero_engine/
[tibero6@tiberovm tibero_engine]$ ll
total 480472
drwxr-xr-x. 4 tibero6 dba 30 Jan 25 16:21 tbdata
-rw-r--r--. 1 tibero6 dba 492000929 Jan 25 16:49 tibero6-bin-FS07_CS_2005-linux64-186930-opt-tested.tar.gz
[tibero6@tiberovm tibero_engine]$ tar -xvf tibero6-bin-FS07_CS_2005-linux64-186930-opt-tested.tar.gz
tibero6/bin/alterdd.sh
tibero6/bin/update/system_sh_pkgonly.sh
tibero6/bin/update/psm_recompile_all.sh
tibero6/bin/update/update.tbl
tibero6/bin/tb_create_db.sh
...
[tibero6@tiberovm tibero_engine]$ ls -al
total 480472
drwxr-xr-x. 4 tibero6 dba 100 Jan 25 16:50 .
dr-xr-xr-x. 19 root root 260 Jan 16 23:52 ..
drwxr-xr-x. 4 tibero6 dba 30 Jan 25 16:21 tbdata
drwxr-xr-x. 9 tibero6 dba 97 Jan 25 16:50 tibero6
-rw-r--r--. 1 tibero6 dba 492000929 Jan 25 16:49 tibero6-bin-FS07_CS_2005-linux64-186930-opt-tested.tar.gz
<License 파일 복사>
- 사전에 발급받은 라이선스 등록
- 경로 : $TB_HOME/license/license.xml
<Generate Tip shell 수행>
경로 : $TB_HOME/config/gen_tip.sh
수행 후 생성되는 파일 :
> $TB_SID.tip 생성 ($TB_HOME/config/edu.tip)
> tbdsn.tbr 생성 ($TB_HOME/client/config/tbdsn.tbr)
[tibero6@tiberovm:/tibero_engine/tibero6/config]$ sh gen_tip.sh
Using TB_SID "TB6"
/tibero_engine/tibero6/config/TB6.tip generated
/tibero_engine/tibero6/config/psm_commands generated
/tibero_engine/tibero6/client/config/tbdsn.tbr generated.
Running client/config/gen_esql_cfg.sh
Done.
<$TB_SID.tip 수정>
경로 : $TB_HOME/config/$TB_SID.tip
- generate tip을 통해 default 값으로 생성된 내용을 사용해도 되지만 난 수정할 거임
[tibero6@tiberovm:/tibero_engine/tibero6/config]$ ls -al
total 56
drwxr-xr-x. 2 tibero6 dba 205 Jan 25 17:17 .
drwxr-xr-x. 9 tibero6 dba 97 Jan 25 16:50 ..
-rw-r--r--. 1 tibero6 dba 474 Nov 4 2020 cm.template
-rwxr-xr-x. 1 tibero6 dba 4433 Nov 4 2020 gen_psm_cmd.sh
-rwxr-xr-x. 1 tibero6 dba 8476 Nov 4 2020 gen_tip_for_tac.sh
-rwxr-xr-x. 1 tibero6 dba 4886 Nov 4 2020 gen_tip.sh
-rw-r--r--. 1 tibero6 dba 1672 Nov 4 2020 ilog.map.example
-rwxr-xr-x. 1 tibero6 dba 1623 Jan 25 17:10 psm_commands
-rw-r--r--. 1 tibero6 dba 675 Nov 4 2020 tac.template
-rw-r--r--. 1 tibero6 dba 877 Jan 25 17:17 TB6.tip
-rw-r--r--. 1 tibero6 dba 525 Nov 4 2020 tip.template
-rw-r--r--. 1 tibero6 dba 4 Nov 4 2020 variant
[tibero6@tiberovm:/tibero_engine/tibero6/config]$ vi TB6.tip
# tip file generated from /tibero_engine/tibero6/config/tip.template (Wed Jan 25 17:10:28 KST 2023)
#-------------------------------------------------------------------------------
#
# RDBMS initialization parameter
#
#-------------------------------------------------------------------------------
DB_NAME=TB6
LISTENER_PORT=8629
#Controlfile Duplication
CONTROL_FILES="/tibero_engine/tbdata/c1.ctl","/tibero_engine/tbdata/backup/c2.ctl"
#DataFileDest
DB_CREATE_FILE_DEST="/tibero_engine/tbdata"
#LogArchiveDest
LOG_ARCHIVE_DEST="/tibero_engine/tbdata/arch"
#CERTIFICATE_FILE="/tibero_engine/tibero6/config/tb_wallet/TB6.crt"
#PRIVKEY_FILE="/tibero_engine/tibero6/config/tb_wallet/TB6.key"
#WALLET_FILE="/tibero_engine/tibero6/config/tb_wallet/WALLET"
#ILOG_MAP="/tibero_engine/tibero6/config/ilog.map"
MAX_SESSION_COUNT=20
TOTAL_SHM_SIZE=2G
MEMORY_TARGET=4G
<Database 생성>
CREATE DATABASE
USER sys IDENTIFIED BY tibero
MAXDATAFILES 256
CHARACTER SET UTF8
NATIONAL CHARACTER SET UTF16
LOGFILE
GROUP 0 'log01.log' SIZE 50M,
GROUP 1 'log11.log' SIZE 50M,
GROUP 2 'log21.log' SIZE 50M
MAXLOGFILES 100
MAXLOGMEMBERS 2
NOARCHIVELOG
DATAFILE 'system01.dtf' SIZE 100M
AUTOEXTEND ON NEXT 64M MAXSIZE 3G
DEFAULT TEMPORARY TABLESPACE TEMP
TEMPFILE 'temp01.dtf' SIZE 100M
AUTOEXTEND ON NEXT 64M MAXSIZE 3G
EXTENT MANAGEMENT LOCAL AUTOALLOCATE
UNDO TABLESPACE UNDO
DATAFILE 'undo01.dtf' SIZE 200M
AUTOEXTEND ON NEXT 64M MAXSIZE 3G
EXTENT MANAGEMENT LOCAL UNIFORM SIZE 128k
DEFAULT TABLESPACE USR
DATAFILE 'usr01.dtf' SIZE 50m
AUTOEXTEND ON NEXT 64m MAXSIZE 3G
SYSSUB
DATAFILE 'syssub01.dtf' SIZE 50m
AUTOEXTEND ON NEXT 64M MAXSIZE 3G ;
<Datafile 생성 확인>
[tibero6@tiberovm:/tibero_engine/tbdata]$ ls -al
total 687884
drwxr-xr-x. 5 tibero6 dba 217 Jan 25 17:29 .
drwxr-xr-x. 4 tibero6 dba 100 Jan 25 16:50 ..
drwxr-xr-x. 2 tibero6 dba 6 Jan 25 16:20 arch
drwxr-xr-x. 2 tibero6 dba 20 Jan 25 17:28 backup
-rw-------. 1 tibero6 dba 22822912 Jan 25 17:29 c1.ctl
drwx------. 2 tibero6 dba 6 Jan 17 00:32 java
-rw-------. 1 tibero6 dba 52428800 Jan 25 17:29 log01.log
-rw-------. 1 tibero6 dba 52428800 Jan 25 17:29 log11.log
-rw-------. 1 tibero6 dba 52428800 Jan 25 17:29 log21.log
-r--------. 1 tibero6 dba 24 Jan 25 17:29 .passwd
-rw-------. 1 tibero6 dba 52428800 Jan 25 17:29 syssub01.dtf
-rw-------. 1 tibero6 dba 104857600 Jan 25 17:29 system01.dtf
-rw-------. 1 tibero6 dba 104857600 Jan 25 17:29 temp01.dtf
-rw-------. 1 tibero6 dba 209715200 Jan 25 17:29 undo01.dtf
-rw-------. 1 tibero6 dba 52428800 Jan 25 17:29 usr01.dtf
<control file 이중화>
[tibero6@tiberovm:/tibero_engine]$ cd $TB_HOME/tbdata/
[tibero6@tiberovm:/tibero_engine/tbdata]$ ll
total 687880
drwxr-xr-x. 2 tibero6 dba 6 Jan 25 16:20 arch
drwxr-xr-x. 2 tibero6 dba 20 Jan 25 17:28 backup
-rw-------. 1 tibero6 dba 22822912 Jan 25 17:29 c1.ctl
drwx------. 2 tibero6 dba 6 Jan 17 00:32 java
-rw-------. 1 tibero6 dba 52428800 Jan 25 17:29 log01.log
-rw-------. 1 tibero6 dba 52428800 Jan 25 17:29 log11.log
-rw-------. 1 tibero6 dba 52428800 Jan 25 17:29 log21.log
-rw-------. 1 tibero6 dba 52428800 Jan 25 17:29 syssub01.dtf
-rw-------. 1 tibero6 dba 104857600 Jan 25 17:29 system01.dtf
-rw-------. 1 tibero6 dba 104857600 Jan 25 17:29 temp01.dtf
-rw-------. 1 tibero6 dba 209715200 Jan 25 17:29 undo01.dtf
-rw-------. 1 tibero6 dba 52428800 Jan 25 17:29 usr01.dtf
[tibero6@tiberovm:/tibero_engine/tbdata]$ cp c1.ctl backup/c2.ctl
<Tibero 기동>
[tibero6@tiberovm:/tibero_engine/tbdata]$ tbboot
Warning: The initialization parameter 'MEMORY_TARGET' value is greater than the physical system memory size. MEMORY_TARGET: 4294967296 Physical System Memory Size: 4142354432Excessive memory consumption may cause the system to slow down or malfunction. It is recommended to set the MEMORY_TARGET to a value less than the physical system memory size.
Change core dump dir to /tibero_engine/tibero6/bin/prof.
Listener port = 8629
Tibero 6
TmaxData Corporation Copyright (c) 2008-. All rights reserved.
Tibero instance started up (NORMAL mode).
<패키지 생성>
> SQL 파일을 수행하면 role, System user, view, package 등이 생성
경로 : $TB_HOME/scripts
파일명 : system.sh
[tibero6@tiberovm:/tibero_engine/tibero6/scripts]$ sh system.sh
[tibero6@tiberovm:/tibero_engine/tibero6/scripts]$ sh system.sh
Enter SYS password:
tibero
Enter SYSCAT password:
syscat
Dropping agent table...
Creating text packages table ...
Creating the role DBA...
Create default system users & roles?(Y/N):
Y
...
Create system tables related to profile?(Y/N):
Y
...
Create TPR tables?(Y/N):
Y
...
Register dbms_stats job to Job Scheduler?(Y/N):
Y
...
Done.
For details, check /tibero_engine/tibero6/instance/TB6/log/system_init.log.
- 에러 있는지 확인 없으면 넘어감
<Tibero 프로세스 조회>
[tibero6@tiberovm:/tibero_engine/tibero6/scripts]$ ps -ef | grep tbsvr
tibero6 9875 1 0 17:35 pts/1 00:00:01 tbsvr -t NORMAL -SVR_SID TB6
tibero6 9877 9875 0 17:35 pts/1 00:00:00 tbsvr_MGWP -t NORMAL -SVR_SID TB6
tibero6 9878 9875 6 17:35 pts/1 00:00:31 tbsvr_FGWP000 -t NORMAL -SVR_SID TB6
tibero6 9879 9875 0 17:35 pts/1 00:00:00 tbsvr_FGWP001 -t NORMAL -SVR_SID TB6
tibero6 9880 9875 0 17:35 pts/1 00:00:00 tbsvr_PEWP000 -t NORMAL -SVR_SID TB6
tibero6 9881 9875 0 17:35 pts/1 00:00:00 tbsvr_PEWP001 -t NORMAL -SVR_SID TB6
tibero6 9882 9875 0 17:35 pts/1 00:00:00 tbsvr_PEWP002 -t NORMAL -SVR_SID TB6
tibero6 9883 9875 0 17:35 pts/1 00:00:00 tbsvr_PEWP003 -t NORMAL -SVR_SID TB6
tibero6 9884 9875 0 17:35 pts/1 00:00:01 tbsvr_AGNT -t NORMAL -SVR_SID TB6
tibero6 9885 9875 4 17:35 pts/1 00:00:22 tbsvr_DBWR -t NORMAL -SVR_SID TB6
tibero6 9886 9875 0 17:35 pts/1 00:00:00 tbsvr_RCWP -t NORMAL -SVR_SID TB6
tibero6 11364 8419 0 17:43 pts/1 00:00:00 grep --color=auto tbsvr
제3장 데이터베이스 설치
만약, 해당 과정에서 [No]를 클릭하거나, 사용자가 별도로 실행하고자 하는 경우에는 Windows 커맨드 창을 "관리자 권한"으로 실행한 후 Wizard만 실행하여 데이터베이스 설치를 진행할 수 있다. %TB_HO
technet.tmaxsoft.com
'DB > Tibero' 카테고리의 다른 글
[Migration] Oracle Gateway를 활용한 Oracle to Tibero DB Link (0) | 2023.03.29 |
---|---|
[ETC] 부팅시 티베로 자동 기동 시키기 (0) | 2023.02.13 |