2008. 12. 8. 13:21ㆍDatabase
1. IBM 홈페이지에서 다운받은 DB2 의 압축파일을 해제한다.
tar xvfz DB2_V82_ESE_LNX_AMD64_NLV.tar.gz
2. ese 디렉토리에 모든 파일이 풀리게 된다.
/exp/db2/linux/install/db2_install 을 직접 실행한다.
설치 끝. ㅡㅡ;
설치 후 할일(root 권한으로 작업)
su - root <=su root 가 아니다.
그룹 생성 (instance owner, fenced user, DAS user)
groupadd db2iadm
groupadd db2fadm
groupadd db2asgrp
사용자 생성 및 비밀번호 설정 (instance owner, fenced user, DAS user)
useradd -g db2iadm db2iusr
useradd -g db2fadm db2fusr
useradd -g db2asgrp dasusr
인스턴스 생성
/opt/IBM/db2/V8.1/instance/db2icrt -a SERVER -u db2fusr db2iusr
라이센스키 등록(Trial Version 을 사용했으므로 생략)
db2iusr 사용자로 로그인 후 다음작업 수행
su - db2iusr
echo ". sqllib/db2profile" >> .bash_profile
. sqllib/db2profile
캐릭터셋 설정(한글은 970)
db2set db2codepage=819
db2 terminate
데이타베이스 매니저 시작
db2 start database manager
test 데이터베이스 생성
db2 create database testdb
test 데이터베이스 연결
db2 connect to testdb
test 데이터베이스 설정 확인
db2 get db cfg
통신방식 설정
db2set DB2COMM=tcpip
프로그램 구성파일 갱신
db2 update database manager configuration using svcename DB2_testdb
root 권한으로 다음 실행
echo "DB2_testdb 3700/tcp" >> /etc/services
아래 방식으로 포트번호를 지정해 주어야 한다.
update dbm cfg using SVCENAME <port number>
instance owner 권한으로 돌아 온 후 다음을 실행
db2stop
db2start
다음 명령어로 제대로 설정이 끝났는지 확인
db2 get database manager configuration
강제 종료하기
db2stop force
프로세스가 살아있을때 해결법.
Also
1.use 'db2stop force' command after forcing all the applications. [By this time all db2 processes should have been cleared]. If not,
2. Use ipclean and then ipcs to identify the segments and queues. Then finally use ipcrm to remove segments and queues.
Even thenif you find the db2-processes, then use kill -9 or kill -6 command.
참고문서: http://www-306.ibm.com/software/data/db2/udb/support/manualsv8.html