Oracle Database 11g R2 Installation Guide for OEL5(x86) Writer : 이경호
- 1 -
1. 시스템구성 1.1. 개요 1.1.1. 정의 - VMware 7 을이용하여 Oracle Database 11g R2 를설치합니다. 1.1.2. 목적 - 실습을위한 Oracle Database 11g R2 설치가이드를작성합니다. 1.1.3. 환경 - Windows OS : Windows 7 Ultimate K (x64) - Linux OS : Enterprise-R5-i386 (x86) - 가상머신종류 : VMware 7 - 프로세스 : Intel Core i5 CPU M 460 @ 2.53 GHz - 메모리 : 4G 2. 준비사항 Program Version Usage VMware 7.1.3 가상머신설치프로그램 OEL5 OS 2.6.18-238 사용 OS Xmanager 4 OUI, Shell, FTP 지원 Oracle Database 11.2.0.1.0 데이터베이스설치파일 Oracle PatchSet 11.2.0.4.0, 11.2.0.5.0 오라클패치셋파일 - 2 -
3. Oracle Install configuration [ 설명 ] dba 그룹생성및 oracle 유저생성합니다. [root@gz ~]# groupadd -g 5000 dba [root@gz ~]# useradd -g dba -d /home/oracle oracle [root@gz ~]# 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. [ 설명 ] 오라클설치에필요한필수 RPM 패키지를체크합니다. [root@gz ~]# rpm -q ksh make gcc gcc-c++ sysstat binutils glibc glibc-common glibc-devel glibc-headers compat-db compat-libstdc++-33 libaio libaio-devel libgcc libgomp libstdc++ libstdc++-devel unixodbc unixodbc-devel numactl-devel control-center elfutils-libelf ksh-20100202-1.el5_5.1 make-3.81-3.el5 gcc-4.1.2-50.el5 gcc-c++-4.1.2-50.el5 package sysstat is not installed binutils-2.17.50.0.6-14.el5 glibc-2.5-58 glibc-common-2.5-58 glibc-devel-2.5-58 glibc-headers-2.5-58 package compat-db is not installed compat-libstdc++-33-3.2.3-61 libaio-0.3.106-5 package libaio-devel is not installed libgcc-4.1.2-50.el5 libgomp-4.4.4-13.el5 libstdc++-4.1.2-50.el5-3 -
libstdc++-devel-4.1.2-50.el5 package unixodbc is not installed package unixodbc-devel is not installed package numactl-devel is not installed control-center-2.16.0-16.el5 elfutils-libelf-0.137-3.el5 [ 설명 ] 설치가필요한 RPM 패키지를설치합니다. [root@gz Server]# rpm -Uvh sysstat-7.0.2-3.el5_5.1.i386.rpm warning: sysstat-7.0.2-3.el5_5.1.i386.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159 Preparing... ########################################### [100%] 1:sysstat ########################################### [100%] [root@gz Server]# rpm -Uvh libaio-devel-0.3.106-5.i386.rpm warning: libaio-devel-0.3.106-5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159 Preparing... ########################################### [100%] 1:libaio-devel ########################################### [100%] [root@gz Server]# rpm -Uvh unixodbc-2.2.11-7.1.i386.rpm warning: unixodbc-2.2.11-7.1.i386.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159 Preparing... ########################################### [100%] 1:unixODBC ########################################### [100%] [root@gz Server]# rpm -Uvh unixodbc-devel-2.2.11-7.1.i386.rpm warning: unixodbc-devel-2.2.11-7.1.i386.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159 Preparing... ########################################### [100%] 1:unixODBC-devel ########################################### [100%] [root@gz Server]# rpm -Uvh numactl-devel-0.9.8-11.0.1.el5.i386.rpm warning: numactl-devel-0.9.8-11.0.1.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159 Preparing... ########################################### [100%] 1:numactl-devel ########################################### [100%] - 4 -
[ 설명 ] /etc/sysctl.conf 파일에커널매개변수를추가후적용합니다. [root@gz ~]# vi /etc/sysctl.conf # Controls the maximum shared segment size, in bytes #kernel.shmmax = 4294967295 # Controls the maximum number of shared memory segents, in pages #kerne.shmall = 268435456 기존의 kernel.shmmax = 4294967295, kernel.shmall = 268436456 주석처리합니다. # Oracle 11g kernel.shmall= 2097152 kernel.shmmax=2147483648 kernel.shmmni=4096 kernel.sem=250 32000 100 128 fs.file-max=6553600 net.ipv4.ip_local_port_range=1024 65000 net.core.rmem_default=4194304 net.core.rmem_max=4194304 net.core.wmem_default= 262144 net.core.wmem_max= 262144 [ 설명 ] /etc/sysctl.conf 설정을바로적용합니다. [root@gz ~]# /sbin/sysctl -p [ 설명 ] /etc/security/limits.conf 시스템에서사용하는리소스를제한설정합니다. [root@gz ~]# vi /etc/security/limits.conf # Oracle 11g oracle soft nproc 2047 oracle hard nproc 16384 oracle soft nofile 1024 oracle hard nofile 65536 [ 설명 ] /etc/pam.d/login 설정합니다. [root@gz ~]# vi /etc/pam.d/login # Oracle 11g session required /lib/security/pam_limits.so session required pam_limits.so - 5 -
[ 설명 ] /home/oracle 하위에설치파일을옮길 pkg 디렉토리를생성합니다. [root@gz ~]# mkdir -p /home/oracle/pkg [root@gz ~]# cd /home/oracle/pkg [ 설명 ] 설치파일을 Xftp 를이용하여 pkg 디렉토리에복사합니다. [root@gz pkg]# ls linux_11gr2_database_1of2.zip linux_11gr2_database_2of2.zip patchset [ 설명 ] 압축파일압축해제합니다. [root@gz pkg]# unzip linux_11gr2_database_1of2.zip && unzip linux_11gr2_database_2of2.zip [root@gz pkg]# ls database linux_11gr2_database_1of2.zip linux_11gr2_database_2of2.zip patchset [ 설명 ] /home/oracle/.bash_profile 에환경설정추가합니다. [root@gz pkg]# vi /home/oracle/.bash_profile #PATH=$PATH:$HOME/bin #export PATH 기존의 PATH, export 는지우거나위처럼 # 으로주석처리합니다. # Oracle 11g - 6 -
export ORACLE_BASE=/home/oracle export ORACLE_HOME=$ORACLE_BASE/product/11g export ORACLE_SID=testdb export PATH=/usr/sbin:$PATH export PATH=$ORACLE_HOME/bin:$PATH export ORACLE_TERM=xterm export LD_LIBRARY_PATH=$ORACLE_HOME/lib export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib:/usr/lib:/usr/local/lib export CLASSPATH=$ORACLE_HOME/JRE export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib export TEMP=/tmp export TMPDIR=/tmp [ 설명 ] /home/oracle 디렉토리소유권을바꾸고실행권한을부여합니다. [root@gz pkg]# chown -R oracle.dba /home/oracle [root@gz pkg]# chmod 755 /home/oracle [ 설명 ] 여기까지완료되면재부팅후 oracle 계정으로로그인합니다. [root@gz pkg]# reboot Broadcast message from root (pts/1) (Mon Mar 21 14:56:30 2011): The system is going down for reboot NOW! - 7 -
4. Xshell 에서 Xmanager 이용 GUI 사용하기 [ 설명 ] Xmanager 실행합니다. [ 설명 ] 실행 > cmd 입력후확인클릭합니다. [ 설명 ] cmd > ipconfig 입력합니다. [ 설명 ] Xshell 터미널창에서 export DISPLAY= 본인 IPv4 주소 :0.0 입력합니다. [oracle@gz ~]$ export DISPLAY=175.120.32.182:0.0-8 -
5. Oracle 11g (11.2.0.1.0) Database S/W Install [ 설명 ] 설치파일디렉토리로이동합니다. [oracle@gz ~]$ cd /home/oracle/pkg/database/ [oracle@gz database]$./runinstaller [ 설명 ] 오라클지원이메일아이디있으시면입력하시고없으시면 Next 클릭합니다. [ 설명 ] 지원메일을입력하지않으면경고창이뜨게됩니다. Yes 클릭합니다. - 9 -
[ 설명 ] Install database software only 선택후 Next 클릭합니다. [ 설명 ] Single Instance databse installation 선택후 Next 클릭합니다. - 10 -
[ 설명 ] 한글사용을위해 Korean 추가선택후 Next 클릭합니다. [ 설명 ] Enterprise Edition 선택후 Next 클릭합니다. - 11 -
[ 설명 ].bash_profile 에서지정된경로입니다. 확인후 Next 클릭합니다. [ 설명 ] /home 디렉토리에오라클베이스가있다는경고입니다. Yes 클릭합니다. - 12 -
[ 설명 ] 인벤토리경로지정, dba 그룹선택후 Next 클릭합니다. [ 설명 ] 중앙인벤토리는오라클베이스에있다는경고입니다. Yes 클릭합니다. - 13 -
[ 설명 ] 관리자그룹과운영자그룹을 dba 선택후 Next 클릭합니다. [ 설명 ] 설정파일과패키지검사를진행하는화면입니다. - 14 -
[ 설명 ] 메모리와 swap 크기부족으로인한경고입니다. Ignore ALL ( 모두무시 ) 체크후 runfixup.sh 스크립트수행후 Next 클릭합니다. [root@gz ~]# /tmp/cvu_11.2.0.1.0_oracle/runfixup.sh Response file being used is :/tmp/cvu_11.2.0.1.0_oracle/fixup.response Enable file being used is :/tmp/cvu_11.2.0.1.0_oracle/fixup.enable Log file location: /tmp/cvu_11.2.0.1.0_oracle/orarun.log Nothing to fix!! [ 설명 ] 오라클베이스를 /home 아래에사용하지않는것이좋다는경고입니다. Yes 클릭합니다. - 15 -
[ 설명 ] 설치중화면입니다. [ 설명 ] 스크립트 1 번 2 번차례로수행후 OK 클릭합니다. - 16 -
[root@gz ~]# /home/oracle/orainventory/orainstroot.sh Changing permissions of /home/oracle/orainventory. Adding read,write permissions for group. Removing read,write,execute permissions for world. Changing groupname of /home/oracle/orainventory to dba. The execution of the script is complete. [root@gz ~]# /home/oracle/product/11g/root.sh Running Oracle 11g root.sh script... The following environment variables are set as: ORACLE_OWNER= oracle ORACLE_HOME= /home/oracle/product/11g Enter the full pathname of the local bin directory: [/usr/local/bin]: Copying dbhome to /usr/local/bin... Copying oraenv to /usr/local/bin... Copying coraenv to /usr/local/bin... Creating /etc/oratab file... Entries will be added to the /etc/oratab file as needed by Database Configuration Assistant when a database is created Finished running generic part of root.sh script. Now product-specific root actions will be performed. Finished product-specific root actions. - 17 -
[ 설명 ] Close 클릭합니다. 6. Oracle 11g (11.2.0.2.0) PatchSet Install [ 설명 ] 받아놓은 patchset 디렉토리로이동합니다. [oracle@gz ~]$ cd /home/oracle/pkg/patchset/ [oracle@gz patchset]$ ls p10098816_112020_linux_1of7.zip p10098816_112020_linux_6of7.zip p10098816_112020_linux_2of7.zip p10098816_112020_linux_7of7.zip p10098816_112020_linux_3of7.zip p10098816_112020_linux_4of7.zip p10098816_112020_linux_5of7.zip [ 설명 ] 압축해제합니다. [oracle@gz patchset]$ unzip p10098816_112020_linux_1of7.zip && unzip p10098816_112020_linux_2of7.zip && unzip p10098816_112020_linux_3of7.zip && unzip p10098816_112020_linux_4of7.zip && unzip p10098816_112020_linux_5of7.zip && unzip p10098816_112020_linux_6of7.zip && unzip p10098816_112020_linux_7of7.zip - 18 -
[oracle@gz patchset]$ rm -rf p10098816_112020_linux_* [oracle@gz patchset]$ ls client examples database gateways deinstall grid - 19 -