Installing Oracle Database 11g Release 2 on Linux x86 oracle

Oracle Enterprise Linux 4 update 6 install
- linux CD download : http://edelivery.oracle.com/linux
- 설치 환경 : 1024RAM , 20G HDD, 32bit vmware
1. Enterprise-R4-U6-i386-disc1.iso CD를 삽입하고 CD로 부팅합니다.
2. boot: 프롬프트에서 Enter키를 입력하여 설치를 진행합니다.
3. CD 검사를 선택적으로 실시합니다.
4. 설치언어를 선택합니다. (한글을 좋아하여 한국어를 선택했습니다.)
5. 키보드 설정은 기본값을 사용합니다.
6. Disk 파티션은 수동으로 설정하여 2048 Swap로 정하고 나머지는 "/"로 지정합니다.
7. 고정아이피를 설정합니다.(192.168.72.150)
8. 방화벽은 설정하지 않습니다.
9. 시간대를 설정합니다.(설치 언어를 한글로 했다면 대한민국으로 선택되어 있습니다.)
10. 추가 언어 설치(한국어가 선택되어 있습니다.)
11. 소프트웨어 선택
 - 그래픽 인터넷을 선택하고 firefox를 제외하고 선택해제합니다.
 - 서버는 아무것도 선택하지 않습니다.
 - 개발 도구를 선택합니다.
 - 관리자 도구를 선택합니다.
 - 시스템 도구를 선택하고 추가로 sysstat을 선택합니다.
12. 설치를 시작합니다.
13. 사용 계약서 동의 합니다.
14. 날짜와 시간을 확인합니다.
15. 시스템사용자를 생성하지 않습니다.
16. 추가CD 설치는 하지 않습니다.

Oracle 사용자와 Group 생성
# groupadd oinstall
# groupadd dba
# useradd -m -g oinstall -G dba oracle
# passwd oracle

필요한 소프트웨어 설치 확인

binutils-2.15.92.0.2
compat-libstdc++-33.2.3
elfutils-libelf-0.97
elfutils-libelf-devel-0.97
gcc-3.4.6
gcc-c++-3.4.6
glibc-2.3.4-2.41
glibc-common-2.3.4
glibc-devel-2.3.4
glibc-headers-2.3.4
libaio-devel-0.3.105
libaio-0.3.105
libgcc-3.4.6
libstdc++-3.4.6
libstdc++-devel-3.4.6
make-3.80
pdksh-5.2.14
sysstat-5.0.5
unixODBC-2.2.11
unixODBC-devel-2.2.11

디렉토리 생성
# mkdir -p /u01/app/oracle /u01/app/oraInventory
# chown oracle:oinstall /u01/app/ora*

커널 파라미터 수정
# vi /etc/sysctl.conf
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048586

# sysctl -p (설정적용)

Oracle 계정 Shell Limits 설정
# vi /etc/security/limits.conf
oracle              soft    nproc   2047
oracle              hard    nproc   16384
oracle              soft    nofile  1024
oracle              hard    nofile  65536

# vi /etc/pam.d/login
session    required     pam_limits.so

Oracle 설치준비
오라클 공식 홈페이지에서 11g stage 파일을 다운 받습니다.
oracle 계정 환경 변수를 설정합니다.(기존 PATH 설정은 삭제)
$ vi .bash_profile
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
export ORACLE_SID=orcl
export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin

다운 받은 stage를 압축 해제합니다.
# unzip linux_11gR2_database_1of2.zip && unzip linux_11gR2_database_2of2.zip

Oracle 소프트웨어 설치(OUI)
$ cd database
$ ./runInstaller &

스크린샷-제목 없는 창.png설치중 오류를 확인하기 위해 소프트웨어만 먼저 설치합니다.
스크린샷-제목 없는 창-1.png이번 설치 연습은 RAC 환경이 아닙니다.
스크린샷-제목 없는 창-2.png한글을 좋아합니다.
스크린샷-제목 없는 창-3.png연습목적상 모든 옵션을 선택합니다.
스크린샷-제목 없는 창-4.png설치되는 위치를 확인합니다.
스크린샷-제목 없는 창-5.png인벤토리 워치를 확인합니다.
스크린샷-제목 없는 창-6.pngDB 관리자를 설정합니다.
스크린샷-제목 없는 창-7.pngOUI가 친절하게 조건을 검사해줍니다.
스크린샷-제목 없는 창-8.png저는 물리적메모리와 Swap(교체)크기가 불충분하다고 나왔으며, glibc 패키지가 설치되지 않았다고 합니다.
패키지는 설치되어있으나 버전이 맞지 않아 저렇게 나오는군요.
모두 무시하고 설치를 진행했습니다.
스크린샷-제목 없는 창-9.png설치가 진행됩니다.
스크린샷-제목 없는 창-10.png
설치가 완료되고 루트 권한으로 두 스크립트를 실행해야 합니다.
/u01/app/oraInventory/orainstRoot.sh
/u01/app/oraInventory/orainstRoot.sh

# /u01/app/oraInventory/orainstRoot.sh
다음 권한 변경 중/u01/app/oraInventory.
그룹에 대한 읽기, 쓰기 권한을 추가하는 중입니다.
월드에 대한 읽기, 쓰기, 실행 권한을 제거하는 중입니다.

그룹 이름 변경 중 /u01/app/oraInventory 대상 oinstall.
스크립트 실행이 완료되었습니다.
# /u01/app/oracle/
checkpoints/ product/    
# /u01/app/oracle/product/11.2.0/dbhome_1/root.sh
Running Oracle 11g root.sh script...

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u01/app/oracle/product/11.2.0/dbhome_1

Enter the full pathname of the local bin directory: [/usr/local/bin]:
   Copying dbhome to /usr/local/bin ...
   Copying oraenv to /usr/local/bin ...
   Copying coraenv to /usr/local/bin ...


Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
Finished product-specific root actions.

데이터베이스 설치
리스너가 실행되어 있어야 합니다. 특별한 설정이 없어서 설치되면서 동적으로 등록됩니다.
$ lsnrctl start

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 30-DEC-2009 20:32:33

Copyright (c) 1991, 2009, Oracle.  All rights reserved.

Starting /u01/app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Log messages written to /u01/app/oracle/diag/tnslsnr/dba/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dba)(PORT=1521)))

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                30-DEC-2009 20:32:52
Uptime                    0 days 0 hr. 0 min. 17 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Log File         /u01/app/oracle/diag/tnslsnr/dba/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dba)(PORT=1521)))
The listener supports no services
The command completed successfully

dbca 도구를 통하여 DB 생성 절차를 진행합니다.
$ dbca &
스크린샷-제목 없는 창-11.png
스크린샷-제목 없는 창-12.png기존 템플릿을 선택하여 정상적인 DB생성 여부를 확인할것입니다.
스크린샷-제목 없는 창-13.pngORACLE_SID에 명시한 문자열을 입력합니다.
스크린샷-제목 없는 창-14.pngEM을 구성합니다.
스크린샷-제목 없는 창-15.png파일시스템을 사용합니다.
스크린샷-제목 없는 창-16.pngFRA를 사용합니다.
스크린샷-제목 없는 창-17.pngSAMPLE 스키마를 생성합니다.
스크린샷-제목 없는 창-18.png메모리 크기를 결정합니다.
스크린샷-제목 없는 창-19.png한글을 좋아합니다.
스크린샷-제목 없는 창-20.png저장영역을 세부 설정할수 있으나 기본값을 사용니다.
스크린샷-제목 없는 창-21.pngDB생성을 시작합니다.
스크린샷-제목 없는 창-22.png스크린샷-제목 없는 창-23.png
$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on 수 12월 30 21:04:44 2009

Copyright (c) 1982, 2009, Oracle.  All rights reserved.


다음에 접속됨:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, Oracle Label Security, OLAP, Data Mining,
Oracle Database Vault and Real Application Testing options


SQL> select status from v$instance;

STATUS
------------------------------------
OPEN

SQL> select * from v$version;

BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
PL/SQL Release 11.2.0.1.0 - Production
CORE    11.2.0.1.0    Production
TNS for Linux: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production

 

em도 이미 시작되어 잘 되고 있습니다.

screenshot7.png
..........
Tag :

Leave Comments