** 큐브리드 다운로드
http://www.cubrid.com/downloads
** 큐브리드 JDBC 다운로드
https://www.cubrid.org/downloads/os-select/64-bit/drivers/jdbc
driverClassName="cubrid.jdbc.driver.CUBRIDDriver"
URL="jdbc:CUBRID:192.168.0.xxx:33000:dbname:public::?charSet=utf-8"
** 매뉴얼
한글 : https://www.cubrid.org/manual/ko/9.3.0/
최신버전(영문) : https://www.cubrid.org/manual/en/10.0
** 큐브리드 설치
# yum install glibc ncurses libgcrypt libstdc++
# useradd -g dba -G dba cubrid
# su - cubrid
$ sh CUBRID-10.1-latest-Linux.x86_64.sh
라이선스 및 모든 내용에 대해 Y 입력
** 서비스 실행환경 구성
$ vi .bashrc
. .cubrid.sh
$ . .bashrc
** 서비스 실행
$ cubrid service start
@ cubrid master start
++ cubrid master start: success
@ cubrid broker start
++ cubrid broker start: success
@ cubrid manager server start
++ cubrid manager server start: success
** 서비스 종료
$ cubrid service stop
@ cubrid broker stop
++ cubrid broker stop: success
@ cubrid manager server stop
++ cubrid manager server stop: success
@ cubrid master stop
++ cubrid master stop: success
** 서비스 상태 확인
$ cubrid service status
@ cubrid master status
++ cubrid master is running.
@ cubrid server status
@ cubrid broker status
NAME PID PORT AS JQ TPS QPS SELECT INSERT UPDATE DELETE OTHERS LONG-T LONG-Q ERR-Q UNIQUE-ERR-Q #CONNECT #REJECT
==============================================================================================================================================================
* query_editor 15397 30000 5 0 0 0 0 0 0 0 0 0/60.0 0/60.0 0 0 0 0
* broker1 15408 33000 5 0 0 0 0 0 0 0 0 0/60.0 0/60.0 0 0 0 0
@ cubrid manager server status
++ cubrid manager server is running.
** 데이터베이스 생성
$ cubrid createdb --db-volume-size=250M dbname ko_KR.utf8
Creating database with 256.0M size using locale ko_KR.utf8. The total amount of disk space needed is 1.2G.
CUBRID 10.1
** 생성한 데이터베이스 서비스 시작
$ cubrid server start dbname
@ cubrid server start: dbname
This may take a long time depending on the amount of recovery works to do.
CUBRID 10.1
++ cubrid server start: success
** 생성한 데이터베이스 서비스 종료
$ cubrid server stop dbname
@ cubrid server stop: dbname
Server dbname notified of shutdown.
This may take several minutes. Please wait.
++ cubrid server stop: success
** 생성한 데이터베이스 서비스 자동시작 처리
$ vi $CUBRID/conf/cubrid.conf
[service]
service=server,broker,manager
server=dbname
** 커맨드라인 접속
$ csql dbname
CUBRID SQL Interpreter
Type `;help' for help messages.
csql> ;exit
** 계정 생성(DBA 권한으로 접속)
$ csql --CS-mode dbname --user=dba
csql> CREATE USER username PASSWORD 'userpasswd';
csql> ;exit
** 생성한 User로 접속 확인 및 테이블 생성
$ csql -u username -p userpasswd dbname
csql> CREATE TABLE test(t1 VARCHAR(10));
Execute OK. (0.013104 sec) Committed.
1 command(s) successfully processed.
** SQL 스크리트 파일 적용
csql> ;read cubrid_script.sql
csql> ;run
** 테이블 목록 확인
csql> show tables;
** 컬럼 목록 확인
csql> SELECT class_name as "table_name", attr_name as "column_name", prec "column_size", data_type, is_nullable as "nullable", default_value FROM DB_ATTRIBUTE WHERE class_name = 'table_name';