Install ORACLE 11g on RHEL5



 

 


 Engine 생성전



- oracle 계정생성 


[root@server114 root]groupadd g 5000 dba

[root@server114 root]# useradd g dba oracle

[root@server114 root]passwd oracle




- winscp 파일전송 


 

linux_11gR2_database_1of2.zip              /home/oracle

linux_11gR2_database_2of2.zip              /home/oracle


         



 


- 메모리, 디스크권장사항 확인하기



[root@server114 ~]# grep SwapTotal /proc/meminfo

SwapTotal:     2048248 kB

[root@server114 ~]# free

                   total       used       free     shared    buffers     cached

Mem:       1035200     510560     524640          0      24468     384800      // 최소한의 메모리 1GB

-/+ buffers/cache:     101292     933908

Swap:      2048248          0    2048248                                             // swap : 메모리의 1.5배~2배

[root@server114 ~]# df -h /tmp
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda3           4.8G  2.9G  1.7G  65% /                                         // tmp  디렉토리 1 GB  이상 되야함
            




- 필수 패키지 권장사항 확인하기(아래의 패키지 중 하나라도 설치되어 있지 않다면 꼭 찾아서 설치하고 다음으로 진행.)




binutils-2.17.50.0.6

compat-libstdc++-33-3.2.3

elfutils-libelf-0.125

elfutils-libelf-devel-0.125

elfutils-libelf-devel-static-0.125

gcc-4.1.2

gcc-c++-4.1.2

glibc-2.5-24

glibc-common-2.5

glibc-devel-2.5

glibc-headers-2.5

kernel-headers-2.6.18

ksh-20060214

libaio-0.3.106

libaio-devel-0.3.106

libgcc-4.1.2

libgomp-4.1.2

libstdc++-4.1.2

libstdc++-devel-4.1.2

make-3.81

numactl-devel-0.9.8.i386

sysstat-7.0.2

unixODBC-32bit-2.2.11

unixODBC-devel-2.2.11



[root@server114 Server]# pwd

/media/RHEL_5.3 i386 DVD/Server

 

[root@server114 Server]#

[root@localhost Server]# rpm -qa | grep binutils-2.17.50.0.6

binutils-2.17.50.0.6-14.el5

[root@localhost Server]# rpm -qa | grep compat-libstdc++-33-3.2.3

compat-libstdc++-33-3.2.3-61

[root@localhost Server]# rpm -qa | grep elfutils-libelf

elfutils-libelf-devel-static-0.137-3.el5

elfutils-libelf-devel-0.137-3.el5

elfutils-libelf-0.137-3.el5

[root@localhost Server]# rpm -qa | grep gcc-4.1.2

libgcc-4.1.2-50.el5

gcc-4.1.2-50.el5

[root@localhost Server]# rpm -qa | grep gcc-c++-4.1.2

gcc-c++-4.1.2-50.el5

[root@localhost Server]# rpm -qa |grep glibc-2.5

glibc-2.5-58

[root@localhost Server]# rpm -qa | grep glibc-common

glibc-common-2.5-58

[root@localhost Server]# rpm -qa | grep glibc-devel

glibc-devel-2.5-58

[root@localhost Server]# rpm -qa | grep glibc-headers

glibc-headers-2.5-58

compat-glibc-headers-2.3.4-2.26

[root@localhost Server]# rpm -qa | grep kernel-headers-2.6.18

kernel-headers-2.6.18-238.el5

[root@localhost Server]# rpm -qa | grep ksh

ksh-20100202-1.el5_5.1

[root@localhost Server]# rpm -qa | grep libaio

libaio-0.3.106-5 

[root@localhost Server]# rpm -qa | grep libaio-devel   

[root@server114 Server]# rpm -Uvh libaio-devel-0.3.106-3.2.i386.rpm

warning: libaio-devel-0.3.106-3.2.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186

Preparing...                ########################################### [100%]

 

   1:libaio-devel           ########################################### [100%]


[root@server114 Server]# rpm -qa | grep libgcc-4.1.2

libgcc-4.1.2-44.el5

[root@server114 Server]# rpm -qa | grep libgomp

libgomp-4.3.2-7.el5

[root@server114 Server]# rpm -qa | grep libstdc++

compat-libstdc++-296-2.96-138

libstdc++-devel-4.1.2-44.el5

compat-libstdc++-33-3.2.3-61

libstdc++-4.1.2-44.el5

[root@server114 Server]# rpm -qa | grep make-3.81

make-3.81-3.el5

[root@server114 Server]# rpm -qa | grep numactl-devel

[root@server114 Server]# rpm -Uvh numactl-devel-0.9.8-7.el5.i386.rpm

warning: numactl-devel-0.9.8-7.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186

Preparing...                ########################################### [100%]

   1:numactl-devel          ########################################### [100%]

[root@server114 Server]#

[root@server114 Server]#

[root@server114 Server]# rpm -qa | grep sysstat-7.0.2

[root@server114 Server]# rpm -ivh sysstat-7.0.2-3.el5.i386.rpm

warning: sysstat-7.0.2-3.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186

Preparing...                ########################################### [100%]

   1:sysstat                ########################################### [100%]

[root@server114 Server]# rpm -qa | grep unixODBC-32bit-2.2.11

[root@server114 Server]# rpm -ivh unixODBC-*

warning: unixODBC-2.2.11-7.1.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186

Preparing...                ########################################### [100%]

   1:unixODBC               ########################################### [ 33%]

   2:unixODBC-devel         ########################################### [ 67%]

   3:unixODBC-kde           ########################################### [100%]

 

[root@server114 Server]#





- 설치에 필요한 그룹과 사용자 생성 및 수정


[root@localhost Server]# groupadd  oinstall

 

[root@localhost Server]# groupadd  oper

[root@localhost Server]# usermod -g oinstall -G dba,oper  oracle




- 설치할 사용자의 Resource Limit 값을 확인하고 수정


[root@localhost ~]# vi /etc/security/limits.conf

 

Oracle  soft  nproc  2047

Oracle  hard  nproc  16384

Oracle  soft  nofile  1024

oracle  hard  nofile  65536

 

oracle  soft  stack  10240





- 커널파라미터 설정하기


[root@localhost ~]# 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


[root@localhost ~]# sysctl –p          // 위 설정값을 적용 







- oracle 사용자의 환경설정


[root@localhost ~]# vi /home/oracle/.bash_profile

 

export EDITOR=vi

export ORACLE_BASE=/app/oracle

export ORACLE_HOME=$ORACLE_BASE/product/11g

export ORACLE_SID=testdb

export LANG=ko_KR.eucKR

export ORACLE_TERM=xterm

export NLS_LANG=AMERICAN_AMERICA.KO16MSWIN949

export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib

export PATH=$PATH:$ORACLE_HOME/bin

 

export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib


[root@server114 Server]# vi /etc/pam.d/login


session   required   pam_limits.so





- oracle 설치 파일 압축 풀기


[oracle@localhost oracle]# pwd

/home/oracle

[root@localhost oracle]# ls -l

-rw-r--r-- 1 oracle dba 1285396902 Jun  2  2010 linux_11gR2_database_1of2.zip

-rw-r--r-- 1 oracle dba  995359177 Jun  2  2010 linux_11gR2_database_2of2.zip

 

[root@localhost oracle]# unzip linux_11gR2_database_1of2.zip && unzip linux_11gR2_database_2of2.zip

 

[root@localhost oracle]# chown  -R  oracle.dba  /home/oracle

 

[root@localhost oracle]# chown  -R  oracle.dba  /app

 




-  RHEL4 로그아웃 후 오라클계정으로 로그인.

 





● Engine(11.2.0.1) 생성



-  새터미널열어서 runInstaller 실행.


[root@server114 oracle]$ cd database

[root@server114 database]./runInstaller




   OUI   




1. security updates - 체크해제 -  next 

 



2. 경고창 - yes 

 



3. install database software only




4. single instance database installation 





5. Korean 추가

 

 



6 .Enterprise Edition 을 선택한 후 select Options 클릭




7. Oracle Partitioning 제외하고 나머지 체크 해제



8. Oracle Base  Oracle Home 디렉토리 설정 (환경설정파일 설정대로 되어 있음)





9. oracle inventory 디렉터리설정

 




10.관리그룹지정 - 기본값




11. 선행체크사항 점검 -  오른쪽 상단에 ∨ ignore all 




12. 요약





13. 엔진설치 진행



 


14. 루트로 스크립트 실행 




15. 설치종료




 

- 설치 확인


[oracle@localhost ~]$ sqlplus   as  sysdba

 

SQL*Plus: Release 11.2.0.1.0 Production on Sat Apr 13 10:23:32 2013

 

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

 

Connected to an idle instance.

 

SQL> exit


 


 






● DB생성 (DBCA) :  DataBase Configuration Assistant


 

- 터미널에서 dbca 치면 database configuration assistant 시작


[oracle@server114 oracle]dbca 



     


1. DBCA 시작




2. 수행하고자 하는 작업 선택 - create a database  - next




3. DB생성할 템플리트선택 - general purpose - next




4 DB ID - testdb




5. Enterprise Manager 체크해제 




6. 계정암호 설정




7. 암호 복잡하게 하라는 경고 - yes





8. 데이터베이스 파일 저장방식 -  file system (기본값) -  file location variables 버튼눌러 정보확인




9.정보확인





10. Flash Recovery area 지정 - 기본값  




11. Sample schema 체크 (연습용 계정을 의미)




12. Memory: SGA  PGA 로 사용될 메모리 값 설정 - 기본값 - 세번째 탭(sizing) 이동




13. character set 설정 - 세번째옵션 - KO16MSWIN949 선택




14 위의 화면에서 All initialization Parameters 버튼을 누르면 현재까지 설정되어 있는 주요 파라미터들을 볼수있음





15. 요약




16. create databse




17.확인





18. DB생성시작





19. 생성완료






 

DB생성(11.2.0.1) 확인 


[oracle@server114 oracle]$ sqlplus / as sysdba


SQL*Plus: Release 11.2.0.1.0 Production on Wed Feb 25 02:09:09 2015


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


Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production

With the Partitioning option


SQL> select status from v$instance;


STATUS

----------------

OPEN


SQL>



 


  




Install ORACLE 10g on RHEL4


 

 


● Engine 생성전



- oracle 계정생성 


[root@server114 root]groupadd g 5000 dba

[root@server114 root]# useradd g dba oracle

[root@server114 root]passwd oracle




 - winscp 이용해 필요한 설치파일 전송   (window: oracle 10g 설치파일---> linux: /home/oracle 로 전송)


patch

patchset                                                 /hom/oracle

10201_database_linux32.zip      

  

 




   


- /etc/sysctl.conf 커널설정하기 (대소문자구분, 공백주의)  


[root@server114 root]vi /etc/sysctl.conf                         // 기존 내용에 아래의 내용 추가.

     // 푸티에서 작성시 오른쪽 하단의 글자가 깨져있으면 유니코드전환 후 작성해야함. 

kernel.shmmax=536870912
kernel.shmmni=4096
kernel.shmall=2097152

kernel.sem=250 32000 100 128

fs.file-max=65536
net.ipv4.ip_local_port_range=1024 65000
net.core.rmem_default=262144
net.core.rmem_max=262144
net.core.wmem_default=262144
net.core.wmem_max=262144




- /etc/security/limits.conf 커널설정하기 


[root@server114 root]vi /etc/security/limits.conf          //기존 내용에 아래의 내용 추가.


oracle10g soft nproc 2047
oracle10g hard nproc 16384
oracle10g soft nofile 1024
oracle10g hard nofile 65536




- /etc/pam.d/login 커널설정하기 


[root@server114 root]vi /etc/pam.d/login            //기존 내용에 아래의 내용 추가.


 session   required   pam_limits.so    




- RPM설치 ( 설치 CD 3번 연결 후 ) 


[root@server114 root]# umount  /media/cdrecoder

[root@server114 root]# mount  /media/cdrecoder                     // CD새로 인식

[root@server114 root]cd /media/cdrecoder/RedHat/RPMS

[root@server114 RPMS]# rpm -ivh libaio-devel-0.3.105-2.i386.rpm

       경고: libaio-devel-0.3.105-2.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e

      준비 중...        ########################################### [100%]

   1:libaio-devel   ########################################### [100%]

[root@server114 RPMS]# cd /home/oracle/patch/

[root@server114 patch]# unzip p4198954_40_LINUX.zip

  Archive:  p4198954_40_LINUX.zip

  inflating: compat-libcwait-2.1-1.i386.rpm

  inflating: compat-oracle-rhel4-1.0-5.i386.rpm

 inflating: README.txt

[root@server114 patch]# rpm -ivh compat-libcwait-2.1-1.i386.rpm

                   준비 중... ########################################### [100%]

   1:compat-libcwait  ########################################### [100%]

[root@server114 patch]# rpm -ivh compat-oracle-rhel4-1.0-5.i386.rpm

                준비 중... ########################################### [100%]

   1:compat-oracle-rhel4  ###################################### [100%]




- .bash_profile 환경설정 (oracle 계정)


[root@server114 patch]# su - oracle

[oracle@server114 ~]$ vi .bash_profile                            // 기존 내용에 아래내용 추가


export EDITOR=vi 

export LD_ASSUME_KERNEL=2.4.19

export ORACLE_BASE=/home/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10g
export ORACLE_SID=testdb
export LANG=ko_KR.eucKR
export ORACLE_TERM=xterm
export NLS_LANG=AMERICAN_AMERICA.KO16MSWIN949
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib
export PATH=$PATH:$ORACLE_HOME/bin
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib


 


 




-  oracle10g 파일 압축풀기 (root로 작업)


[oracle@server114 ~]su -

[root@server114 root]cd /home/oracle

[root@server114 oracle]unzip 10201_database_linux32.zip

[root@server114 oracle]chown -R oracle.dba /home/oracle




oraInst.loc 파일생성 (log파일 저장위치를 지정) 


[root@server114 oracle]# vi /etc/oraInst.loc


inventory_loc=/home/oracle/oraInventory

inst_group=dba


[root@server114 oracle]# chown -R oracle.dba /etc/oraInst.loc




response 파일(enterprise.rsp) 내용수정


[root@server114 oracle]# vi /home/oracle/database/response/enterprise.rsp


// 아래의 내용 찾아서 수정


UNIX_GROUP_NAME="dba" 

ORACLE_HOME="/home/oracle/product/10g"

ORACLE_HOME_NAME="OUIHome"

COMPONENT_LANGUAGES={"en,ko"}

INSTALL_TYPE="EE"

n_configurationOption="3"










 


-  RHEL4 로그아웃 후 오라클계정으로 로그인.


 






● Engine(10.2.0.1) 생성



-  엔진설치 디렉토리로 이동후 silent 옵션으로 runInstaller 실행


[oracle@server114 oracle]cd /home/oracle/database

[oracle@server114 Disk1]./runInstaller  -silent -responseFile  /home/oracle/database/response/enterprise.rsp





- 엔진 설치완료 후 root로 스크립트 실행


 


위의 화면이 뜨면 엔진설치 성공.



[oracle@server114 database]$ su -

Password:

[root@server114 ~]#

[root@server114 ~]# /home/oracle/product/10g/root.sh

Running Oracle10 root.sh script...


The following environment variables are set as:

    ORACLE_OWNER= oracle

    ORACLE_HOME=  /home/oracle/product/10g


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 ...


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.




- 설치 확인


[oracle@server114 database]$ sqlplus / as sysdba


SQL*Plus: Release 10.2.0.1.0 - Production on Thu Feb 26 15:50:59 2015


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


Connected to an idle instance.


SQL>


 


 



● Engine(10.2.0.4) 패치


- 패치파일 디렉토리로 이동후 압축해제


[oracle@server114 ~]$ cd /home/oracle/patchset

[oracle@server114 patchset]$ unzip p6810189_10204_Linux-x86.zip





response 파일(patchset.rsp) 내용수정


[oracle@server114 patchset]$ cd /home/oracle/patchset/Disk1/response/

[oracle@server114 response]$ ll

합계 16

-rwxr-xr-x    1 oracle   dba         15971  8월 20  2006 patchset.rsp

[oracle@server114 response]$ vi patchset.rsp


UNIX_GROUP_NAME="dba"

FROM_LOCATION="../stage/products.xml" 

ORACLE_HOME="/home/oracle/product/10g"

ORACLE_HOME_NAME="OUIHome"

COMPONENT_LANGUAGES={"en,ko"}





- 엔진 패치


[oracle@server114 response]$ cd /home/oracle/patchset/Disk1

[oracle@server114 Disk1]$ ./runInstaller -silent -responseFile /home/oracle/patchset/Disk1/response/patchset.rsp





- 패치완료 (새로 putty창 열고 root로 스크립트 실행 )




login as: root

root@172.16.133.129's password:

Last login: Thu Feb 26 15:20:39 2015 from 172.16.133.1

[root@server114 ~]# /home/oracle/product/10g/root.sh

Running Oracle10 root.sh script...


The following environment variables are set as:

    ORACLE_OWNER= oracle

    ORACLE_HOME=  /home/oracle/product/10g


Enter the full pathname of the local bin directory: [/usr/local/bin]:

The file "dbhome" already exists in /usr/local/bin.  Overwrite it? (y/n)

[n]: y

   Copying dbhome to /usr/local/bin ...

The file "oraenv" already exists in /usr/local/bin.  Overwrite it? (y/n)

[n]: y

   Copying oraenv to /usr/local/bin ...

The file "coraenv" already exists in /usr/local/bin.  Overwrite it? (y/n)

[n]: y

   Copying coraenv to /usr/local/bin ...


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.

[root@server114 ~]#







 - 패치확인 (다시 oracle계정으로 로그인한 putty창으로 돌아와서 )



[oracle@server114 Disk1]$ sqlplus / as sysdba


SQL*Plus: Release 10.2.0.4.0 - Production on Thu Feb 26 16:16:31 2015


Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.


Connected to an idle instance.


SQL>

 


 


 


● DB생성 (DBCA) :  DataBase Configuration Assistant


 

- response 파일(dbca.rsp) 내용수정


[oracle@server114 Disk1]$ cd /home/oracle/database/response/

[oracle@server114 response]$

[oracle@server114 response]$ vi dbca.rsp


GDBNAME="testdb"

SID="testdb"

TEMPLATENAME="/home/oracle/product/10g/assistants/dbca/templates/New_Database.dbt"

CHATACTERSET="KO16MSWIN949"

NATIONALCHARACTERSET="UTF8"




 


- DBCA 실행


[oracle@server114 response]$cd /home/oracle/product/10g/bin

[oracle@server114 bin]$ ./dbca -silent -responseFile /home/oracle/database/response/dbca.rsp


 




 



생성확인 


[oracle@server114 bin]$ sqlplus / as sysdba


SQL*Plus: Release 10.2.0.4.0 - Production on Fri Feb 27 16:54:58 2015


Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.



Connected to:

Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options


SQL>




  




Install ORACLE 10g on RHEL4 


 

 


● Engine 생성전



- oracle 계정생성 


[root@server114 root]groupadd g 5000 dba

[root@server114 root]# useradd g dba oracle

[root@server114 root]passwd oracle




 - winscp 이용해 필요한 설치파일 전송   (window: oracle 10g 설치파일---> linux: /home/oracle 로 전송)


patch

patchset                                                 /hom/oracle

10201_database_linux32.zip      

  

 





   


- /etc/sysctl.conf 커널설정하기 (대소문자구분, 공백주의)  


[root@server114 root]# vi /etc/sysctl.conf                         // 기존 내용에 아래의 내용 추가.

     // 푸티에서 작성시 오른쪽 하단의 글자가 깨져있으면 유니코드전환 후 작성해야함. 

kernel.shmmax=536870912
kernel.shmmni=4096
kernel.shmall=2097152

kernel.sem=250 32000 100 128

fs.file-max=65536
net.ipv4.ip_local_port_range=1024 65000
net.core.rmem_default=262144
net.core.rmem_max=262144
net.core.wmem_default=262144
net.core.wmem_max=262144




- /etc/security/limits.conf 커널설정하기 


[root@server114 root]vi /etc/security/limits.conf          //기존 내용에 아래의 내용 추가.


oracle10g soft nproc 2047
oracle10g hard nproc 16384
oracle10g soft nofile 1024
oracle10g hard nofile 65536




- /etc/pam.d/login 커널설정하기 


[root@server114 root]vi /etc/pam.d/login            //기존 내용에 아래의 내용 추가.


 session   required   pam_limits.so    




- RPM설치 ( 설치 CD 3번 연결 후 ) 


[root@server114 root]# umount  /media/cdrecoder

[root@server114 root]# mount  /media/cdrecoder                     // CD새로 인식

 

[root@server114 root]# cd /media/cdrecoder/RedHat/RPMS

[root@server114 RPMS]# rpm -ivh libaio-devel-0.3.105-2.i386.rpm

       경고: libaio-devel-0.3.105-2.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e

      준비 중...        ########################################### [100%]

   1:libaio-devel   ########################################### [100%]

[root@server114 RPMS]# cd /home/oracle/patch/

[root@server114 patch]# unzip p4198954_40_LINUX.zip

  Archive:  p4198954_40_LINUX.zip

  inflating: compat-libcwait-2.1-1.i386.rpm

  inflating: compat-oracle-rhel4-1.0-5.i386.rpm

 inflating: README.txt

[root@server114 patch]# rpm -ivh compat-libcwait-2.1-1.i386.rpm

                   준비 중... ########################################### [100%]

   1:compat-libcwait  ########################################### [100%]

[root@server114 patch]# rpm -ivh compat-oracle-rhel4-1.0-5.i386.rpm

                준비 중... ########################################### [100%]

   1:compat-oracle-rhel4  ###################################### [100%]




- .bash_profile 환경설정 (oracle 계정)


[root@server114 patch]# su - oracle

[oracle@server114 ~]$ vi .bash_profile                            // 기존 내용에 아래내용 추가


export EDITOR=vi 

export LD_ASSUME_KERNEL=2.4.19

export ORACLE_BASE=/home/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10g
export ORACLE_SID=testdb
export LANG=ko_KR.eucKR
export ORACLE_TERM=xterm
export NLS_LANG=AMERICAN_AMERICA.KO16MSWIN949
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib
export PATH=$PATH:$ORACLE_HOME/bin
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib








-  oracle10g 파일 압축풀기 (root로 작업)


[oracle@server114 ~]$ su -

[root@server114 root]cd /home/oracle

[root@server114 oracle]unzip 10201_database_linux32.zip

[root@server114 oracle]chown -R oracle.dba /home/oracle





-  RHEL4 로그아웃 후 오라클계정으로 로그인.

 




●Engine(10.2.0.1) 생성


-  새터미널열어서 runInstaller 실행.

 

 

[root@server114 oracle]$ cd database

[root@server114 database]./runInstaller




   OUI   




1.설치방식선택 - 고급설치 - 다음 



2. 인벤토리 디렉토리에 대한 전체경로 입력 - 다음

 


3. 설치유형 선택 - Enterprise Edition - 다음



4. 홈 세부 정보 지정 - 다음



5. 제품별 필요 조건 검사  

 


6. 상태항목에서 실행되지 않음 체크 하고 다음 

 


6. 구성 옵션 선택 - 데이터베이스 소프트웨어만 설치



7. 요약 - 설치



8. 설치 

 


9. 터미널 열고 루트계정으로 스크립트 실행 



 # /home/oracle/oraInventory/oraInstRoot.sh

 # /home/oracle/product/10g/root.sh

 


10. 설치종료 - 종료 





●Engine (10.2.0.4) 패치



-  엔진설치 확인 후 패치실행


[oracle@server114 ~]$

[oracle@server114 ~]$ sqlplus /nolog

SQL*Plus: Release 10.2.0.1.0 - Production on Tue Feb 17 10:24:03 2015

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

SQL> exit

[oracle@server114 ~]$

[oracle@server114 ~]cd /home/oracle/patchset

[oracle@server114 patchset]$ ls

p4679769_10201_LINUX.zip      p8202632_10205_LINUX.zip

p6810189_10204_Linux-x86.zip

[oracle@server114 patchset]$ unzip p6810189_10204_Linux-x86.zip

.....

[oracle@server114 patchset]$ ls

[oracle@server114 patchset]$ cd Disk1

[oracle@server114 Disk1]$ ./runInstaller






1. 시작 





2. 제품별 필요 조건 검사 - 상태: 성공함 확인 후 - 다음 

 


3. 오라클 구성 매니져 등록 - 활성화체크 해제 - 다음 

 


4. 요약 - 설치  

 


5. 설치시작 


 


6. 루트로 스크립트 실행. 



# /home/oracle/product/10g/root.sh -> Enter -> y,y,y

 


7. 패치설치 종료
 






● DB생성 (DBCA) :  DataBase Configuration Assistant


 

- 터미널에서 dbca 치면 database configuration assistant 시작


[oracle@server114 oracle]dbca 


      

1.시작 


 


2.수행하고자 하는 작업 선택 - 데이터베이스 생성



3. 생설할 템플리트 선택 - 범용 - 다음

 


4. 데이터베이스 ID - testdb



5. 관리옵션 - Enterprise Manager 사용해 데이터베이스 구성 체크해제 - 다음  

 


6. 데이터베이스 인증서 - 모든계정에 동일한 암호사용 : 암호설정후 - 다음



7.저장영역옵션 - 파일시스템 - 다음



8. 데이터베이스 파일위치 - 템플리트에서 데이터베이스 파일위치 사용 - 다음



9. 복구구성 - 플래시 복구 영역 지정 체크 - 다음

 


10. 데이터베이스내용 - 샘플스키마 체크 - 다음



11. 초기화 매개변수 - 기본



12. 데이터베이스 저장영역 - 다음



13.  생성옵션 - 데이터베이스 생성 - 완료



14. 확인



15. 데이터베이스 생성 시작



16. 생성완료 - 종료




 

  - DB생성(10.2.0.4) 확인 


[oracle@server114 oracle]sqlplus / as sysdba


SQL*Plus: Release 10.2.0.4.0 - Production on Tue Feb 17 12:44:15 2015


Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.


.......


SQL> select status from v$instance;


STATUS

--------------------------------

OPEN


SQL>






 


Install ORACLE 9i R2 on RHEL3

      192.168.15.114

      255.255.0.0

      192.168.0.1

      168.126.63.1  

●  Engine 생성전


     - oracle 계정생성 


[root@server114 root]groupadd g 5000 dba

[root@server114 root]# useradd g dba oracle

[root@server114 root]passwd oracle


      


       - winscp 이용해 필요한 설치파일 전송   (window: oracle9i install---> linux: /home/oracle 로 전송)



                   

 




  



- 공유메모리 확인


[root@server114 root]# echo '2147483648' > /proc/sys/kernel/shmmax

[root@server114 root]# vi /etc/rc.d/rc.local                                                  <- 공유메모리확인 내용 등록함.

#!/bin/sh

#

# This script will be executed *after* all the other init scripts.

# You can put your own initialization stuff in here if you don't

# want to do the full Sys V style init stuff.


touch /var/lock/subsys/local

echo ‘2147483648’ > /proc/sys/kernel/shmmax




- ship_9204_linux_disk 압축풀기


[root@server114 oracle]# cd /home/oracle/install

[root@server114 install]# ll

합계 1570140

drwxr-xr-x    2 root     root         4096  2월 17 15:52 font

drwxr-xr-x    2 root     root         4096  2월 17 15:52 patch

drwxr-xr-x    2 root     root         4096  2월 17 15:54 patchset

drwxr-xr-x    2 root     root         4096  2월 17 15:55 rpm

-rw-r--r--    1 root     root     659577856  3월 25  2004 ship_9204_linux_disk1.cpio

-rw-r--r--    1 root     root     646914048  3월 25  2004 ship_9204_linux_disk2.cpio

-rw-r--r--    1 root     root     299722752  3월 25  2004 ship_9204_linux_disk3.cpio


[root@server114 install]# 

[root@server114 install]# cpio -idmv < ship_9204_linux_disk1.cpio && cpio -idmv < ship_9204_linux_disk2.cpio && 

          cpio -idmv < ship_9204_linux_disk3.cpio




    - RPM 설치 (rpm -Uvh compat-libgc*.rpm 하면 자동으로 순서대로 설치해줌)


[root@server114 font]# cd /home/oracle/install/rpm

[root@server114 rpm]# rpm -Uvh compat-libgc*

경고: compat-libgcj-7.3-2.96.118.i386.rpm: V3 DSA signature: NOKEY, key ID db42a   60e

준비 중...                            ########################################### [100%]

   1:compat-libgcj               ########################################### [ 50%]

   2:compat-libgcj-devel    ########################################### [100%]         

 


 


 - 오라클 계정의 .bash_profile 파일설정. (기존파일에 아래내용을 추가)


[root@server114 rpm]# chown -R oracle.dba /home/oracle

[root@server114 rpm]# su - oracle


[oracle@server114 oracle]$ vi .bash_profile


export DISPLAY=localhost:0.0

export ORACLE_BASE=/home/oracle

export ORACLE_HOME=$ORACLE_BASE/product/9.2

export PATH=$PATH:$ORACLE_HOME/bin:$ORACLE_HOME/Apache/Apache/bin:$PATH

export ORACLE_OWNER=oracle

export ORACLE_SID=testdb

export ORACLE_TERM=xterm

export LD_ASSUME_KERNEL=2.4.1

export THREADS_FLAG=native

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH

export NLS_LANG=AMERICAN_AMERICA.KO16MSWIN949

export LANG=ko_KR.eucKR


 






- bash_profile 수정완료후 root계정으로  su -  해서 9204 압축풀고 패치실행


[oracle@server114 oracle]$  su - 

[root@server114 root]#

[root@server114 root]# cd /home/oracle/install/patch

[root@server114 patch]# ls

9i_opatch_p6880880_101000_LINUX.zip  p3238244_9204_LINUX.zip

p3006854_9204_LINUX.zip              register97.hwp

[root@server114 patch]# unzip p3006854_9204_LINUX.zip

Archive:  p3006854_9204_LINUX.zip

   creating: 3006854/

  inflating: 3006854/rhel3_pre_install.sh

  inflating: 3006854/README.txt

[root@server114 patch]# ls

3006854                              p3006854_9204_LINUX.zip  register97.hwp

9i_opatch_p6880880_101000_LINUX.zip  p3238244_9204_LINUX.zip

[root@server114 patch]# cd 3006854

[root@server114 3006854]# ls

README.txt  rhel3_pre_install.sh

[root@server114 3006854]# sh rhel3_pre_install.sh

Applying patch...

Ensuring permissions are correctly set...

Done.

Patch successfully applied




- oraInst.loc 파일생성 (설치될 s/w log파일 저장위치를 지정) 


[root@server114 oracle]# vi /etc/oraInst.loc


inventory_loc=/home/oracle/oraInventory

inst_group=dba


[root@server114 oracle]# chown -R oracle.dba /etc/oraInst.loc




response 파일(enterprise.rsp) 내용수정


[root@server114 oracle]# vi /home/oracle/install/Disk1/response/enterprise.rsp


// 아래의 내용 찾아서 수정


UNIX_GROUP_NAME="dba" 

ORACLE_HOME="/home/oracle/product/9.2"

ORACLE_HOME_NAME="OUIHome"

COMPONENT_LANGUAGES={"en,ko"}

INSTALL_TYPE="EE"

s_cfgtyperet="Software Only"









* Enterprise.rsp 파일을 수정해도 되고 아래와 같이 옵션을 다 적어서 실행해도 똑같음


 

Ex)  ./runInstaller -silent -force -debug FROM_LOCATION="/home/oracle/Disk1/stage/products.jar" ORACLE_HOME=

"/home/oracle/Disk1/OraHome" ORACLE_HOME_NAME="OraHome" TOPLEVEL_COMPONENT=

'{"oracle.server","9.2.0.4.0"}' INSTALL_TYPE="EE"










●  Engine (9.2.0.4) 생성 - Silent mode

 


 - 오라클계정으로 다시 로그인 한후 ./runInstaller 실행




- 엔진설치 디렉토리로 이동후 silent 옵션으로 runInstaller 실행


[oracle@server114 oracle]cd /home/oracle/install/Disk1

[oracle@server114 Disk1]./runInstaller  -silent -responseFile  /home/oracle/install/Disk1/response/enterprise.rsp





- 엔진 설치시작 


 



위의 화면이 뜨면 엔진설치 성공.




- 설치 확인


[oracle@server114 Disk1]$ sqlplus /nolog


SQL*Plus: Release 9.2.0.4.0 - Production on Wed Feb 25 17:48:23 2015


Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.


SQL>







● Engine (9.2.0.8) 패치 



​- 패치파일 디렉토리로 이동후 압축해제


[oracle@server114 Disk1]$ cd /home/oracle/install/patchset

[oracle@server114 patchset]$ unzip p4547809_92080_LINUX.zip





response 파일(patchset.rsp) 내용수정


[oracle@server114 patchset]$ cd /home/oracle/install/patchset/Disk1/response/

[oracle@server114 response]$ ll

합계 16

-rwxr-xr-x    1 oracle   dba         15971  8월 20  2006 patchset.rsp

[oracle@server114 response]$ vi patchset.rsp


UNIX_GROUP_NAME="dba"

FROM_LOCATION="/home/oracle/install/patchset/Disk1/stage/products.xml" 

ORACLE_HOME="/home/oracle/product/9.2"

ORACLE_HOME_NAME="OUIHome"




 






​- 엔진 패치 


[oracle@server114 response]$ cd /home/oracle/install/patchset/Disk1

[oracle@server114 Disk1]$ ./runInstaller -silent -responseFile /home/oracle/install/patchset/Disk1/response/patchset.rsp




​- 패치완료 -> root로 스크립트 실행


   


[oracle@server114 Disk1]su -

Password:

[root@server114 root]# /home/oracle/product/9.2/root.sh

Running Oracle9 root.sh script...

\nThe following environment variables are set as:

    ORACLE_OWNER= oracle

    ORACLE_HOME=  /home/oracle/product/9.2


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 ...


\nCreating /etc/oratab file...

Adding entry to /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.


[root@server114 root]#




​- 리스너구성(netca) 실행


login as: oracle

oracle@192.168.15.114's password:

[oracle@server114 oracle]$ cd /home/oracle/product/9.2/bin

[oracle@server114 bin]$

[oracle@server114 bin]$ ./netca /silent /responseFile /home/oracle/install/Disk1/response/netca.rsp


명령줄 인수 분석:

    매개변수 "silent" = true

    매개변수 "responsefile" = /home/oracle/install/Disk1/response/netca.rsp

명령줄 인수 분석을 완료했습니다.

Oracle Net Service 구성:

프로파일 구성이 완료되었습니다.

Oracle Net 리스너 시작:

    실행 중인 리스너 제어:

      /home/oracle/product/9.2/bin/lsnrctl start LISTENER

    리스너 제어가 완료되었습니다.

    리스너가 성공적으로 시작되었습니다.

리스너 구성이 완료되었습니다.

기본 로컬 이름 지정 구성을 완료했습니다.

Oracle Net Service 구성을 성공했습니다. 종료 코드는 다음과 같습니다. 0               // 종료코드가 0이면 리스너가 정상적으로 구성됨






 ● DB생성 (DBCA) :  DataBase Configuration Assistant

 

​- response 파일(dbca.rsp) 내용수정


[oracle@server114 bin]$ cd /home/oracle/install/Disk1/response/

[oracle@server114 response]$

[oracle@server114 response]$ vi dbca.rsp


CREATE_TYPE="createDatabase"

GDBNAME="testdb"

SID="testdb"

TEMPLATENAME="New Database"

CHATACTERSET="KO16MSWIN949"

NATIONALCHARACTERSET="UTF8"






​- DBCA 실행


[oracle@server114 response]$cd /home/oracle/product/9.2/bin

[oracle@server114 bin]$ ./dbca -silent -responseFile /home/oracle/install/Disk1/response/dbca.rsp


 






​- 생성확인


[oracle@server114 bin]$ sqlplus /nolog


SQL*Plus: Release 9.2.0.8.0 - Production on Wed Feb 25 20:10:05 2015


Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.


SQL> conn /as sysdba

Connected.

SQL> select * from v$version;


BANNER

----------------------------------------------------------------

Oracle9i Enterprise Edition Release 9.2.0.8.0 - Production

PL/SQL Release 9.2.0.8.0 - Production

CORE    9.2.0.8.0       Production

TNS for Linux: Version 9.2.0.8.0 - Production

NLSRTL Version 9.2.0.8.0 - Production


SQL> shutdown

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> conn /as sysdba

Connected to an idle instance.

SQL> startup

ORACLE instance started.


Total System Global Area  235999648 bytes

Fixed Size                   450976 bytes

Variable Size             201326592 bytes

Database Buffers           33554432 bytes

Redo Buffers                 667648 bytes

Database mounted.

Database opened.

SQL> select status from v$instance;


STATUS

------------

OPEN


SQL> 






               9.2.0.4           9.2.0.7                              9.2.0.8

[ Engine생성  Engine패치  DB생성 → Engine패치업 ] 


Install ORACLE 9i on RHEL3 

      172.16.5.15

      255.255.0.0

      172.16.0.1

      168.126.63.1  

●  Engine 생성전


     - oracle 계정생성 


[root@server114 root]groupadd g 5000 dba

[root@server114 root]# useradd g dba oracle

[root@server114 root]passwd oracle


      


       - winscp 이용해 필요한 설치파일 전송   (window: oracle9i의 install폴더---> linux: /home/oracle 로 전송)



       - 공유메모리 확인


[root@server114 root]# echo '2147483648' > /proc/sys/kernel/shmmax

[root@server114 root]# vi /etc/rc.d/rc.local                                       <- 공유메모리확인 내용 등록함.

#!/bin/sh

#

# This script will be executed *after* all the other init scripts.

# You can put your own initialization stuff in here if you don't

# want to do the full Sys V style init stuff.


touch /var/lock/subsys/local

echo ‘2147483648’ > /proc/sys/kernel/shmmax




- ship_9204_linux_disk 압축풀기


[root@server114 oracle]# cd /home/oracle/install

[root@server114 install]# ll

합계 1570140

drwxr-xr-x    2 root     root         4096  2월 17 15:52 font

drwxr-xr-x    2 root     root         4096  2월 17 15:52 patch

drwxr-xr-x    2 root     root         4096  2월 17 15:54 patchset

drwxr-xr-x    2 root     root         4096  2월 17 15:55 rpm

-rw-r--r--    1 root     root     659577856  3월 25  2004 ship_9204_linux_disk1.cpio

-rw-r--r--    1 root     root     646914048  3월 25  2004 ship_9204_linux_disk2.cpio

-rw-r--r--    1 root     root     299722752  3월 25  2004 ship_9204_linux_disk3.cpio


[root@server114 install]# 

[root@server114 install]# cpio -idmv < ship_9204_linux_disk1.cpio && cpio -idmv < ship_9204_linux_disk2.cpio && 

          cpio -idmv < ship_9204_linux_disk3.cpio




 - font 파일 압축풀기


[root@server114 install]# cd font

[root@server114 font]# tar zxvf baekmuk-ttf-2.1.tar.gz

[root@server114 font]# cp *.ttf  /home/oracle/install/Disk1/stage/Components/oracle.swd.jre/1.3.1.0.0/1/DataFiles/Expanded/jre/linux/lib/fonts

[root@server114 font]# cp fonts.dir  /home/oracle/install/Disk1/stage/Components/oracle.swd.jre/1.3.1.0.0/1/DataFiles/Expanded/jre/linux/lib/fonts

[root@server114 font]# cp font.properties.ko /home/oracle/install/Disk1/stage/Components/oracle.swd.jre/1.3.1.0.0/1/DataFiles/Expanded/jre/linux/lib




 - RPM 설치 (rpm -Uvh libgcj*.rpm 하면 알아서 순서대로 설치해줌)


[root@server114 font]# cd /home/oracle/install/rpm

[root@server114 rpm]# rpm -Uvh compat-libgcj-7.3-2.96.118.i386.rpm

[root@server114 rpm]# rpm -Uvh compat-libgcj-devel-7.3-2.96.118.i386.rpm

[root@server114 rpm]# rpm -Uvh nss_db-compat-2.2-20.i386.rpm                   <--설치시 에러나는 경우 있음 무시.


 

  

 


 - 오라클 계정의 .bash_profile 파일설정. (기존파일에 아래내용을 추가)


[root@server114 rpm]# chown -R oracle.dba /home/oracle

[root@server114 rpm]# su - oracle


[oracle@server114 oracle]$ vi .bash_profile

 

 

 




- bash_profile 수정완료후 root계정으로  su -  해서 9204 압축풀고 패치실행


[oracle@server114 oracle]$  su - 

[root@server114 root]#

[root@server114 root]# cd /home/oracle/install/patch

[root@server114 patch]# ls

9i_opatch_p6880880_101000_LINUX.zip  p3238244_9204_LINUX.zip

p3006854_9204_LINUX.zip              register97.hwp

[root@server114 patch]# unzip p3006854_9204_LINUX.zip

Archive:  p3006854_9204_LINUX.zip

   creating: 3006854/

  inflating: 3006854/rhel3_pre_install.sh

  inflating: 3006854/README.txt

[root@server114 patch]# ls

3006854                              p3006854_9204_LINUX.zip  register97.hwp

9i_opatch_p6880880_101000_LINUX.zip  p3238244_9204_LINUX.zip

[root@server114 patch]# cd 3006854

[root@server114 3006854]# ls

README.txt  rhel3_pre_install.sh

[root@server114 3006854]# sh rhel3_pre_install.sh

Applying patch...

Ensuring permissions are correctly set...

Done.

Patch successfully applied





●  Engine (9.2.0.4) 생성

 

 - 오라클계정으로 다시 로그인 한후 ./runInstaller 실행


 

[oracle@server114 oracle]cd /home/oracle/install/Disk1

[oracle@server114 Disk1]./runInstaller




 OUI  (Oracle Universal Installer) 

1. 시작 - 다음

 



2. 인벤토리 위치 - /home/oracle/oraInventory - 확인

 



3. UNIX 그룹이름 - dba - 다음

 



4. 아래의 창이 뜨면 새로운 터미널열고 root로 # /tmp/orainstRoot.sh 스트립트 실행 - OUI화면으로 돌아와서 계속




5.파일위치 - 자동으로 잡아줌 (오타가 없었다면) - /home/oracle/product/9.2 - 다음

 



6. 사용 가능한 제품 - Oracle9i database 9.2.0.4.0 선택 - 제품언어 눌러서 선택된 언어에 한국어있는지 확인 - 다음 

 



7. 설치유형 - Enterprise Edition - 다음

 



8. Database Configuration - software Only - 다음

 



9. 요약 - 설치

 



10. 아까 열었던 터미널에서 root계정으로 # /home/oracle/product/9.2/root.sh 스크립트 실행 - 확인

 



11. 설치완료

 




12. 설치 확인


[oracle@server114 Disk1]sqlplus /nolog


SQL*Plus: Release 9.2.0.4.0 - Production on Tue Feb 17 17:54:33 2015


Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.


SQL> conn / as sysdba

Connected to an idle instance.

SQL>

SQL>

SQL> exit                  <-패치전에는 항상 엔진을 종료 해야한다. 

Disconnected


[oracle@server114 Disk1]$





● Engine (9.2.0.7) 패치 


패치전에는 항상 엔진을 종료해야하며, 실행중인 프로세스가 있어도 설치가 안된다. 

실행중인 프로세스 모르겠으면 그냥 재부팅(오라클계정).


- 패치파일 디렉토리로 이동후 압축해제하고 패치실행 


[oracle@server114 Disk1]$ cd /home/oracle/install/patchset

[oracle@server114 patchset]$ unzip p4163445_92070_LINUX.zip

[oracle@server114 patchset]$ cd Disk1


[oracle@server114 Disk1]./runInstaller




 - 패치 시작 화면이 아래화면과 같이 글자 깨진다면 영어로 다시 실행해야함 



 - OUI 종료하고 영어로 다시 실행


[oracle@server114 Disk1]export LANG=C

[oracle@server114 Disk1]./runInstaller




1. 패치시작 - next



2. Specify file locations - Name: OUIHome / Path: /home/oracle/product/9.2 확인 - next

     (   처음에 OUIHome1 로 써있는데 1지우고 아래의 Path줄 클릭하면 경로잡아줌  )



3. Select a product to Install - Oracle 9iR2 Patch Set 9.2.0.7.0 - next



4. Summary  - Install



5. Install

 


6. # /home/oracle/product/9.2/root.sh 스크립트 실행창 뜨면 새 터미널열고 root로 실행후 OUI창 돌아와서 OK.



                                    # /home/oracle/product/9.2/root.sh -> Enter -> y , y, y (overwrite)



7. End of Installation -> Exit



8.  패치(9.2.0.7)확인 -  $  sqlplus  /nolog  

     SQL> exit 


 




● DB생성 (DBCA) :  DataBase Configuration Assistant


 

- 터미널에서 dbca 치면 dbca 창이 뜬다. 5초안에 떠야 정상, 안뜨면 다시 재부팅.


[oracle@server114 oracle]dbca 


      

      

      1. 시작 - 다음

      



       2. 수행하고자 하는 작업 선택 - 데이터베이스 생성 - 다음 

      


       3. 데이터베이스 템플리트 - 범용 (general purpose) 선택 - 다음 

 


       4. 전역 데이터베이스 이름/ SID - testdb - 다음 

     


       

       5. 데이터베이스 접속 옵션 - 전용서버 모드 선택 - 다음 

      


       6. 초기화매게변수 - 상단의 두번째탭 문자집합 - 문자집합목록에서 선택 - KO16MSWIN949 선택 - 다음 

     


7. 데이터베이스 저장 영역 - 다음 

     

             

       8. 생성옵션 - 데이터베이스생성 체크확인 - 다음 

      

     

       9. 요약 - 확인

    

     

     10. DB생성시작
 



       11. SYS, SYSTEM 암호입력 - 종료 (DB생성완료)

       



       - DB생성(9.2.0.7) 확인 


[oracle@server114 oracle]sqlplus /nolog


SQL*Plus: Release 9.2.0.7.0 - Production on Tue Feb 17 19:54:33 2015


Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.


SQL> conn / as sysdba

Connected.

SQL> select status from v$instance;


STATUS

--------------------------------

OPEN


SQL>


 




● Engine (9.2.0.8) 패치 업

 


9.2.0.7 -> 9.2.0.8로 패치업 하기 위해 DB 접속을 종료, 마찬가지로 실행중인 프로세스 모두 종료해야함.  


STATUS

--------------------------------

OPEN


SQL> shutdown

Database closed. 

Database dismounted.

ORACLE instance shut down.

SQL> exit
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.7.0 - Production With the Partitioning, OLAP and Oracle Data Mining options JServer Release 9.2.0.7.0 - Production
[oracle@server114 oracle]$ 

 


 - 패치 디렉토리로 이동후 기존의 9.2.0.7 버전 Disk1 디렉토리 삭제하고, 9.2.0.8 패치 압축해제. 


[oracle@server114 oracle]$ cd /home/oracle/install/patchset


[oracle@server114 patchset]rm -fr Disk1

[oracle@server114 patchset]rm -fr README.html


[oracle@server114 patchset]unzip p4547809_92080_LINUX.zip


[oracle@server114 patchset]cd Disk1 

[oracle@server114 Disk1]export LANG=C
[oracle@server114 Disk1]./runInstaller
 

 


1. 패치시작 - 다음



2. Specify File Locations - Name: OUIHome / Path: /home/oracle/product/9.2 확인 - 다음




3. select a product to install - Oracle 9iR2 Patch Set 9.2.0.8.0  - 다음

 


 

4. Summary - install




5.Install 

 



6. 터미널 열어서 root계정으로 스크립트 실행 한후 OUI로 돌아가서 OK.

/home/oracle/product/9.2/root.sh



 

7. End of Installation - Exit




 

- 패치(9.2.0.8)확인 


[oracle@server114 Disk1]sqlplus /nolog


SQL*Plus: Release 9.2.0.8.0 - Production on Tue Feb 17 21:54:33 2015


Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.


SQL> conn / as sysdba

Connected to an idle instance





- post upgrade (DB 파라미터 값 수정): db에 접속한 상태(sysdba)에서 진행

 

SQL> startup

ORACLE instance started.


Total  System Global   Area    235999648 bytes

Fixed Size                                      450976 bytes

Variable Size                           201326592 bytes

Database Buffers                      33554432 bytes

Redo Buffers                                 667648 bytes

Database mounted.

Database opend.

SQL> select status from v$instance;


STATUS

--------------------------------

OPEN 


SQL> col COMP_NAEME for a30

SQL> select comp_name, version, status from dba_registry;


                          


                         //확인해보면 아직 모두 (9.2.0.4)버전.



SQL> shutdown

...


SQL> startup migrate

.....

.....


SQL> @?/rdbms/admin/catupgrd.sql           // 엔진에 맞는 DB버전 패치 적용.



 

                  






- 버전 (9.2.0.8) 확인.

 



        엔진에 맞는 DB버전 패치 적용완료.

        



        버전확인 후 shutdown 하고 DB OPEN 확인.


SQL> shutdown

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> exit


[oracle@server114 Disk1]sqlplus /nolog


SQL*Plus: Release 9.2.0.8.0 - Production on Tue Feb 17 21:57:33 2015


Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.


SQL> conn / as sysdba


SQL> startup

Oracle instance started.


Total  System  Global   Area   

....

SQL> select status from v$instance;


STATUS

--------------------------------

OPEN


       



        

 




 


Install ORACLE 8i on RHEL3 


 

 


Engine 생성전 (관련파일설치 및 환경설정 )


- oracle 계정생성 

[root@server114 root]groupadd g 5000 dba

[root@server114 root]# useradd g dba oracle

[root@server114 root]passwd oracle


 

- winscp 이용해서 필요한파일 전송 (window: Linux_or_817 ------------>  linux: /home/oracle 로 파일 전송)



jdk118_v3-glibc-2.1.3.tar.bz2           /usr/local 

jre118_v3-glibc-2.1.3.tar.bz2           /usr/local 

i386-glibc-2.1-linux.tar.gz              

glibc-2.1.3-stubs.tar.gz                     

Linux_or_817 설치폴더                   /home/oracle


 


 

 

- jdk, jre 설치

 

[root@server114 root]# cd /usr/local

 

[root@server114 local]# tar jxvf jdk118_v3-glibc-2.1.3.tar.bz2

[root@server114 local]# tar jxvf jre118_v3-glibc-2.1.3.tar.bz2

 

[root@server114 local]# ln -s jdk118_v3 java

[root@server114 local]# ln -s jre118_v3 jre

 

[root@server114 local]# chown -R oracle.dba java

[root@server114 local]# chown -R oracle.dba jre

 

lrwxrwxrwx    1 oracle   dba              9  2▒▒ 20 13:43 java -> jdk118_v3

drwxr-xr-x    6 862      users        4096  9▒▒ 19  2000 jdk118_v3

lrwxrwxrwx    1 oracle   dba              9  2▒▒ 20 13:43 jre -> jre118_v3

drwxr-xr-x    4 862      users        4096  9▒▒ 21  2000 jre118_v3

 

 

 

 

glibc  설치

[root@server114 local]# cd /

[root@server114 /]# tar zxvf i386-glibc-2.1-linux.tar.gz

[root@server114 /]# cd /usr/bin

[root@server114 bin]# mkdir backup

[root@server114 bin]# mv gcc cc ld backup

[root@server114 bin]#

[root@server114 bin]# ln -s /usr/i386-glibc-2.1-linux/bin/i386-glibc21-linux-gcc gcc

[root@server114 bin]# ln -s gcc cc                                               <--  안하면 엔진생성할때  makefile 오류.

[root@server114 bin]# ln -s /usr/i386-glibc-2.1-linux/bin/i386-glibc21-linux-ld ld

[root@server114 bin]#

[root@server114 bin]# cd /usr/lib

[root@server114 lib]#

[root@server114 lib]# mkdir backup

[root@server114 lib]# mv libc.so libdl.so libm.so libpthread.so backup

[root@server114 lib]# mv libc.a libdl.a libm.a libpthread.a backup

 

 

 

- oracle  설치파일 설정

[root@server114 lib]# cd /home/oracle/Linux_or_817     //오라클 설치파일들이 /home/oracle에 있도록 한다.

          Linux_or_817 폴더에서  /home/oracle로 파일들을 전부 복사             한 다음  Linux_or_817 폴더는 삭제함.  (?)

[root@server114 Linux_or_817]#

[root@server114 Linux_or_817]# mkdir tmp

[root@server114 Linux_or_817]# mkdir  -p oraInventory

[root@server114 Linux_or_817]# chown -R oracle.dba /home/oracle

 
[root@server114 Linux_or_817]# chmod 755 runInstaller

[root@server114 Linux_or_817]# chmod 755 /home/oracle/Linux_or_817/install/linux/runInstaller

 

 

 

 

 - .bash_profile  파일수정(맨 밑에 추가) 후 저장하고 재부팅

[root@server114 oracle]# vi /home/oracle/.bash_profile

 

umask 022 

export ORACLE_TERM=vt100

export LD_ASSUME_KERNEL=2.2.5

export ORACLE_BASE=/home/oracle

export ORACLE_HOME=$ORACLE_BASE/product/8.1.7

export ORACLE_OWNER=oracle

export ORACLE_SID=ORCL

export TMP_DIR=$ORACLE_BASE/tmp

export PATH=.$ORACLE_HOME/bin:/usr/local/java/bin:/$PATH

export TNS_ADMIN=$ORACLE_HOME/network/admin

export NLS_LANG=American_America.KO16KSC5601

export ORA_NL33=$ORACLE_HOME/ocommon/nls/admin/data

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH

export LANG=C

 

[root@server114 oracle]#  chown oracle.dba /home/oracle/.bash_profile

 

[root@server114 oracle]# init 6

 

 

 

 

●  Engine 생성 ( 재부팅후 oracle  계정으로 로그인 

 



.bash_profile  수정한 내용확인 후  오라클설치 시작(OUI)

[oracle@server114 oracle]$ env

....

[oracle@server114 oracle]$ cd /home/oracle/Linux_or_817

[oracle@server114 Linux_or_817]$ ./runInstaller

 

 



 OUI  (Oracle Universal Installer)

 

1. 시작 화면 - 다음

 



2. 파일 위치 - 다음


 


3. UNIX 그룹 이름 - dba 입력 - 다음

 



4. - orainstRoot.sh 실행시키라는 창이 뜨면, 터미널 하나 더 열고, su - 해서 root로 로그인 후 스크립트 실행

 


/home/oracle/product/8.1.7/orainstRoot.sh 입력후 재시도.



5.설치 가능한 제품들 - Enterprise Edition 8.1.7.0.1 - 다음 

 



6. 설치 유형 - Custom 선택 - 다음

 



7. 제품 구성 요소 - 다음 (제품언어에 한국어 추가되어있는지 확인후)

 



8. 구성 요소 위치 - 다음

 



9. Privileged Operating System Groups - dba 확인 - 다음

 



10. Authentication Methods - 다음

 



11. Choose JDK Home Directory - /usr/loca/java 확인 - 다음

 



12. Create Database - No 선택 - 다음

 



13. 요약 - 설치

 



14. 100% 까지 진행되면 root.sh 실행하라는 창이 뜬다.

 



15. 아까 열어둔 root 터미널에서 # /home/oracle/product/8.1.7/root.sh 실행 후 설치화면으로 돌아와서 확인

 



16. Net8 Configuration Assistant - 기본 구성 선택 - 다음

 



17. 설치 종료

 

 



● DB생성 (DBCA) :  DataBase Configuration Assistant


1.터미널/에서 $ dbassist 실행시켜 창뜨면 DB생성시작.

 

 


2. 생성할 DB유형 - 기본 - 다음

.



3. DB생성방법 - CD에서 기존의 데이터베이스 파일을 복사 - 다음

.



4.전역 DB명, SID - testdb 입력 - 완료



5. DB생성시작







6. DB생성완료



7. DB생성확인


 $ sqlplus internal

    SQL>  select status from v$instance; 



 



Server

mountd : NFS요청이 오면 File handle생성, client요청관리, access제어 (/usr/lib/nfs/mountd)

nfsd : client가 요청한 자원을 전달 (/etc/dfs/dfstab 에 공유 정보가 있어야 동작)

/etc/init.d/nfs.server 스크립트에 의해 동작, mountd, nfsd 데몬을 실행시킴)

          

configuration file

/etc/dfs/dfstab : 버에서 부팅시 공유할 자원 mapping  ex) share -rw=server115   /data

mapping정보 있어야 nfsd가 동작하고, 변경되면 mountd demon 재시작.

/etc/dfs/sharetab : 현재 서버에 공유되어 있는 자원 정보 저장

/etc/dfs/fstypes : NFS file type 정의

/etc/rmtab : 원격 mount된 공유자원과 client 내역을 기록


-command

share { -F fstype} {-o options{-d decription} pathname        ex) share -o rw=

unshare { -F nfs} pathname

shareall unshareall
dfshares {-F nfs} {host}
dfmounts {-F nfs} {server}


Client

statd : server와 client와의 상태정보 관리, lock된 파일 정보를 보관.(/usr/lib/nfs/statd : 기본적으로 실행됨)

lockd : 자원 사용시 locking, 서버다운시 다운되기 이전상태로 복구.

/etc/init.d/nfs.client 스크립트에 의해 동작


configuration file

/etc/vfstab : 서버에서 부팅시 마운트할 자원 mapping

/etc/mnttab : 현재 서버에 마운트되어 있는 자원 정보 저장

/etc/dfs/fstypes : NFS file type 정의


-command

mount { -F fstype} {-o optionsserver:pathname  mount_point

umount { -F fstype} mount_point

mountall -r / umountall -r  : fstype이 nfs인것만 mount









LAB 1 - NFS Server와 Client 구성하기





 

LAB 2 - NFS 백업서버 구성하기


'unix' 카테고리의 다른 글

유닉스 명령어들2  (8) 2016.03.08
유닉스 명령어들  (8) 2016.03.08
[VMware] Solaris_9_x86 설치  (8) 2016.03.08

device와 disk관리

-순서 :  C(controller) ,  T (target),  D(disk),  S(slice) - 0번부터 시작


-종류 : SCSI   

 IDE  (target4개)


-logical device names

mount, swap : /dev/dsk/c0t0d0s0

newfs, fsck  : /dev/rdsk/c0t0d0s0


-system's device

device에 관한정보 : /dev (logical device name) , /device (physical device name) 에 저장.

설정 : /etc/path_to_inst (장치관리자) -  커널에서 사용가능한 device 확인, 관리, 부팅시에 읽음

prtconf : 시스템 정보표시(서버에 붙어있는 하드웨어 명단표시)    ex) prtconf | grep -v not (안쓰고있는 하드)


-device configuration

재부팅하는방법

1.  #touch /reconfigure
    #init 5
2.  #reboot -- -r     :: 재부팅하면서 재구성
3.  #ok boot -r       :: 전용장비에서 사용(과거에 많이 사용)

재부팅 안하고 장치구성하는법 ( Solaris 7이후부터 사용가능 )

1. #devfsadm -v   


format (파티션)   - 한번도 쓰지 않은 하드라면 먼저 fdisk.

(format했는데 추가한 하드가 안보일때 재부팅 할 필요 없이 devfsadm -v 치고 다시 format )


ex)

첫번째파티션

1.  specify disk: available disk selections 에서 추가한 하드 선택

2. format menu: partition 

3. partition menu: 0~7번 (2번은 절대 change하면 안됨)

4. id tag, permission flags : enter

5. starting cyl[0] : 

6. partition size :

7. print (current partition table) 치고 실린더 마지막 번호 확인.

두번째파티션

8. starting cyl[] : 첫번째 파티션에서 설정된 실린더 마지막 번호 + 1

9. partition size : $ (나머지용량)

10. print 현재 상태 확인

11. label : 저장 -> y

12. verify (새로운 레이블 정보 확인)


newfs (포맷) - format 상태에서 빠져나와서 진행 (q)

ex) newfs /dev/rdsk/c1d1s0

fsck : 하드디스크 이상 없는지 검사 -> 이상있으면 lost+found 안에 넣어둠

      ex) b=32 : 슈퍼블락 고장낫을때 백업 슈퍼블락이용해서 복구


​mount (마운트) ​일반계정은 못함. 루트계정만 사용가능

ex) mount /dev/dsk/c1d1s0 /data1

umount -f : 

fuser  -fuk : 


/etc/vfstab : 부팅시에 자동으로 마운트할 모든 파일 시스템 저장.


cron 및 reboot과정

crontab

        /var/spool/cron/crontabs/username
​run level (who -r) 

run level S : 안전모드

run level 3 : 정상모드 (리눅스: 텍스트모드)

run level 5 : 종료모드 (리눅스: 그래픽모드)

run level 6 : 재부팅



cf)

PROM  : ROM안에 들어있는 BIOS(기본 입출력시스템)프로그램을 한번만 바꾸도록 해줌

EPROM  : BIOS 프로그램을 여러번 바꾸도록 해줌(기계가 있어야함)

EEPROM  : 기계필요없이 프로그램 다운(flash bios)



부팅과정

 /etc/system

 /etc/inittab


 


software & patch 관리

-​ package (리눅스에서는 rpm) 

   pkgadd -d : 현재 디렉토리 안에 존재 ( -d 옵션 안쓰면 /var/spool/pkg 안에 있다고 판단) 

   pkgrm

- patch

patchadd -p 설치되어있는 패치목록 (=showrev -p)

patchrm : 삭제



Pseudo F/S & SWAP(가상 메모리)

swap  

mkfile : 용량을 지정해서 파일 생성 







 >>

CD1로 교체하고 솔라리스 재부팅. vmware로고나올때 F2  눌러서 환경설정페이지 들어감

boot탭 -> CDROM을 맨위로 올린후(재부팅시 CDROM을 먼저 읽기위해) 저장.

2, enter, 2, cd, 2, b -s(boot single mode)


root pw 잊어 버렸다고 가정하고,

mount /dev/dsk/c0d0s0 /a  연결한후  (/a 기본적으로 존재하는 디렉토리?)

vi  /a/etc/shadow  에서 root 암호 지우고 저장후 CD바꾸고 sync후 재부팅

    -> 재부팅 하면 암호 묻지 않음



'unix' 카테고리의 다른 글

Solaris NFS server/client 구성하기  (10) 2016.03.08
유닉스 명령어들  (8) 2016.03.08
[VMware] Solaris_9_x86 설치  (8) 2016.03.08