Notice»

Recent Post»

Recent Comment»

Recent Trackback»

Archive»

« 2024/4 »
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30

Redhat Linux9 + Oracle 9i(9.2.0.4)

Linux | 2009. 1. 17. 16:08 | Posted by fantajun

출처 : http://vader.co.kr/bbs/view.php?id=Linux&page=1&sn1=&divpage=1&sn=off&ss=on&sc=on&select_arrange=headnum&desc=asc&no=18

 


설치환경
Pentium 4 CPU 2.6GHz
RAM 2GB
Microsoft Windows XP Professional Version 2002 Service Pack2

VMware Workstation 4.5.2 build-8848
Redhat Linux 9 (2.4.20) HDD 20GB, RAM 1740MB



계정 생성
[root@localhost root]# groupadd dba
[root@localhost root]# groupadd oinstall
[root@localhost root]# useradd -g oinstall -G dba oracle
[root@localhost root]# passwd oracle




디렉토리 생성
[root@localhost root]# mkdir -p /opt/ora9/product/9.2
[root@localhost root]# mkdir /var/opt/oracle
[root@localhost root]# chown oracle.dba /var/opt/oracle
[root@localhost root]# chown -R oracle.dba /opt/ora9




필수 RPM 파일 확인 및 설치
gcc-3.2.2-5
cpp-3.2.2-5
glibc-devel-2.3.2-11.9
binutils-2.13.90.0.18-9
compat-gcc-7.3-2.96.118.i386.rpm
compat-libgcj-7.3-2.96.118.i386.rpm
compat-libgcj-devel-7.3-2.96.118.i386.rpm
nss_db-compat-2.2-20.i386.rpm

설치되어 있지 않다면 http://rpmfind.net/ 에서 해당 rpm을 다운 받아 설치한다.
rpm -Uvh (package_name)




Maximum Share Memory Size의 증가
/etc/sysctl.conf 를 vi로 열고 다음을 추가한다.

kernel.shmmax = 1073741824
kernel.shmmni = 4096
kernel.shmall = 2097152
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000


/etc/security/limits.conf 에는 다음을 추가한다.

oracle soft nofile 65536
oracle hard nofile 65536
oracle soft nproc 16384
oracle hard nproc 16384


저장하고 재부팅.




.bashrc 수정
oracle 계정의 .bashrc에 다음을 추가한다.(oracle 계정으로 작업)

#oracle 9i
export ORACLE_BASE=/opt/ora9
export ORACLE_HOME=/opt/ora9/product/9.2
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/Apache/Apache/bin:$PATH
export ORACLE_OWNER=oracle
export ORACLE_SID=ora9
export ORACLE_TERM=vt100
export LD_ASSUME_KERNEL=2.4.1
export THREADS_FLAG=native
export LD_LIBRARY_PATH=/opt/ora9/product/9.2/lib:$LD_LIBRARY_PATH
export PATH=/opt/ora9/product/9.2/bin:$PATH
export NLS_LANG=AMERICAN_AMERICA.KO16KSC5601;





Oracle 설치 파일 다운로드
다운로드 : http://www.oracle.com/technology/software/products/oracle9i/htdocs/linuxsoft.html

다운 받은 파일의 압축을 풀어준다.
[oracle@localhost oracle]$ zcat ship_9204_linux_disk1.cpio.gz  | cpio -idmv
[oracle@localhost oracle]$ zcat ship_9204_linux_disk2.cpio.gz  | cpio -idmv
[oracle@localhost oracle]$ zcat ship_9204_linux_disk3.cpio.gz  | cpio -idmv




Oracle 설치
※ 만약 Redhat Linux9의 기본 언어가 한글로 설정되어 있다면 아래와 같이 한글이 깨진다. 이럴 경우 ./runInstaller를 실행하기 전에 한글을 패치한다.



Oracle 한글 패치
/home/oracle/Disk1/stage/Components/oracle.swd.jre/1.3.1.0.0/1/DataFiles/Expanded/jre/linux/lib/fonts 에 다음 파일을 업로드 한다.(클릭하면 다운 받을 수 있음)

batang.ttc
gulim.ttc
mingliu.ttc
fonts.dir


/home/oracle/Disk1/stage/Components/oracle.swd.jre/1.3.1.0.0/1/DataFiles/Expanded/jre/linux/lib 에 다음 파일을 업로드 한다.(클릭하면 다운 받을 수 있음)

font.properties.ko

[oracle@localhost oracle]$ chmod 755 -R /home/oracle/Disk1/stage/Components/oracle.swd.jre/1.3.1.0.0/1/DataFiles/Expanded/jre/linux/lib

[oracle@localhost oracle]$ chmod 755 -R /home/oracle/Disk1/stage/Components/oracle.swd.jre/1.3.1.0.0/1/DataFiles/Expanded/jre/linux/lib/fonts


oracle 계정으로 X window 에서 설치한다. 터미널 창을 열고 다음과 같이 실행.

[oracle@localhost oracle]$ cd Disk1
[oracle@localhost Disk1]$ ./runInstaller


『다음』을 클릭



인벤토리 위치를 지정하고(수정할 필요 없음) 『확인』을 클릭한다.



dba를 입력하고>『다음』을 클릭



위와 같은 창이 뜨게되면
터미널 창을 열고 루트 권한으로 다음과 같이 실행하고 『계속』을 클릭.

[root@localhost root]# /tmp/orainstRoot.sh
Oracle 인벤토리 포인터 파일 생성 중 (/etc/oraInst.loc)
그룹 이름 변경 중 /opt/ora9/oraInventory 대상 dba.



『다음』을 클릭.









데이터베이스는 생성하지않고 프로그램만 설치한다.







위와 같은 창이 뜨면 터미널에서 루트 권한으로 /opt/ora9/product/9.2/root.sh 를 실행하고 『확인』을 클릭한다.






Database 생성
[oracle@localhost oracle]$ cd $ORACLE_HOME/bin
[oracle@localhost bin]$ ./dbca






『New Database』선택


















『데이터 딕셔너리 뷰 생성』단계에서 『ORA-29807 : specified operator does not exist』오류가 발생함.
이것은 알려진 문제로(Bug: 2686156) 무시해도 됨. 『무시』를 클릭하고 계속 진행


『Oracle Spatial 추가』 단계에서 『ORA-01430』에러가 발생하는데 이것 또한 알려진 문제로 무시해도 상관없음. 『무시』를 클릭하고 계속 진행


설치 마지막 부분에서 패스워드를 설정하고 『종료』를 클릭하면 아무런 반응이 없었음.
데이터 베이스 생성은 완료 된것 같아 X윈도우를 강제 종료하였음.(버그인 듯)



테이블 스페이스와 사용자의 생성, 권한설정
[oracle@localhost ora9]$ sqlplus /nolog
SQL*Plus: Release 9.2.0.4.0 - Production on Thu May 12 16:55:30 2005
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

SQL> connect /as sysdba
Connected.
SQL> create tablespace vader
2 datafile '/opt/ora9/oradata/ora9/vader.dbf' size 500M;

Tablespace created.

==> 500MB 의 크기로 vader라는 테이블스페이스를 생성함.

SQL> create user vader identified by passwd
2 default tablespace vader
3 temporary tablespace temp;
User created.

==> 패스워드가 "passwd"인 vader라는 사용자를 생성.

SQL> grant create session to vader with admin option;
Grant succeeded.

SQL> grant create table to vader with admin option;
Grant succeeded.

SQL> grant create view to vader;
Grant succeeded.

SQL> alter user vader quota unlimited on vader;
User altered.

==>vader 사용자에게 데이터베이스 접속, 테이블, 뷰 생성 권한을 부여한다.



Listener 설정
[oracle@localhost oracle]$ cd $ORACLE_HOME/newwork/admin
[oracle@localhost admin]$ vi listener.ora
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.32.130)(PORT = 1521))
)
)
)

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = ora9)
(ORACLE_HOME = /opt/ora9/product/9.2)
(SID_NAME = ora9)
)
)
※ 서버 IP를 입력


[oracle@localhost admin]$ vi tnsnames.ora
ORA9 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.32.130)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = ora9)
)
)
※ 서버 IP를 입력




TEST
[oracle@localhost admin]$ sqlplus /nolog
SQL*Plus: Release 9.2.0.4.0 - Production on Thu May 12 18:34:15 2005
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

SQL> connect /as sysdba
Connected to an idle instance.
SQL> startup
ORACLE instance started.

Total System Global Area 236000356 bytes
Fixed Size 451684 bytes
Variable Size 201326592 bytes
Database Buffers 33554432 bytes
Redo Buffers 667648 bytes
Database mounted.
Database opened.
SQL> exit
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production
[oracle@localhost admin]$ lsnrctl start

LSNRCTL for Linux: Version 9.2.0.4.0 - Production on 12-MAY-2005 18:35:03
Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved.

Starting /opt/ora9/product/9.2/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 9.2.0.4.0 - Production
System parameter file is /opt/ora9/product/9.2/network/admin/listener.ora
Log messages written to /opt/ora9/product/9.2/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.32.130)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 9.2.0.4.0 - Production
Start Date 12-MAY-2005 18:35:03
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security OFF
SNMP OFF
Listener Parameter File /opt/ora9/product/9.2/network/admin/listener.ora
Listener Log File /opt/ora9/product/9.2/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.32.130)(PORT=1521)))
Services Summary...
Service "ora9" has 1 instance(s).
Instance "ora9", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
[oracle@localhost admin]$ sqlplus vader/passwd@ora9

SQL*Plus: Release 9.2.0.4.0 - Production on Thu May 12 18:35:20 2005
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

Connected to:
Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production

SQL>


※참고 : http://www.puschitz.com/InstallingOracle9i.shtml
※참고 : http://linux.oreillynet.com/lpt/a/4141

출처 : Tong - redyoon님의 Unix/Linux통


: