I. 개요
1. 사용 Software
| 제품명 | 버전 | 아키텍쳐 | 배포 사이트 |
|---|---|---|---|
| VirtualBox | 4.3.x | 호스트 환경에 따름 | https://www.virtualbox.org |
| Oracle Enterprise Linux | 5 (Update 8 이상 권장) | x86 64bit | |
| Clusterware, Database | 11.2 (11.2.0.4 이상 권장) | x86 64bit | https://support.oracle.com (My Oracle Support 권한 필요) |
| ASMLib | 2.0 | x86 64bit | http://www.oracle.com/technetwork/topics/linux/asmlib/index-101839.html |
Oracle Database 11.2.0.1은 http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html 에서 받을 수 있습니다.
2. 구성 계획
A) 서버
| Memory | Disk | Net Adapter |
|---|---|---|
| 2048MB | 50GB | 브리지 어댑터 |
리눅스 기반의 1 node로 구성합니다.
B) 스토리지
| 파일 이름 | 용량 | 용도 |
|---|---|---|
| DATA1.vdi | 10GB | Data 저장 영역 |
| DATA2.vdi | 10GB | |
| DATA3.vdi | 10GB | |
| DATA4.vdi | 10GB | |
| FRA1.vdi | 10GB | Fast Recovery Area |
| FRA2.vdi | 10GB |
Automatic Storage Management를 이용하여 Data 저장 영역과 Fast Recovery Area를 구성합니다.
디스크 공간을 절약하기 위해 설치 파일은 모두 한 곳에 압축을 풀어 VirtualBox의 Guest Addition 기능으로 VM에서 불러와 사용합니다
3. 호스트 환경
원활한 실습을 위해 64비트 운영체제에 8GB 이상의 메모리가 장착된 환경에서 작업하는 것을 권합니다.
디스크 I/O에 의한 지연을 최소화하기 위해 호스트의 OS가 설치되지 않은 별도의 내장 디스크를 사용하거나 SSD의 사용을 권합니다.
ESATA 또는 USB 3.0 이상의 빠른 속도를 보장하는 외장 디스크를 사용하는 것도 방법일 수 있습니다만 지속적인 연결이 보장되어야 합니다.
II. 리눅스 (OEL 5) 설치

















































III. OS 환경 설정
1. VirtualBox Guest Addition 설치

실습을 위해 VirtualBox에서 구축된 환경에서는 편의를 위해 VBOXADDITIONS (이하 Guest Addition)를 설치해야 합니다.
사용자 이름에 "root"를 입력하고 "엔터"을 입력합니다.

암호에 root 사용자의 암호를 입력하고 "엔터"를 입력합니다.

호스트 머신의 VirtualBox 메뉴에서 '장치' > '게스트 확장 CD 이미지 삽입'을 클릭하여, Guest Addition CD를 mount 시켜줍니다.

Guest Addition 이미지를 mount하면 자동으로 폴더가 열립니다.
VBoxLinuxAdditions.run을 더블 클릭합니다.

실행 여부를 뭍는 창이 나오면 <터미널에서 실행>을 클릭합니다.

자동으로 설치가 진행되며, 설치가 완료되면 자동으로 터미널 창이 닫힙니다.
2. 설치 내역 확인
cat /etc/oracle-release cat /etc/redhat-release lsb_release -id uname -r
[root@oel5 ~]# cat /etc/oracle-release Oracle Linux Server release 5.11 [root@oel5 ~]# cat /etc/redhat-release Red Hat Enterprise Linux Server release 5.11 (Tikanga) [root@oel5 ~]# lsb_release -id Distributor ID: EnterpriseEnterpriseServer Description: Enterprise Linux Enterprise Linux Server release 5.11 (Carthage) [root@oel5 ~]# uname -r 2.6.39-400.215.10.el5uek
설치된 리눅스의 버전 정보를 확인합니다.
설치된 버전에 따라 출력되는 메시지는 다를 수 있습니다.
rpm -q binutils-2.* rpm -q compat-libstdc++-33-* rpm -q elfutils-libelf-0.* rpm -q elfutils-libelf-devel-* rpm -q gcc-4.* rpm -q gcc-c++-4.* rpm -q glibc-2.* rpm -q glibc-common-2.* rpm -q glibc-devel-2.* rpm -q glibc-headers-2.* rpm -q ksh-2* rpm -q libaio-0.* rpm -q libaio-devel-0.* rpm -q libgcc-4.* rpm -q libstdc++-4.* rpm -q libstdc++-devel-4.* rpm -q make-3.* rpm -q sysstat-7.* rpm -q unixODBC-2.* rpm -q unixODBC-devel-2.*
[root@oel5 ~]# rpm -q binutils-2.* binutils-2.17.50.0.6-26.el5 [root@oel5 ~]# rpm -q compat-libstdc++-33-* compat-libstdc++-33-3.2.3-61 [root@oel5 ~]# rpm -q elfutils-libelf-0.* elfutils-libelf-0.137-3.el5 [root@oel5 ~]# rpm -q elfutils-libelf-devel-* elfutils-libelf-devel-0.137-3.el5 [root@oel5 ~]# rpm -q gcc-4.* gcc-4.1.2-55.el5 [root@oel5 ~]# rpm -q gcc-c++-4.* gcc-c++-4.1.2-55.el5 [root@oel5 ~]# rpm -q glibc-2.* glibc-2.5-123.0.1 [root@oel5 ~]# rpm -q glibc-common-2.* glibc-common-2.5-123.0.1 [root@oel5 ~]# rpm -q glibc-devel-2.* glibc-devel-2.5-123.0.1 [root@oel5 ~]# rpm -q glibc-headers-2.* glibc-headers-2.5-123.0.1 [root@oel5 ~]# rpm -q ksh-2* ksh-20100621-20.el5 [root@oel5 ~]# rpm -q libaio-0.* libaio-0.3.106-5 [root@oel5 ~]# rpm -q libaio-devel-0.* libaio-devel-0.3.106-5 [root@oel5 ~]# rpm -q libgcc-4.* libgcc-4.1.2-55.el5 [root@oel5 ~]# rpm -q libstdc++-4.* libstdc++-4.1.2-55.el5 [root@oel5 ~]# rpm -q libstdc++-devel-4.* libstdc++-devel-4.1.2-55.el5 [root@oel5 ~]# rpm -q make-3.* make-3.81-3.el5 [root@oel5 ~]# rpm -q sysstat-7.* sysstat-7.0.2-13.0.1.el5 [root@oel5 ~]# rpm -q unixODBC-2.* unixODBC-2.2.11-10.el5 [root@oel5 ~]# rpm -q unixODBC-devel-2.* unixODBC-devel-2.2.11-10.el5
오라클 소프트웨어 설치를 위해 필요한 OS 패키지가 모두 설치되었는지 확인합니다.
3. 리눅스 설정 변경
<IP> <호스트명>
10.0.1.112 oel5
/etc/hosts 파일에 서버 정보를 추가합니다.
오라클 소프트웨어 설치를 정상적으로 진행하기 위해 정확한 정보를 입력해야 합니다.
tmpfs /dev/shm tmpfs size=1500m 0 0
mount -o remount /dev/shm
기존 값을 #로 주석 처리
#tmpfs /dev/shm tmpfs defaults 0 0 tmpfs /dev/shm tmpfs size=1500m 0 0
[root@oel5 ~]# df -h Filesystem Size Used Avail Use% Mounted on /dev/sda1 46G 2.8G 41G 7% / tmpfs 1011M 0 1011M 0% /dev/shm oracle 233G 84G 150G 36% /media/sf_oracle [root@oel5 ~]# mount -o remount /dev/shm [root@oel5 ~]# df -h Filesystem Size Used Avail Use% Mounted on /dev/sda1 46G 2.8G 41G 7% / tmpfs 1.5G 0 1.5G 0% /dev/shm oracle 233G 84G 150G 36% /media/sf_oracle
오라클의 MEMORY_TARGET 파라미터를 사용하기 위해서 tmpfs를 변경해야 합니다.
기존에 설정된 tmpfs 값은 #로 주석 처리하거나 삭제합니다.
remount하여 바로 적용시킵니다.
fs.aio-max-nr = 1048576 fs.file-max = 6815744 kernel.shmmni = 4096 kernel.sem = 250 32000 100 128 net.ipv4.ip_local_port_range = 9000 65500 # 11g R2 기준 # net.ipv4.ip_local_port_range = 1024 65500 # 11g R1 기준 net.core.rmem_default = 262144 # 11g R2 기준 # net.core.rmem_default = 4194304 # 11g R1 기준 net.core.rmem_max = 4194304 net.core.wmem_default = 262144 net.core.wmem_max = 1048586
커널 변수를 추가하는 작업입니다.
chkconfig --level 123456 xinetd off chkconfig --level 123456 sendmail off chkconfig --level 123456 cups off chkconfig --level 123456 cups-config-daemon off chkconfig --level 123456 smartd off chkconfig --level 123456 iptables off chkconfig --level 123456 ip6tables off chkconfig --level 123456 bluetooth off chkconfig --level 123456 yum-updatesd off
[root@oel5 ~]# chkconfig --level 123456 xinetd off [root@oel5 ~]# chkconfig --level 123456 sendmail off [root@oel5 ~]# chkconfig --level 123456 cups off [root@oel5 ~]# chkconfig --level 123456 cups-config-daemon off [root@oel5 ~]# chkconfig --level 123456 smartd off [root@oel5 ~]# chkconfig --level 123456 iptables off [root@oel5 ~]# chkconfig --level 123456 ip6tables off [root@oel5 ~]# chkconfig --level 123456 bluetooth off [root@oel5 ~]# chkconfig --level 123456 yum-updatesd off
추가적인 리소스 확보를 위해 기본적으로 실행중인 불필요한 OS 프로그램을 off 시킵니다.
4. 그룹 및 사용자 설정 변경
# groupadd oinstall # groupadd dba groupadd oper groupadd asmdba groupadd asmoper groupadd asmadmin usermod -g oinstall -G dba,oper,asmdba,asmadmin,vboxsf oracle useradd -g oinstall -G dba,asmdba,asmoper,asmadmin,vboxsf grid id oracle id grid passwd oracle passwd grid
[root@oel5 ~]# groupadd oper [root@oel5 ~]# groupadd asmadmin [root@oel5 ~]# groupadd asmdba [root@oel5 ~]# groupadd asmoper [root@oel5 ~]# usermod -g oinstall -G oinstall,dba,oper,asmdba,asmadmin,vboxsf oracle [root@oel5 ~]# useradd -g oinstall -G oinstall,dba,asmdba,asmoper,asmadmin,vboxsf grid [root@oel5 ~]# id oracle uid=54321(oracle) gid=54321(oinstall) groups=54321(oinstall),54322(dba),160(vboxsf),54323(oper),54324(asmadmin),54325(asmdba) [root@oel5 ~]# id grid uid=54322(grid) gid=54321(oinstall) groups=54321(oinstall),54322(dba),160(vboxsf),54324(asmadmin),54325(asmdba),54326(asmoper) [root@oel5 ~]# passwd oracle Changing password for user oracle. New UNIX password: BAD PASSWORD: it is based on a dictionary word Retype new UNIX password: passwd: all authentication tokens updated successfully. [root@oel5 ~]# passwd grid Changing password for user grid. New UNIX password: BAD PASSWORD: it is based on a dictionary word Retype new UNIX password: passwd: all authentication tokens updated successfully.
설치를 진행할 사용자 계정과 그룹을 생성 또는 추가합니다.
oracle-validated 패키지가 설치되었다면 oracle 유저와 oinstall, dba 그룹은 이미 생성되어 있습니다.
vboxsf 그룹은 VirtualBox의 Guest Addition을 사용하기 위한 그룹으로, 실제 운영 환경에서 Guest Addition을 사용하지 않는다면 추가하지 않습니다.
passwd 명령어로 각 계정의 암호를 지정해주면 됩니다.
oracle soft nproc 2047 oracle hard nproc 16384 oracle soft nofile 1024 oracle hard nofile 65536 grid hard nproc 16384 grid hard nofile 65536
리소스 제한을 위한 사용자별 설정값을 입력합니다.
오라클을 설치하는 OS 계정에 맞게 oracle 또는 grid 유저별로 제한값을 입력합니다.
mkdir -p /u01/app/oracle/product chown -R grid:oinstall /u01 chmod -R 770 /u01
[root@oel6 ~]# mkdir -p /u01/app/oracle/product [root@oel6 ~]# chown -R grid:oinstall /u01 [root@oel6 ~]# chmod -R 770 /u01
오라클 소프트웨어 설치를 위한 경로를 생성하고, 해당 경로에 대한 권한과 소유권을 수정합니다.
export TMP=/tmp export TMPDIR=$TMP export EDITOR=vi export ORACLE_BASE=/u01/app/oracle export GRID_HOME=$ORACLE_BASE/11.2.0/grid export DB_HOME=$ORACLE_BASE/product/11.2.0/db_1 export ORACLE_HOME=$GRID_HOME export ORACLE_SID=+ASM export ORACLE_TERM=xterm export BASE_PATH=/usr/sbin:$PATH export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$GRID_HOME/bin:$BASE_PATH export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib export NLS_LANG=AMERICAN_KOREA.AL32UTF8 export PS1='[\u@$ORACLE_SID \W]$ '
grid 계정으로 접속한 후에 .bash_profile을 수정합니다.
root계정에서 grid 유저로 접속하려면 아래와 같이 su 명령을 입력하면 됩니다
su - grid
수정이 완료되고 root 유저로 돌아오려면 exit 명령을 grid 유저에서 실행하면 됩니다.
exit
export TMP=/tmp export TMPDIR=$TMP export EDITOR=vi export ORACLE_BASE=/u01/app/oracle export GRID_HOME=$ORACLE_BASE/11.2.0/grid export DB_HOME=$ORACLE_BASE/product/11.2.0/db_1 export ORACLE_HOME=$DB_HOME export ORACLE_SID=orcl export ORACLE_TERM=xterm export BASE_PATH=/usr/sbin:$PATH export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$GRID_HOME/bin:$BASE_PATH export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib export NLS_LANG=AMERICAN_KOREA.AL32UTF8 export PS1='[\u@$ORACLE_SID \W]$ '
마찬가지로 oracle 계정으로 접속하여 .bash_profile을 수정합니다.
oracle 유저로 변경하려면 아래와 같이 su 명령을 입력하면 됩니다
su - oracle
IV. ASM 스토리지 설정
1. 디스크 생성 (호스트에서 수행)
vboxmanage createmedium disk --filename DATA1.vdi --size 10240 --format VDI vboxmanage createmedium disk --filename DATA2.vdi --size 10240 --format VDI vboxmanage createmedium disk --filename DATA3.vdi --size 10240 --format VDI vboxmanage createmedium disk --filename DATA4.vdi --size 10240 --format VDI vboxmanage createmedium disk --filename FRA1.vdi --size 10240 --format VDI vboxmanage createmedium disk --filename FRA2.vdi --size 10240 --format VDI
Host 컴퓨터에서 VM에 연결시킬 DATA와 Fast Recovery Area 디스크를 각각 10GB 사이즈로 생성합니다.
VirtualBox의 GUI 툴을 사용하여 생성해도 됩니다.
2. 디스크 설정 (게스트에서 수행)
fdisk /dev/sdb ### "n", "p", "1", "엔터", "엔터", "w" 입력 fdisk /dev/sdc ### "n", "p", "1", "엔터", "엔터", "w" 입력 fdisk /dev/sdd ### "n", "p", "1", "엔터", "엔터", "w" 입력 fdisk /dev/sde ### "n", "p", "1", "엔터", "엔터", "w" 입력 fdisk /dev/sdf ### "n", "p", "1", "엔터", "엔터", "w" 입력 fdisk /dev/sdg ### "n", "p", "1", "엔터", "엔터", "w" 입력 ls -ls /dev/sd*
[root@oel5 ~]# fdisk /dev/sdb Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel Building a new DOS disklabel. Changes will remain in memory only, until you decide to write them. After that, of course, the previous content won't be recoverable. The number of cylinders for this disk is set to 1305. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK) Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite) Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 1 First cylinder (1-1305, default 1): Using default value 1 Last cylinder or +size or +sizeM or +sizeK (1-1305, default 1305): Using default value 1305 Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks. [root@oel5 ~]# fdisk /dev/sdc Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel Building a new DOS disklabel. Changes will remain in memory only, until you decide to write them. After that, of course, the previous content won't be recoverable. The number of cylinders for this disk is set to 1305. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK) Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite) Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 1 First cylinder (1-1305, default 1): Using default value 1 Last cylinder or +size or +sizeM or +sizeK (1-1305, default 1305): Using default value 1305 Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks. [root@oel5 ~]# fdisk /dev/sdd Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel Building a new DOS disklabel. Changes will remain in memory only, until you decide to write them. After that, of course, the previous content won't be recoverable. The number of cylinders for this disk is set to 1305. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK) Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite) Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 1 First cylinder (1-1305, default 1): Using default value 1 Last cylinder or +size or +sizeM or +sizeK (1-1305, default 1305): Using default value 1305 Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks. [root@oel5 ~]# fdisk /dev/sde Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel Building a new DOS disklabel. Changes will remain in memory only, until you decide to write them. After that, of course, the previous content won't be recoverable. The number of cylinders for this disk is set to 1305. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK) Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite) Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 1 First cylinder (1-1305, default 1): Using default value 1 Last cylinder or +size or +sizeM or +sizeK (1-1305, default 1305): Using default value 1305 Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks. [root@oel5 ~]# fdisk /dev/sdf Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel Building a new DOS disklabel. Changes will remain in memory only, until you decide to write them. After that, of course, the previous content won't be recoverable. The number of cylinders for this disk is set to 1305. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK) Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite) Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 1 First cylinder (1-1305, default 1): Using default value 1 Last cylinder or +size or +sizeM or +sizeK (1-1305, default 1305): Using default value 1305 Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks. [root@oel5 ~]# fdisk /dev/sdg Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel Building a new DOS disklabel. Changes will remain in memory only, until you decide to write them. After that, of course, the previous content won't be recoverable. The number of cylinders for this disk is set to 1305. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK) Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite) Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 1 First cylinder (1-1305, default 1): Using default value 1 Last cylinder or +size or +sizeM or +sizeK (1-1305, default 1305): Using default value 1305 Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks. [root@oel5 ~]# ls -ls /dev/sd* 0 brw-r----- 1 root disk 8, 0 5월 6 16:29 /dev/sda 0 brw-r----- 1 root disk 8, 1 5월 6 07:29 /dev/sda1 0 brw-r----- 1 root disk 8, 2 5월 6 16:29 /dev/sda2 0 brw-r----- 1 root disk 8, 16 5월 6 16:53 /dev/sdb 0 brw-r----- 1 root disk 8, 17 5월 6 16:53 /dev/sdb1 0 brw-r----- 1 root disk 8, 32 5월 6 16:53 /dev/sdc 0 brw-r----- 1 root disk 8, 33 5월 6 16:53 /dev/sdc1 0 brw-r----- 1 root disk 8, 48 5월 6 16:53 /dev/sdd 0 brw-r----- 1 root disk 8, 49 5월 6 16:54 /dev/sdd1 0 brw-r----- 1 root disk 8, 64 5월 6 16:54 /dev/sde 0 brw-r----- 1 root disk 8, 65 5월 6 16:54 /dev/sde1 0 brw-r----- 1 root disk 8, 80 5월 6 16:54 /dev/sdf 0 brw-r----- 1 root disk 8, 81 5월 6 16:54 /dev/sdf1 0 brw-r----- 1 root disk 8, 96 5월 6 16:54 /dev/sdg 0 brw-r----- 1 root disk 8, 97 5월 6 16:54 /dev/sdg1
VM에 디스크를 모두 연결시키고, 디스크를 모두 포맷합니다.
디스크 전체를 마운트 시킬 것 이므로 모두 단일 파티션으로 포맷합니다.
cd <Grid 설치 파일 압축 해제 경로>/grid/rpm rpm -ivh cvuqdisk-* cd <패키지 다운로드 경로> rpm -ivh oracleasmlib-*
[root@oel5 ~]# cd /media/sf_oracle/grid/rpm [root@oel5 rpm]# rpm -ivh cvuqdisk-1.0.9-1.rpm 준비 중... ########################################### [100%] Using default group oinstall to install package 1:cvuqdisk ########################################### [100%] [root@oel5 rpm]# cd /media/sf_oracle [root@oel5 sf_oracle]# rpm -ivh oracleasmlib-2.0.4-1.el5.i386.rpm 경고: oracleasmlib-2.0.4-1.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159 준비 중... ########################################### [100%] 1:oracleasmlib ########################################### [100%]
Grid Infrastructure (이하 GI)를 설치하기 위해 패키지를 추가로 설치해야 합니다.
cvuqdisk 패키지는 GI 설치 파일에서 구할 있으며, ASM library 패키지(Red Hat Linux 5 계열 32bit)는 아래 경로에서 다운 받을 수 있습니다.
http://download.oracle.com/otn_software/asmlib/oracleasmlib-2.0.4-1.el5.i386.rpm
oracleasm configure oracleasm configure -i oracleasm configure
[root@oel5 ~]# oracleasm configure
ORACLEASM_ENABLED=false
ORACLEASM_UID=
ORACLEASM_GID=
ORACLEASM_SCANBOOT=true
ORACLEASM_SCANORDER=""
ORACLEASM_SCANEXCLUDE=""
ORACLEASM_USE_LOGICAL_BLOCK_SIZE="false"
[root@oel5 ~]# oracleasm configure -i
Configuring the Oracle ASM library driver.
This will configure the on-boot properties of the Oracle ASM library
driver. The following questions will determine whether the driver is
loaded on boot and what permissions it will have. The current values
will be shown in brackets ('[]'). Hitting <ENTER> without typing an
answer will keep that current value. Ctrl-C will abort.
Default user to own the driver interface []: grid
Default group to own the driver interface []: asmadmin
Start Oracle ASM library driver on boot (y/n) [n]: y
Scan for Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration: done
[root@oel5 ~]# oracleasm configure
ORACLEASM_ENABLED=true
ORACLEASM_UID=grid
ORACLEASM_GID=asmadmin
ORACLEASM_SCANBOOT=true
ORACLEASM_SCANORDER=""
ORACLEASM_SCANEXCLUDE=""
ORACLEASM_USE_LOGICAL_BLOCK_SIZE="false"
ASM library에 대한 추가적인 환경 설정(사용자, 그룹, 부팅시 활성화, 부팅시 스캔 여부)을 해줍니다.
reboot
설정된 내용을 적용하기 위해 재부팅을 합니다.
oracleasm createdisk DATA1 /dev/sdb1 oracleasm createdisk DATA2 /dev/sdc1 oracleasm createdisk DATA3 /dev/sdd1 oracleasm createdisk DATA4 /dev/sde1 oracleasm createdisk FRA1 /dev/sdf1 oracleasm createdisk FRA2 /dev/sdg1 oracleasm scandisks oracleasm listdisks
[root@oel5 ~]# oracleasm createdisk DATA1 /dev/sdb1 Writing disk header: done Instantiating disk: done [root@oel5 ~]# oracleasm createdisk DATA2 /dev/sdc1 Writing disk header: done Instantiating disk: done [root@oel5 ~]# oracleasm createdisk DATA3 /dev/sdd1 Writing disk header: done Instantiating disk: done [root@oel5 ~]# oracleasm createdisk DATA4 /dev/sde1 Writing disk header: done Instantiating disk: done [root@oel5 ~]# oracleasm createdisk FRA1 /dev/sdf1 Writing disk header: done Instantiating disk: done [root@oel5 ~]# oracleasm createdisk FRA2 /dev/sdg1 Writing disk header: done Instantiating disk: done [root@oel5 ~]# oracleasm scandisks Reloading disk partitions: done Cleaning any stale ASM disks... Scanning system for ASM disks... [root@oel5 ~]# oracleasm listdisks DATA1 DATA2 DATA3 DATA4 FRA1 FRA2
VM에 마운트된 디스크를 각각 ASM Disk로 할당해줍니다.
순서대로 마운트가 되었다면, 왼쪽의 명령으로 디스크를 생성하면 됩니다.
V. Grid 설치
cd <설치 파일 압축 해제 경로>/grid ./runInstaller












[root@oel5 ~]# /u01/app/oraInventory/orainstRoot.sh
다음 권한 변경 중/u01/app/oraInventory.
그룹에 대한 읽기, 쓰기 권한을 추가하는 중입니다.
월드에 대한 읽기, 쓰기, 실행 권한을 제거하는 중입니다.
그룹 이름 변경 중 /u01/app/oraInventory 대상 oinstall.
스크립트 실행이 완료되었습니다.
[root@oel5 ~]# /u01/app/oracle/11.2.0/grid/root.sh
Performing root user operation for Oracle 11g
The following environment variables are set as:
ORACLE_OWNER= grid
ORACLE_HOME= /u01/app/oracle/11.2.0/grid
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 script.
Now product-specific root actions will be performed.
Using configuration parameter file: /u01/app/oracle/11.2.0/grid/crs/install/crsconfig_params
Creating trace directory
LOCAL ADD MODE
Creating OCR keys for user 'grid', privgrp 'oinstall'..
Operation successful.
LOCAL ONLY MODE
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
CRS-4664: Node oel5 successfully pinned.
Adding Clusterware entries to inittab
oel5 2017/05/06 17:27:21 /u01/app/oracle/11.2.0/grid/cdata/oel5/backup_20170506_172721.olr
Successfully configured Oracle Grid Infrastructure for a Standalone Server


[grid@oel5 ~]$ crsctl stat res -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
ONLINE ONLINE oel5
ora.LISTENER.lsnr
ONLINE ONLINE oel5
ora.asm
ONLINE ONLINE oel5 Started
ora.ons
OFFLINE OFFLINE oel5
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cssd
1 ONLINE ONLINE oel5
ora.diskmon
1 OFFLINE OFFLINE
ora.evmd
1 ONLINE ONLINE oel5
VI. DBMS 설치
cd <설치 파일 압축 해제 경로>/database ./runInstaller













[root@oel5 ~]# /u01/app/oracle/product/11.2.0/db_1/root.sh
Performing root user operation for Oracle 11g
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/product/11.2.0/db_1
Enter the full pathname of the local bin directory: [/usr/local/bin]:
The contents of "dbhome" have not changed. No need to overwrite.
The contents of "oraenv" have not changed. No need to overwrite.
The contents of "coraenv" have not changed. No need to overwrite.
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 script.
Now product-specific root actions will be performed.
Finished product-specific root actions.

VII. ASM Disk Group 생성
1. ASMCA 실행
asmca






VIII. Patch 적용
1. 패치 환경 설정
export ORACLE_BASE=/u01/app/oracle export GRID_HOME=$ORACLE_BASE/11.2.0/grid export DB_HOME=$ORACLE_BASE/product/11.2.0/db_1 chmod 770 $GRID_HOME
[root@oel5 ~]# export ORACLE_BASE=/u01/app/oracle [root@oel5 ~]# export GRID_HOME=$ORACLE_BASE/11.2.0/grid [root@oel5 ~]# export DB_HOME=$ORACLE_BASE/product/11.2.0/db_1 [root@oel5 ~]# chmod 770 $GRID_HOME
패치 작업은 root 유저로 진행됩니다.
수월한 작업을 위해 환경 변수를 먼저 설정합니다.
2. Grid 패치
A) OPatch 업데이트
cd $GRID_HOME OPatch/opatch version mv OPatch OPatch.old cp -r /media/sf_oracle/OPatch . chown -R grid:oinstall OPatch ll | grep OPatch OPatch/opatch version
[root@oel5 ~]# cd $GRID_HOME [root@oel5 grid]# OPatch/opatch version OPatch Version: 11.2.0.3.4 OPatch succeeded. [root@oel5 grid]# mv OPatch OPatch.old [root@oel5 grid]# cp -r /media/sf_oracle/OPatch . [root@oel5 grid]# chown -R grid:oinstall OPatch [root@oel5 grid]# ll | grep OPatch drwxr-x--- 15 grid oinstall 4096 5월 6 20:40 OPatch drwxr-xr-x 8 grid oinstall 4096 5월 6 17:25 OPatch.old [root@oel5 grid]# OPatch/opatch version OPatch Version: 11.2.0.3.15 OPatch succeeded.
먼저 OPatch 파일을 최신 버전으로 업데이트 합니다.
GI가 설치된 경로에 있는 파일을 먼저 업데이트 합니다.
B) 패치 현황 조사
opatch lsinventory
[grid@oel5 ~]$ opatch lsinventory Oracle Interim 패치 설치 프로그램 버전 11.2.0.3.15 Copyright (c) 2017, Oracle Corporation. All rights reserved. Oracle Home : /u01/app/oracle/11.2.0/grid Central Inventory : /u01/app/oraInventory from : /u01/app/oracle/11.2.0/grid/oraInst.loc OPatch version : 11.2.0.3.15 OUI version : 11.2.0.4.0 Log file location : /u01/app/oracle/11.2.0/grid/cfgtoollogs/opatch/opatch2017-05-06_20-45-13오후_1.log Lsinventory Output file location : /u01/app/oracle/11.2.0/grid/cfgtoollogs/opatch/lsinv/lsinventory2017-05-06_20-45-13오후.txt -------------------------------------------------------------------------------- Local Machine Information:: Hostname: oel5 ARU platform id: 46 ARU platform description:: Linux x86 설치된 최상위 레벨 제품(1): Oracle Grid Infrastructure 11g 11.2.0.4.0 이 Oracle 홈에 1개의 제품이 설치되어 있습니다. 이 Oracle 홈에 설치된 Interim 패치가 없습니다. -------------------------------------------------------------------------------- OPatch succeeded.
패치 현황을 조사합니다.
기본적인 소프트웨어 설치만 진행한 상태라면 아무것도 패치되지 않은 것으로 나옵니다.
C) Response File 생성
cd $GRID_HOME/OPatch/ocm/bin ./emocmrsp
[grid@oel5 ~]$ cd $GRID_HOME/OPatch/ocm/bin [grid@oel5 bin]$ ./emocmrsp OCM Installation Response Generator 10.3.7.0.0 - Production Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. Provide your email address to be informed of security issues, install and initiate Oracle Configuration Manager. Easier for you if you use your My Oracle Support Email address/User Name. Visit http://www.oracle.com/support/policies.html for details. Email address/User Name: You have not provided an email address for notification of security issues. Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]: y The OCM configuration response file (ocm.rsp) was successfully created. [grid@oel5 bin]$ ls emocmrsp ocm.rsp
패치 작업에 필요한 response file을 생성합니다.
D) 패치
export ORACLE_HOME=$GRID_HOME $GRID_HOME/OPatch/opatch auto /media/sf_oracle/25476126 -ocmrf $GRID_HOME/OPatch/ocm/bin/ocm.rsp
[root@oel5 ~]# export ORACLE_HOME=$GRID_HOME [root@oel5 ~]# $GRID_HOME/OPatch/opatch auto /media/sf_oracle/25476126 -ocmrf $GRID_HOME/OPatch/ocm/bin/ocm.rsp Executing /u01/app/oracle/11.2.0/grid/perl/bin/perl /u01/app/oracle/11.2.0/grid/OPatch/crs/patch11203.pl -patchdir /media/sf_oracle -patchn 25476126 -ocmrf /u01/app/oracle/11.2.0/grid/OPatch/ocm/bin/ocm.rsp -paramfile /u01/app/oracle/11.2.0/grid/crs/install/crsconfig_params This is the main log file: /u01/app/oracle/11.2.0/grid/cfgtoollogs/opatchauto2017-05-06_20-52-11.log This file will show your detected configuration and all the steps that opatchauto attempted to do on your system: /u01/app/oracle/11.2.0/grid/cfgtoollogs/opatchauto2017-05-06_20-52-11.report.log 2017-05-06 20:52:11: Starting Oracle Restart Patch Setup Using configuration parameter file: /u01/app/oracle/11.2.0/grid/crs/install/crsconfig_params Stopping CRS... Stopped CRS successfully patch /media/sf_oracle/25476126/24732075 apply successful for home /u01/app/oracle/11.2.0/grid patch /media/sf_oracle/25476126/23054319 apply successful for home /u01/app/oracle/11.2.0/grid patch /media/sf_oracle/25476126/22502505 apply successful for home /u01/app/oracle/11.2.0/grid Starting CRS... CRS-4123: Oracle High Availability Services has been started. opatch auto succeeded.
E) 패치 결과
opatch lsinventory
[grid@oel5 ~]$ opatch lsinventory
Oracle Interim 패치 설치 프로그램 버전 11.2.0.3.15
Copyright (c) 2017, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/oracle/11.2.0/grid
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/11.2.0/grid/oraInst.loc
OPatch version : 11.2.0.3.15
OUI version : 11.2.0.4.0
Log file location : /u01/app/oracle/11.2.0/grid/cfgtoollogs/opatch/opatch2017-05-06_21-09-59오후_1.log
Lsinventory Output file location : /u01/app/oracle/11.2.0/grid/cfgtoollogs/opatch/lsinv/lsinventory2017-05-06_21-09-59오후.txt
--------------------------------------------------------------------------------
Local Machine Information::
Hostname: oel5
ARU platform id: 46
ARU platform description:: Linux x86
설치된 최상위 레벨 제품(1):
Oracle Grid Infrastructure 11g 11.2.0.4.0
이 Oracle 홈에 1개의 제품이 설치되어 있습니다.
Interim 패치(3):
Patch 22502505 : applied on Sat May 06 20:59:28 KST 2017
Unique Patch ID: 19945546
Patch description: "ACFS Patch Set Update : 11.2.0.4.160419 (22502505)"
Created on 4 Mar 2016, 00:05:12 hrs PST8PDT
Bugs fixed:
21369858, 16318126, 19690653, 17503605, 17203009, 17359415, 20140148
17611362, 17164243, 19053182, 17696547, 17488768, 18168684, 21519796
18143006, 21208140, 17428148, 17070158, 20438706, 17510275, 17172303
18610307, 17376318, 17721778, 22198405, 17699423, 18915417, 18155334
18321597, 19919907, 18185024, 17636008, 17363999, 20681968, 17475946
Patch 23054319 : applied on Sat May 06 20:59:04 KST 2017
Unique Patch ID: 20240506
Patch description: "OCW Patch Set Update : 11.2.0.4.160719 (23054319)"
Created on 16 Jul 2016, 02:33:14 hrs PST8PDT
Bugs fixed:
18328800, 19270660, 18691572, 18508710, 20038451, 21251192, 22162062
20365005, 21232394, 17387214, 17750548, 17617807, 14497275, 20219458
17733927, 18180541, 23757020, 18962892, 17292250, 17378618, 16759171
20110156, 17843489, 17065496, 13991403, 21694632, 17273020, 22762046
17155238, 18261183, 18053580, 20012766, 21245437, 20218012, 17013634
17886392, 20995001, 17039197, 16317771, 17947785, 10052729, 20340620
22353346, 16237657, 20317221, 18199185, 15917869, 18399991, 20186278
18024089, 17374271, 16849642, 20246071, 20746251, 14270845, 20552947
18414137, 18882642, 17001914, 17927970, 14378120, 16346413, 15986647
18068871, 21222147, 16206997, 18143836, 21982225, 19168690, 18343490
20235511, 21875360, 16613232, 19276791, 17722664, 20440643, 12928658
18226143, 18520351, 16249829, 18952577, 17172091, 18229842, 16076412
18265482, 20676340, 17818075, 20091753, 18231837, 14373486, 17483479
20136892, 20551654, 18120545, 18729166, 13843841, 17405302, 21225209
18709496, 18330979, 18744838, 14525998, 18187697, 17087371, 20531190
20598625, 14385860, 18348155, 19479503, 12928592, 17516024, 18370031
17764053, 19272663, 17551223, 14671408, 18272135, 14207615, 21255373
17500165, 18875012, 14769643, 19558324, 18464784, 18848125, 19241857
17955615, 14851828, 14693336, 20315294, 16284825, 17352230, 20014326
17238586, 17089344, 17405605, 17531342, 21327402, 19398098, 17159489
17640316, 13823394, 16543190, 22024217, 17983675, 20795241, 17481314
18346135, 17598201, 16281493, 15986311, 17208793, 19601468, 18999857
18700935, 14076173, 18428146, 17435488, 18352845, 18352846, 20408163
17592037, 19616601, 17387779, 17391726, 14777968, 15851860, 16206882
20141091, 15832129, 17305100, 20175174, 21113068, 19885321, 16901346
17985714, 18536826, 17780903, 18752378, 18946768, 16876500, 16875342
17769597, 19955755, 16429265, 18336452, 17273003, 17209968, 16988311
19319357, 20094984, 17046460, 17059927, 18053631, 16867761, 18774591
21442094, 20235486, 19359787, 15869775, 17447588, 19642566, 21152052
16798862, 15920201
Patch 24732075 : applied on Sat May 06 20:57:24 KST 2017
Unique Patch ID: 21176427
Patch description: "Database Patch Set Update : 11.2.0.4.170418 (24732075)"
Created on 20 Feb 2017, 02:20:08 hrs PST8PDT
Sub-patch 24006111; "Database Patch Set Update : 11.2.0.4.161018 (24006111)"
Sub-patch 23054359; "Database Patch Set Update : 11.2.0.4.160719 (23054359)"
Sub-patch 22502456; "Database Patch Set Update : 11.2.0.4.160419 (22502456)"
Sub-patch 21948347; "Database Patch Set Update : 11.2.0.4.160119 (21948347)"
Sub-patch 21352635; "Database Patch Set Update : 11.2.0.4.8 (21352635)"
Sub-patch 20760982; "Database Patch Set Update : 11.2.0.4.7 (20760982)"
Sub-patch 20299013; "Database Patch Set Update : 11.2.0.4.6 (20299013)"
Sub-patch 19769489; "Database Patch Set Update : 11.2.0.4.5 (19769489)"
Sub-patch 19121551; "Database Patch Set Update : 11.2.0.4.4 (19121551)"
Sub-patch 18522509; "Database Patch Set Update : 11.2.0.4.3 (18522509)"
Sub-patch 18031668; "Database Patch Set Update : 11.2.0.4.2 (18031668)"
Sub-patch 17478514; "Database Patch Set Update : 11.2.0.4.1 (17478514)"
Bugs fixed:
17184721, 21538558, 16091637, 18092127, 17381384, 15979965, 18441944
13837378, 16314254, 16731148, 17835048, 13558557, 17201159, 17853498
17246576, 18356166, 18440047, 18681862, 16875449, 19788842, 17296856
21330264, 14010183, 17648596, 17551063, 17025461, 17267114, 22507210
17912217, 17889583, 18202441, 17040764, 16524926, 17478145, 19358317
22148226, 18747196, 18641419, 17036973, 17811789, 14285317, 16542886
18009564, 16618694, 8322815, 16692232, 18247991, 22507234, 17570240
17848897, 17441661, 14034426, 17465741, 16596890, 17437634, 20506706
21343897, 21453153, 18339044, 22321741, 17951233, 18430495, 21787056
22380919, 20506715, 17811429, 19721304, 18230522, 19554106, 19458377
17612828, 6599380, 22092979, 22321756, 17040527, 17811438, 18641461
14657740, 13364795, 21387964, 17346671, 17588480, 18235390, 17889549
19309466, 16472716, 20596234, 18331850, 18641451, 17344412, 21179898
24842886, 17546761, 18203835, 18964939, 18203838, 18203837, 17313525
22195457, 18139690, 16837842, 22296366, 14106803, 17842825, 22657942
21352646, 20657441, 16360112, 22195441, 17389192, 14565184, 17205719
18440095, 22195448, 14354737, 14764829, 13944971, 16571443, 21868720
17186905, 17080436, 18673342, 22905130, 17027426, 19972569, 19972568
19972566, 17282229, 19972564, 16870214, 19615136, 17390431, 18762750
16613964, 18098207, 17957017, 18471685, 19730508, 21538485, 18264060
17323222, 17754782, 17600719, 18317531, 17852463, 17596908, 17655634
16228604, 20074391, 19972570, 18996843, 19854503, 16042673, 17835627
20334344, 18000422, 20861693, 17393683, 17551709, 20506699, 19006849
18456514, 18277454, 17258090, 17174582, 17242746, 16399083, 17824637
17762296, 17397545, 16450169, 12364061, 20067212, 18856999, 19211724
19463893, 21343775, 19463897, 17853456, 18673304, 20004021, 21668627
16194160, 17477958, 16538760, 12982566, 20296213, 18293054, 17610798
19699191, 18135678, 17311728, 16785708, 10136473, 24560906, 17786518
18315328, 18334586, 12747740, 19032867, 18096714, 17390160, 17232014
16422541, 18673325, 18155762, 14015842, 19827973, 22683225, 17726838
18554871, 23177648, 18051556, 20803583, 17922254, 15990359, 21972320
18282562, 16855292, 16668584, 21343838, 20299015, 17446237, 18093615
17694209, 17288409, 17274537, 13955826, 16934803, 17634921, 17501491
16315398, 22683212, 17006183, 13829543, 18191164, 17655240, 19393542
18384391, 21538567, 16198143, 21847223, 17892268, 20142975, 19584068
17165204, 18508861, 21756699, 16901385, 18554763, 18189036, 17443671
17385178, 17936109, 14829250, 20925795, 17478514, 16850630, 13951456
16595641, 15861775, 14054676, 16912439, 17299889, 17297939, 18619917
16833527, 17798953, 17816865, 18607546, 17571306, 21286665, 17341326
17851160, 20558005, 17586955, 19049453, 21051840, 17587063, 16956380
18328509, 14133975, 18061914, 21051833, 18522509, 18765602, 18199537
17332800, 13609098, 18384537, 22502493, 14338435, 17945983, 21067387
16392068, 17752995, 21051862, 25505382, 17237521, 16863422, 18244962
19544839, 24433711, 17156148, 18973907, 17877323, 17449815, 18180390
17088068, 17037130, 20004087, 19466309, 25505371, 11733603, 18084625
21051858, 18674024, 21051852, 18091059, 25369547, 16306373, 18306996
19915271, 18193833, 17787259, 20631274, 16344544, 14692762, 18614015
17346091, 18228645, 17721717, 18436307, 21756677, 11883252, 17891943
22353199, 16384983, 19121551, 12816846, 17982555, 17761775, 22243719
25505394, 17265217, 17071721, 16721594, 21756661, 18262334, 15913355
17891946, 17672719, 17602269, 17239687, 17042658, 17238511, 17811456
17284817, 17752121, 17394950, 16579084, 17011832, 22195465, 14602788
18325460, 24476265, 24476274, 12611721, 16903536, 17006570, 16043574
18783224, 16494615, 21526048, 19197175, 16069901, 17811447, 17308789
22195477, 17865671, 19013183, 17343514, 18316692, 17325413, 16180763
17348614, 14368995, 21983325, 17393915, 16285691, 20331945, 17883081
24316947, 17705023, 17614227, 22195485, 14084247, 13645875, 16777840
19727057, 14852021, 18744139, 18674047, 17716305, 18482502, 17622427
19289642, 22195492, 14458214, 18723434, 17767676, 25505407, 19258504
17786278, 17082983, 21351877, 13498382, 18331812, 16065166, 18031668
22893153, 16943711, 21517440, 17649265, 13866822, 18094246, 24528741
14245531, 17783588, 17082359, 20448824, 18280813, 23330119, 16268425
17302277, 18018515, 17215560, 24411921, 19271443, 17016369, 20777150
23330124, 20441797, 19769489, 25093656, 17545847, 18260550, 13853126
23536835, 17227277, 9756271, 18868646, 17614134, 17546973, 19680952
18704244, 18828868, 18273830, 17050888, 17360606, 16992075, 17375354
12905058, 18362222, 17571039, 17468141, 18436647, 17235750, 21168487
16220077, 16929165
--------------------------------------------------------------------------------
OPatch succeeded.
3. DBMS 패치
A) OPatch 업데이트
cd $DB_HOME mv OPatch OPatch.old cp -r /media/sf_oracle/OPatch . chown -R oracle:oinstall OPatch OPatch/opatch version
[root@oel5 ~]# cd $DB_HOME [root@oel5 db_1]# mv OPatch OPatch.old [root@oel5 db_1]# cp -r /media/sf_oracle/OPatch . [root@oel5 db_1]# chown -R oracle:oinstall OPatch [root@oel5 db_1]# OPatch/opatch version OPatch Version: 11.2.0.3.15 OPatch succeeded.
B) 패치 현황 조사
opatch lsinventory
[oracle@oel5 ~]$ opatch lsinventory Oracle Interim 패치 설치 프로그램 버전 11.2.0.3.15 Copyright (c) 2017, Oracle Corporation. All rights reserved. Oracle Home : /u01/app/oracle/product/11.2.0/db_1 Central Inventory : /u01/app/oraInventory from : /u01/app/oracle/product/11.2.0/db_1/oraInst.loc OPatch version : 11.2.0.3.15 OUI version : 11.2.0.4.0 Log file location : /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2017-05-06_20-46-49오후_1.log Lsinventory Output file location : /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2017-05-06_20-46-49오후.txt -------------------------------------------------------------------------------- Local Machine Information:: Hostname: oel5 ARU platform id: 46 ARU platform description:: Linux x86 설치된 최상위 레벨 제품(1): Oracle Database 11g 11.2.0.4.0 이 Oracle 홈에 1개의 제품이 설치되어 있습니다. 이 Oracle 홈에 설치된 Interim 패치가 없습니다. -------------------------------------------------------------------------------- OPatch succeeded.
C) Response File 생성
cd $DB_HOME/OPatch/ocm/bin ./emocmrsp
[oracle@oel5 ~]$ cd $DB_HOME/OPatch/ocm/bin [oracle@oel5 bin]$ ./emocmrsp OCM Installation Response Generator 10.3.7.0.0 - Production Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. Provide your email address to be informed of security issues, install and initiate Oracle Configuration Manager. Easier for you if you use your My Oracle Support Email address/User Name. Visit http://www.oracle.com/support/policies.html for details. Email address/User Name: You have not provided an email address for notification of security issues. Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]: y The OCM configuration response file (ocm.rsp) was successfully created. [oracle@oel5 bin]$ ls emocmrsp ocm.rsp
D) 패치 적용
export ORACLE_HOME=$DB_HOME $DB_HOME/OPatch/opatch auto /media/sf_oracle/25476126 -oh $DB_HOME -ocmrf $DB_HOME/OPatch/ocm/bin/ocm.rsp
[root@oel5 ~]# export ORACLE_HOME=$DB_HOME [root@oel5 ~]# $DB_HOME/OPatch/opatch auto /media/sf_oracle/25476126 -oh $DB_HOME -ocmrf $DB_HOME/OPatch/ocm/bin/ocm.rsp Executing /u01/app/oracle/11.2.0/grid/perl/bin/perl /u01/app/oracle/product/11.2.0/db_1/OPatch/crs/patch11203.pl -patchdir /media/sf_oracle -patchn 25476126 -oh /u01/app/oracle/product/11.2.0/db_1 -ocmrf /u01/app/oracle/product/11.2.0/db_1/OPatch/ocm/bin/ocm.rsp -paramfile /u01/app/oracle/11.2.0/grid/crs/install/crsconfig_params This is the main log file: /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatchauto2017-05-06_21-04-56.log This file will show your detected configuration and all the steps that opatchauto attempted to do on your system: /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatchauto2017-05-06_21-04-56.report.log 2017-05-06 21:04:56: Starting Oracle Restart Patch Setup Using configuration parameter file: /u01/app/oracle/11.2.0/grid/crs/install/crsconfig_params Stopping RAC /u01/app/oracle/product/11.2.0/db_1 ... Stopped RAC /u01/app/oracle/product/11.2.0/db_1 successfully patch /media/sf_oracle/25476126/24732075 apply successful for home /u01/app/oracle/product/11.2.0/db_1 patch /media/sf_oracle/25476126/23054319/custom/server/23054319 apply successful for home /u01/app/oracle/product/11.2.0/db_1 Starting RAC /u01/app/oracle/product/11.2.0/db_1 ... Started RAC /u01/app/oracle/product/11.2.0/db_1 successfully opatch auto succeeded.
response file을 사용하여 패치를 진행합니다.
E) 패치 결과
opatch lsinventory
[oracle@oel5 ~]$ opatch lsinventory
Oracle Interim 패치 설치 프로그램 버전 11.2.0.3.15
Copyright (c) 2017, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/oracle/product/11.2.0/db_1
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/11.2.0/db_1/oraInst.loc
OPatch version : 11.2.0.3.15
OUI version : 11.2.0.4.0
Log file location : /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2017-05-06_21-10-26오후_1.log
Lsinventory Output file location : /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2017-05-06_21-10-26오후.txt
--------------------------------------------------------------------------------
Local Machine Information::
Hostname: oel5
ARU platform id: 46
ARU platform description:: Linux x86
설치된 최상위 레벨 제품(1):
Oracle Database 11g 11.2.0.4.0
이 Oracle 홈에 1개의 제품이 설치되어 있습니다.
Interim 패치(2):
Patch 23054319 : applied on Sat May 06 21:08:42 KST 2017
Unique Patch ID: 20240506
Patch description: "OCW Patch Set Update : 11.2.0.4.160719 (23054319)"
Created on 16 Jul 2016, 02:33:05 hrs PST8PDT
Bugs fixed:
18328800, 19270660, 18691572, 18508710, 20038451, 21251192, 22162062
20365005, 21232394, 17387214, 17750548, 17617807, 14497275, 20219458
17733927, 18180541, 23757020, 18962892, 17292250, 17378618, 16759171
20110156, 17843489, 17065496, 13991403, 21694632, 17273020, 22762046
17155238, 18261183, 18053580, 20012766, 21245437, 20218012, 17013634
17886392, 20995001, 17039197, 16317771, 17947785, 10052729, 20340620
22353346, 16237657, 20317221, 18199185, 15917869, 18399991, 20186278
18024089, 17374271, 16849642, 20246071, 20746251, 14270845, 20552947
18414137, 18882642, 17001914, 17927970, 14378120, 16346413, 15986647
18068871, 21222147, 16206997, 18143836, 21982225, 19168690, 18343490
20235511, 21875360, 16613232, 19276791, 17722664, 20440643, 12928658
18226143, 18520351, 16249829, 18952577, 17172091, 18229842, 16076412
18265482, 20676340, 17818075, 20091753, 18231837, 14373486, 17483479
20136892, 20551654, 18120545, 18729166, 13843841, 17405302, 21225209
18709496, 18330979, 18744838, 14525998, 18187697, 17087371, 20531190
20598625, 14385860, 18348155, 19479503, 12928592, 17516024, 18370031
17764053, 19272663, 17551223, 14671408, 18272135, 14207615, 21255373
17500165, 18875012, 14769643, 19558324, 18464784, 18848125, 19241857
17955615, 14851828, 14693336, 20315294, 16284825, 17352230, 20014326
17238586, 17089344, 17405605, 17531342, 21327402, 19398098, 17159489
17640316, 13823394, 16543190, 22024217, 17983675, 20795241, 17481314
18346135, 17598201, 16281493, 15986311, 17208793, 19601468, 18999857
18700935, 14076173, 18428146, 17435488, 18352845, 18352846, 20408163
17592037, 19616601, 17387779, 17391726, 14777968, 15851860, 16206882
20141091, 15832129, 17305100, 20175174, 21113068, 19885321, 16901346
17985714, 18536826, 17780903, 18752378, 18946768, 16876500, 16875342
17769597, 19955755, 16429265, 18336452, 17273003, 17209968, 16988311
19319357, 20094984, 17046460, 17059927, 18053631, 16867761, 18774591
21442094, 20235486, 19359787, 15869775, 17447588, 19642566, 21152052
16798862, 15920201
Patch 24732075 : applied on Sat May 06 21:07:31 KST 2017
Unique Patch ID: 21176427
Patch description: "Database Patch Set Update : 11.2.0.4.170418 (24732075)"
Created on 20 Feb 2017, 02:20:08 hrs PST8PDT
Sub-patch 24006111; "Database Patch Set Update : 11.2.0.4.161018 (24006111)"
Sub-patch 23054359; "Database Patch Set Update : 11.2.0.4.160719 (23054359)"
Sub-patch 22502456; "Database Patch Set Update : 11.2.0.4.160419 (22502456)"
Sub-patch 21948347; "Database Patch Set Update : 11.2.0.4.160119 (21948347)"
Sub-patch 21352635; "Database Patch Set Update : 11.2.0.4.8 (21352635)"
Sub-patch 20760982; "Database Patch Set Update : 11.2.0.4.7 (20760982)"
Sub-patch 20299013; "Database Patch Set Update : 11.2.0.4.6 (20299013)"
Sub-patch 19769489; "Database Patch Set Update : 11.2.0.4.5 (19769489)"
Sub-patch 19121551; "Database Patch Set Update : 11.2.0.4.4 (19121551)"
Sub-patch 18522509; "Database Patch Set Update : 11.2.0.4.3 (18522509)"
Sub-patch 18031668; "Database Patch Set Update : 11.2.0.4.2 (18031668)"
Sub-patch 17478514; "Database Patch Set Update : 11.2.0.4.1 (17478514)"
Bugs fixed:
17184721, 21538558, 16091637, 18092127, 17381384, 15979965, 18441944
13837378, 16314254, 16731148, 17835048, 13558557, 17201159, 17853498
17246576, 18356166, 18440047, 18681862, 16875449, 19788842, 17296856
21330264, 14010183, 17648596, 17551063, 17025461, 17267114, 22507210
17912217, 17889583, 18202441, 17040764, 16524926, 17478145, 19358317
22148226, 18747196, 18641419, 17036973, 17811789, 14285317, 16542886
18009564, 16618694, 8322815, 16692232, 18247991, 22507234, 17570240
17848897, 17441661, 14034426, 17465741, 16596890, 17437634, 20506706
21343897, 21453153, 18339044, 22321741, 17951233, 18430495, 21787056
22380919, 20506715, 17811429, 19721304, 18230522, 19554106, 19458377
17612828, 6599380, 22092979, 22321756, 17040527, 17811438, 18641461
14657740, 13364795, 21387964, 17346671, 17588480, 18235390, 17889549
19309466, 16472716, 20596234, 18331850, 18641451, 17344412, 21179898
24842886, 17546761, 18203835, 18964939, 18203838, 18203837, 17313525
22195457, 18139690, 16837842, 22296366, 14106803, 17842825, 22657942
21352646, 20657441, 16360112, 22195441, 17389192, 14565184, 17205719
18440095, 22195448, 14354737, 14764829, 13944971, 16571443, 21868720
17186905, 17080436, 18673342, 22905130, 17027426, 19972569, 19972568
19972566, 17282229, 19972564, 16870214, 19615136, 17390431, 18762750
16613964, 18098207, 17957017, 18471685, 19730508, 21538485, 18264060
17323222, 17754782, 17600719, 18317531, 17852463, 17596908, 17655634
16228604, 20074391, 19972570, 18996843, 19854503, 16042673, 17835627
20334344, 18000422, 20861693, 17393683, 17551709, 20506699, 19006849
18456514, 18277454, 17258090, 17174582, 17242746, 16399083, 17824637
17762296, 17397545, 16450169, 12364061, 20067212, 18856999, 19211724
19463893, 21343775, 19463897, 17853456, 18673304, 20004021, 21668627
16194160, 17477958, 16538760, 12982566, 20296213, 18293054, 17610798
19699191, 18135678, 17311728, 16785708, 10136473, 24560906, 17786518
18315328, 18334586, 12747740, 19032867, 18096714, 17390160, 17232014
16422541, 18673325, 18155762, 14015842, 19827973, 22683225, 17726838
18554871, 23177648, 18051556, 20803583, 17922254, 15990359, 21972320
18282562, 16855292, 16668584, 21343838, 20299015, 17446237, 18093615
17694209, 17288409, 17274537, 13955826, 16934803, 17634921, 17501491
16315398, 22683212, 17006183, 13829543, 18191164, 17655240, 19393542
18384391, 21538567, 16198143, 21847223, 17892268, 20142975, 19584068
17165204, 18508861, 21756699, 16901385, 18554763, 18189036, 17443671
17385178, 17936109, 14829250, 20925795, 17478514, 16850630, 13951456
16595641, 15861775, 14054676, 16912439, 17299889, 17297939, 18619917
16833527, 17798953, 17816865, 18607546, 17571306, 21286665, 17341326
17851160, 20558005, 17586955, 19049453, 21051840, 17587063, 16956380
18328509, 14133975, 18061914, 21051833, 18522509, 18765602, 18199537
17332800, 13609098, 18384537, 22502493, 14338435, 17945983, 21067387
16392068, 17752995, 21051862, 25505382, 17237521, 16863422, 18244962
19544839, 24433711, 17156148, 18973907, 17877323, 17449815, 18180390
17088068, 17037130, 20004087, 19466309, 25505371, 11733603, 18084625
21051858, 18674024, 21051852, 18091059, 25369547, 16306373, 18306996
19915271, 18193833, 17787259, 20631274, 16344544, 14692762, 18614015
17346091, 18228645, 17721717, 18436307, 21756677, 11883252, 17891943
22353199, 16384983, 19121551, 12816846, 17982555, 17761775, 22243719
25505394, 17265217, 17071721, 16721594, 21756661, 18262334, 15913355
17891946, 17672719, 17602269, 17239687, 17042658, 17238511, 17811456
17284817, 17752121, 17394950, 16579084, 17011832, 22195465, 14602788
18325460, 24476265, 24476274, 12611721, 16903536, 17006570, 16043574
18783224, 16494615, 21526048, 19197175, 16069901, 17811447, 17308789
22195477, 17865671, 19013183, 17343514, 18316692, 17325413, 16180763
17348614, 14368995, 21983325, 17393915, 16285691, 20331945, 17883081
24316947, 17705023, 17614227, 22195485, 14084247, 13645875, 16777840
19727057, 14852021, 18744139, 18674047, 17716305, 18482502, 17622427
19289642, 22195492, 14458214, 18723434, 17767676, 25505407, 19258504
17786278, 17082983, 21351877, 13498382, 18331812, 16065166, 18031668
22893153, 16943711, 21517440, 17649265, 13866822, 18094246, 24528741
14245531, 17783588, 17082359, 20448824, 18280813, 23330119, 16268425
17302277, 18018515, 17215560, 24411921, 19271443, 17016369, 20777150
23330124, 20441797, 19769489, 25093656, 17545847, 18260550, 13853126
23536835, 17227277, 9756271, 18868646, 17614134, 17546973, 19680952
18704244, 18828868, 18273830, 17050888, 17360606, 16992075, 17375354
12905058, 18362222, 17571039, 17468141, 18436647, 17235750, 21168487
16220077, 16929165
--------------------------------------------------------------------------------
OPatch succeeded.
IX. Database 생성
chmod 770 /u01/app/oracle/admin chmod 775 /u01/app/oracle/cfgtoollogs
[root@oel5 ~]# chmod 770 /u01/app/oracle/admin [root@oel5 ~]# chmod 775 /u01/app/oracle/cfgtoollogs
dbca
































{}