[AS3.0] AS3.0 + 9.2.0.4.0 install

출처 : http://blog.empas.com/myungho/3605549

Oracle 설치문서중에 이렇게 잘된 문서가 없는것 같군요…

1. Install 을하기전에확인사항.

가. 사전확인사항.
· Network setup 확인.
· ORACLE S/W 가설치될 DISK SPACE à 5G 이상필요
· GCC compiler가있는지확인.

나. 사용자정의사항.
· ORACLE S/W 가설치될 DISK 위치. -> /home/oracle
· ORACLE database가설치될 DISK 위치. -> /data/oradata
· ORACLE SID 정의. -> ORCL
· Character set. -> American_America.KO16KSC5601

다. 설치전반드시 check.
· oracle user의 UID, GID 확인.
· OWNER à oracle, GROUP à dba확인.

Oracle Media 확인. 반드시 9.2.0.4.0

미리다운로드받아야함.
p3006854_9204_LINUX.zip
p3238244_9204_LINUX.zip

2. 기본환경설정 (Pre-Installation)
Step 0.
# vi /etc/sysctl.conf에서

kernel.sysrq = 0 밑에 kernel.shmmax=1073741824 을추가
kernel.sysrq = 0
kernel.shmmax = 1073741824

·변경후시스템 reboot
# reboot

Step 1. Group ID 등록
1. vi /etc/group 에서등록되지않은 id 확인
2. # groupadd –g 501 dba

Step 2. Oracle User 등록
1. vi /etc/passwd 에서등록되지않은 id 확인
2. # useradd -g dba –u 501 –d /home/oracle –s /bin/bash oracle
# passwd oracle
$ vi .bash_profile
export ORACLE_BASE=/home/oracle
export ORACLE_HOME=/home/oracle
export ORACLE_SID=ORCL
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
export TNS_ADMIN=$ORACLE_HOME/network/admin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib:/usr/lib:/usr/local/lib
export NLS_LANG=American_America.KO16KSC5601
export DISPLAY=127.0.0.1:0.0
export PATH=$PATH:/usr/ccs/bin:/usr/sbin:/sbin:/usr/bin:/bin:/usr/X11R6/bin:$ORACLE_HOME/bin
export EDITOR=vi
export LD_ASSUME_KERNEL=2.4.1

Step 3. Oracle Home Directory 생성
# cd /home/oracle

Step 4. Owner 지정
· oracle home directory를 owner를 oracle, group dba로변경
# chown -R oracle:dba /home/oracle à oracle directory
# ls -l à owner, mode 변경확인.

Step 5. Oracle User 의 Home Directory 확인
# su – oracle
$ pwd
/home/oracle à OK
· ORACLE_HOME Path 가제대로잡히지않을경우는 /etc/passwd 의 path 부분이잘못됨.

Step 6. Development Packages(RPMs) 확인
# rpm -q gcc cpp compat-libstdc++ glibc-devel glibc-headers glibc-kernheaders binutils

만약이러한 rpm 패키지들이설치되어있지않다면에러가발생한다
개발툴을전부설치했다하더라도 “compat-libstdc++” 없는경우가있으므로확인요망.
AS CD3번째장에있음
* rpm 패키지추가방법
# su – root
rpm -ivh
compat-db-4.0.14-5.i386.rpm
compat-gcc-7.3-2.96.122.i386.rpm
compat-gcc-c++-7.3-2.96.122.i386.rpm
compat-libstdc++-7.3-2.96.122.i386.rpm
compat-libstdc++-devel-7.3-2.96.122.i386.rpm
openmotif21-2.1.30-8.i386.rpm
setarch-1.3-1.i386.rpm
tcl-8.3.5-92.i386.rpm
Step 7. Error 조치방법

1. runInstaller 실행시아래의에러가발행할경우
Error occurred during initialization of VM
Unable to load native library: /tmp/OraInstall2003-10-25_03-14-57PM/jre/lib/i386/libjava.so:
symbol __libc_wait, version GLIBC_2.0 not defined in file libc.so.6 with link time reference

메타링크에서p3006854_9204_LINUX.zip 다운로드받고다음작업진행.

su – root# unzip p3006854_9204_LINUX.zip
Archive: p3006854_9204_LINUX.zip
creating: 3006854/
inflating: 3006854/rhel3_pre_install.sh
inflating: 3006854/README.txt

# cd 3006854# sh rhel3_pre_install.sh
Applying patch…
Patch successfully applied
#

패치후 ls 실행시아래의에러가날경우

# lsls: error while loading shared libraries: /etc/libcwait.so: cannot open shared object file: No such file or directory# rm /etc/ld.so.preloadrm: error while loading shared libraries: /etc/libcwait.so: cannot open shared object file: No such file or directory
#

To fix that, run the echo command which is a built-in shell command:
# echo “” > /etc/ld.so.preloadrm /etc/ld.so.preload

쉘실행시다음의에러가발생할경우
rhel3_pre_install.sh: line 36: gcc: command not found

su – root
mv /usr/bin/gcc /usr/bin/gcc323
ln -s /usr/bin/gcc296 /usr/bin/gcc
mv /usr/bin/g++ /usr/bin/g++323 # if g++ doesn’t exist, then gcc-c++ was not installed
ln -s /usr/bin/g++296 /usr/bin/g++

2. Agent 시작시다음의에러가발생할경우

$ su – oracle$ agentctl start

DBSNMP for Linux: Version 9.2.0.4.0 – Production on 07-JAN-2004 19:11:14

Copyright (c) 2003 Oracle Corporation. All rights reserved.

Starting Oracle Intelligent Agent…/opt/oracle/product/9.2.0/bin/dbsnmpwd: line 156: 1855 Segmentation fault nohup $ORACLE_HOME/bin/dbsnmp $*
>>$DBSNMP_WDLOGFILE 2>&1
/opt/oracle/product/9.2.0/bin/dbsnmpwd: line 156: 1868 Segmentation fault nohup $ORACLE_HOME/bin/dbsnmp $* >>$DBSNMP_WDLOGFILE 2>&1
/opt/oracle/product/9.2.0/bin/dbsnmpwd: line 156: 1880 Segmentation fault nohup $ORACLE_HOME/bin/dbsnmp $* >>$DBSNMP_WDLOGFILE 2>&1
/opt/oracle/product/9.2.0/bin/dbsnmpwd: line 156: 1892 Segmentation fault nohup $ORACLE_HOME/bin/dbsnmp $* >>$DBSNMP_WDLOGFILE 2>&1

메타링크에서p3238244_9204_LINUX.zip 다운로드받고다음작업진행.
반드시 Instance 종료후작업진행

$ su – oracle$ which opatch
/tmp/OPatch/opatch
$

To apply now the patch, run:
$ su – oracle$ unzip p3238244_9204_LINUX.zip$ cd 3238244$ export PATH=$PATH:/sbin # the patch needs “fuser” which is located in /sbin$ opatch apply

Now you need to relink dbsnmp. This is the binary that crashed when running agentctl start. To find which makefile handles the linking of dbsnmp, you can run:
$ su – oracle$ find $ORACLE_HOME -name “*.mk” | xargs grep -l dbsnmp
/opt/oracle/product/9.2.0/network/lib/ins_oemagent.mk
/opt/oracle/product/9.2.0/network/lib/env_oemagent.mk
$

I relinked dbsnmp and all associated executables which are maintained by the ins_oemagent.mk makefile:
$ su – oracle$ cd $ORACLE_HOME/network/lib$ make -f ins_oemagent.mk install

Now you should be able to start the agent:
$ su – oracle$ agentctl start
3. 설치(Installation)

Step 1. Mount CD-ROM & Installer 실행
*** X—Window 환경에서콘솔창으로작업
# mount /mnt/cdrom

# xhost +

# su – oracle

$ /mnt/cdrom/runInstaller

Step 2. Installer 화면
· welcome 화면나타남à next click
· Inventory Location : /home/oracle/oraInventory (default)
· 사용가능한제품 – oracle9i database 9.2.0.1.0 선택
제품언어 – English, Korean
· group name 입력화면창나타남. à dba
· root 계정에서 /tmp/orainstRoot.sh 실행시키라는 message 나온다.
창을하나더띄워서 orainstRoot.sh 실행.
# /tmp/orainstRoot.sh
· 이후는화면지시대로하면된다.
· root 계정에서 root.sh 실행시키라는 message 나온다.
창을하나더띄워서 root.sh 실행.
# /usr/oracle/product/9.2.0.1.0/root.sh -> message에나온해당경로의 root.sh 실행

Step 3. S/W install 후 DB create
#mkdir /data/oradata
#chown –R oracle:dba /data/oradata

$ cd à ORACLE_HOME 으로이동.
$ cd bin
$./dbca
· SID 입력 -> ORCL
·초기화매개변수 – 메모리 – 사용자정의
– shared pool : 200M
– 버퍼캐시 : 200M
–> 실제메모리의 10%값으로설정한다
·초기화매개변수 – 문자집합
– 사용자정의 : KO16KSC5601
– 국가별코드 : AL16UTF16
·초기화매개변수 – DB크기조정
– 블록크기 : 8K
– 정렬영역크기 : 1048576 바이트
·파일위치지정 : controlfile,datafile,redolog file의경로 -> /data/oradata/
·데이터베이스저장영역 – 테이블스페이스 – TEMP 크기 : 500M으로조정
·데이터베이스저장영역 – 테이블스페이스 – UNDOTBS1 크기 : 500M으로조정
·데이터베이스생성
4. 설치후작업(Post-Installation)
Step 1. Process Check
$sqlplus “/ as sysdba”
SQL> shutdown immediate -> db가정상적으로종료되는지확인
Database Close
Database Dismount
Instance Shutdown
SQL> startup -> db가정상적으로시작되는지확인
ORACLE instance started.

Total System Global Area 101784276 bytes
Fixed Size 453332 bytes
Variable Size 75497472 bytes
Database Buffers 25165824 bytes
Redo Buffers 667648 bytes
Database mounted.
Database opened.
SQL>exit

$ lsnrctl -> 리스너가정상적으로동작하는지확인
LSNRCTL> status -> 상태확인
LSNRCTL> stop -> 종료
LSNRCTL> start -> 시작
Step 2. sqlplus test & scott user 생성
$ sqlplus “/ as sysdba”
SQL> create user scott identified by tiger;
default tablespace users
temporary tablespace temp;
SQL> grant connect, resource to scott;
SQL> connect scott/tiger;
SQL> @?/sqlplus/demo/demobld;
$ sqlplus scott/tiger@ORCLà listener 가정상적으로 start 되어있는지 test와 client 에서접속할수있는지 test.
SQL> select * from tab;
SQL> exit