Step 1: 오라클설치를 위한 관련 패키지 설치
먼저 "Oracle Public Yum" 레파지토리가 제공하는 "oracle-rdbms-server-11gR2-preinstall" 패키지를 다운로드한다. 오라클 공개 yum 레파지토리는 무료로 가장 쉽게 Linux 환경에서 Oracle 설치를 위하여 필요한 것들을 자동으로 설치하는 기능을 제공하고 있다.yum 레파지토리는 아래와 같은 방법으로 구성은 한다. root 계정으로 wget 명령을 사용하여 yum 설정 파일을 /etc/yum.repos.d/ 경로에 다운로드한다.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # cd /etc/yum.repos.d # wget https://public-yum.oracle.com/public-yum-ol6.repo --no-check-certificate --2014-03-10 18:12:02-- https: //public-yum .oracle.com /public-yum-ol6 .repo Resolving public-yum.oracle.com... 173.223.227.26, 173.223.227.10 Connecting to public-yum.oracle.com|173.223.227.26|:443... connected. WARNING: certificate common name “a248.e.akamai.net” doesn’t match requested host name “public-yum.oracle.com”. HTTP request sent, awaiting response... 200 OK Length: 4233 (4.1K) [text /plain ] Saving to: “public-yum-ol6.repo” 100%[======================================>] 4,233 --.-K /s in 0s 2014-03-10 18:12:03 (370 MB /s ) - “public-yum-ol6.repo” saved [4233 /4233 ] |
이제 아래와 같이 yum 명령을 실행하여 사전에 필요한 것들을 설치한다.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 | #yum install oracle-rdbms-server-11gR2-preinstall Loaded plugins: fastestmirror, refresh-packagekit, security Determining fastest mirrors
* base: ftp .daum.net
* extras: ftp .daum.net
* updates: ftp .daum.net Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package oracle-rdbms-server-11gR2-preinstall.x86_64 0:1.0-9.el6 will be installed --> Processing Dependency: gcc for package: oracle-rdbms-server-11gR2-preinstall-1.0-9.el6.x86_64 --> Processing Dependency: gcc-c++ for package: oracle-rdbms-server-11gR2-preinstall-1.0-9.el6.x86_64 --> Processing Dependency: kernel-uek for package: oracle-rdbms-server-11gR2-preinstall-1.0-9.el6.x86_64 --> Processing Dependency: compat-libcap1 for package: oracle-rdbms-server-11gR2-preinstall-1.0-9.el6.x86_64 --> Processing Dependency: ksh for package: oracle-rdbms-server-11gR2-preinstall-1.0-9.el6.x86_64 --> Processing Dependency: libaio-devel for package: oracle-rdbms-server-11gR2-preinstall-1.0-9.el6.x86_64 --> Processing Dependency: compat-libstdc++-33 for package: oracle-rdbms-server-11gR2-preinstall-1.0-9.el6.x86_64 --> Processing Dependency: libstdc++-devel for package: oracle-rdbms-server-11gR2-preinstall-1.0-9.el6.x86_64 --> Running transaction check ---> Package compat-libcap1.x86_64 0:1.10-1 will be installed ---> Package compat-libstdc++-33.x86_64 0:3.2.3-69.el6 will be installed ---> Package gcc.x86_64 0:4.4.7-4.el6 will be installed --> Processing Dependency: cpp = 4.4.7-4.el6 for package: gcc-4.4.7-4.el6.x86_64 --> Processing Dependency: cloog-ppl >= 0.15 for package: gcc-4.4.7-4.el6.x86_64 ---> Package gcc-c++.x86_64 0:4.4.7-4.el6 will be installed --> Processing Dependency: libmpfr.so.1()(64bit) for package: gcc-c++-4.4.7-4.el6.x86_64 ---> Package kernel-uek.x86_64 0:2.6.39-400.214.3.el6uek will be installed --> Processing Dependency: kernel-uek-firmware = 2.6.39-400.214.3.el6uek for package: kernel-uek-2.6.39-400.214.3.el6uek.x86_64 ---> Package ksh.x86_64 0:20120801-10.el6_5.3 will be installed ---> Package libaio-devel.x86_64 0:0.3.107-10.el6 will be installed ---> Package libstdc++-devel.x86_64 0:4.4.7-4.el6 will be installed --> Running transaction check ---> Package cloog-ppl.x86_64 0:0.15.7-1.2.el6 will be installed --> Processing Dependency: libppl_c.so.2()(64bit) for package: cloog-ppl-0.15.7-1.2.el6.x86_64 --> Processing Dependency: libppl.so.7()(64bit) for package: cloog-ppl-0.15.7-1.2.el6.x86_64 ---> Package cpp.x86_64 0:4.4.7-4.el6 will be installed ---> Package kernel-uek-firmware.noarch 0:2.6.39-400.214.3.el6uek will be installed ---> Package mpfr.x86_64 0:2.4.1-6.el6 will be installed --> Running transaction check ---> Package ppl.x86_64 0:0.10.2-11.el6 will be installed --> Finished Dependency Resolution Dependencies Resolved ================================================================================
Package Arch Version Repository Size ================================================================================ Installing:
oracle-rdbms-server-11gR2-preinstall
x86_64 1.0-9.el6 ol6_latest 17 k Installing for dependencies:
cloog-ppl x86_64 0.15.7-1.2.el6 base 93 k
compat-libcap1 x86_64 1.10-1 base 17 k
compat-libstdc++-33 x86_64 3.2.3-69.el6 base 183 k
cpp x86_64 4.4.7-4.el6 base 3.7 M
gcc x86_64 4.4.7-4.el6 base 10 M
gcc-c++ x86_64 4.4.7-4.el6 base 4.7 M
kernel-uek x86_64 2.6.39-400.214.3.el6uek ol6_UEK_latest 28 M
kernel-uek-firmware noarch 2.6.39-400.214.3.el6uek ol6_UEK_latest 3.6 M
ksh x86_64 20120801-10.el6_5.3 ol6_latest 756 k
libaio-devel x86_64 0.3.107-10.el6 base 13 k
libstdc++-devel x86_64 4.4.7-4.el6 base 1.6 M
mpfr x86_64 2.4.1-6.el6 base 157 k
ppl x86_64 0.10.2-11.el6 base 1.3 M Transaction Summary ================================================================================ Install 14 Package(s) Total download size: 54 M Installed size: 175 M Is this ok [y /N ]: Y Downloading Packages: warning: rpmts_HdrFromFdno: Header V3 RSA /SHA256 Signature, key ID ec551f03: NOKEY Retrieving key from file : ///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle Importing GPG key 0xEC551F03:
Userid: "Oracle OSS group (Open Source Software group) <BUILD oss.oracle.com=" ">"
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle Is this ok [y /N ]: y Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction
Installing : mpfr-2.4.1-6.el6.x86_64 1 /14
Installing : libstdc++-devel-4.4.7-4.el6.x86_64 2 /14
Installing : cpp-4.4.7-4.el6.x86_64 3 /14
Installing : kernel-uek-firmware-2.6.39-400.214.3.el6uek.noarch 4 /14
Installing : kernel-uek-2.6.39-400.214.3.el6uek.x86_64 5 /14
Installing : ppl-0.10.2-11.el6.x86_64 6 /14
Installing : cloog-ppl-0.15.7-1.2.el6.x86_64 7 /14
Installing : gcc-4.4.7-4.el6.x86_64 8 /14
Installing : gcc-c++-4.4.7-4.el6.x86_64 9 /14
Installing : compat-libstdc++-33-3.2.3-69.el6.x86_64 10 /14
Installing : libaio-devel-0.3.107-10.el6.x86_64 11 /14
Installing : ksh-20120801-10.el6_5.3.x86_64 12 /14
Installing : compat-libcap1-1.10-1.x86_64 13 /14
Installing : oracle-rdbms-server-11gR2-preinstall-1.0-9.el6.x86_64 14 /14
Verifying : compat-libcap1-1.10-1.x86_64 1 /14
Verifying : ksh-20120801-10.el6_5.3.x86_64 2 /14
Verifying : libstdc++-devel-4.4.7-4.el6.x86_64 3 /14
Verifying : cpp-4.4.7-4.el6.x86_64 4 /14
Verifying : kernel-uek-2.6.39-400.214.3.el6uek.x86_64 5 /14
Verifying : libaio-devel-0.3.107-10.el6.x86_64 6 /14
Verifying : oracle-rdbms-server-11gR2-preinstall-1.0-9.el6.x86_64 7 /14
Verifying : compat-libstdc++-33-3.2.3-69.el6.x86_64 8 /14
Verifying : mpfr-2.4.1-6.el6.x86_64 9 /14
Verifying : gcc-4.4.7-4.el6.x86_64 10 /14
Verifying : gcc-c++-4.4.7-4.el6.x86_64 11 /14
Verifying : ppl-0.10.2-11.el6.x86_64 12 /14
Verifying : cloog-ppl-0.15.7-1.2.el6.x86_64 13 /14
Verifying : kernel-uek-firmware-2.6.39-400.214.3.el6uek.noarch 14 /14 Installed:
oracle-rdbms-server-11gR2-preinstall.x86_64 0:1.0-9.el6 Dependency Installed:
cloog-ppl.x86_64 0:0.15.7-1.2.el6
compat-libcap1.x86_64 0:1.10-1
compat-libstdc++-33.x86_64 0:3.2.3-69.el6
cpp.x86_64 0:4.4.7-4.el6
gcc.x86_64 0:4.4.7-4.el6
gcc-c++.x86_64 0:4.4.7-4.el6
kernel-uek.x86_64 0:2.6.39-400.214.3.el6uek
kernel-uek-firmware.noarch 0:2.6.39-400.214.3.el6uek
ksh.x86_64 0:20120801-10.el6_5.3
libaio-devel.x86_64 0:0.3.107-10.el6
libstdc++-devel.x86_64 0:4.4.7-4.el6
mpfr.x86_64 0:2.4.1-6.el6
ppl.x86_64 0:0.10.2-11.el6 Complete! < /BUILD > |
1 | #wget https://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6 -O /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle --no-check-certificate |
Step 2: Oracle 계정 설정
먼저 "oracle" 계정의 패스워드를 설정한다.1 2 3 4 5 6 | # passwd oracle Changing password for user oracle. New password: BAD PASSWORD: it is based on a dictionary word Retype new password: passwd : all authentication tokens updated successfully. |
1 2 3 4 5 6 7 | # Default limit for number of user's processes to prevent # accidental fork bombs. # See rhbz #432903 for reasoning. * soft nproc 1024 # To this * - nproc 16384 |
"/etc/selinux/config" 파일을 수정하여 SELinux 값을 permissive 로 설정한다.
1 2 3 4 5 6 7 8 9 10 11 12 | # This file controls the state of SELinux on the system. # SELINUX= can take one of these three values: # enforcing - SELinux security policy is enforced. # permissive - SELinux prints warnings instead of enforcing. # disabled - No SELinux policy is loaded. #SELINUX=enforcing SELINUX=permissive # SELINUXTYPE= can take one of these two values: # targeted - Targeted processes are protected, # mls - Multi Level Security protection. SELINUXTYPE=targeted |
변경사항을 적용하기 위하여 서버를 "reboot" 한다. oracle 계정으로 로그인한 다음 .bash_profile 파일(홈 경로에 위치)을 수정한다. 경로는 서버의 환경에 맞게 수정하면 된다.
1 | # vi .bash_profile |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | # Get the aliases and functions if [ -f ~/.bashrc ]; then
. ~/.bashrc fi # User specific environment and startup programs PATH=$PATH:$HOME /bin export PATH umask 022 export ORACLE_BASE= /app/oracle export ORACLE_SID=11GR2 export ORACLE_HOME=$ORACLE_BASE /product/11 .2.0 /dbhome_1 export ORA_NLS10=$ORACLE_HOME /nls/data export TNS_ADMIN=$ORACLE_HOME /network/admin export LD_LIBRARY_PATH=$ORACLE_HOME /lib : /usr/lib export NLS_LANG=AMERICAN_AMERICA.KO16KSC5601 export PATH=$PATH:.:$ORACLE_HOME /bin : /usr/ccs/bin : /usr/sbin : /sbin : /usr/bin : /bin : /usr/X11R6/bin : /usr/bin/X11 export EDITOR= vi export PS1= '$LOGNAME@`hostname`:$PWD>' |
1 2 | # mkdir -p /app/oracle/product/11.2.0/dbhome_1 # chown -R oracle.dba /app/oracle |
Step3 : 오라클 소프트웨어 다운로드
오라클 소프트웨어는 2개의 zip 파일로 구성되어 있는데 이 파일들을 “/home/oracle/" 로 다운로드한다. 압축을 풀면 database 이름의 폴더가 생성된다.
1 2 | #unzip V17530-01_1of2.zip #unzip V17530-01_2of2.zip |
Step3 : 오라클 소프트웨어 설치
설치는 반듯이 oracle 계정으로 진행한다.database 폴더로 이동하여 runInstaller 을 실행하여 설치를 진행한다.
1. (보안패치 관련 메일을 받지않는 것으로 하여 메일을 설정하지 않고 넘어감.)
2. Create and configure a database 선택
3.Server Class 선택
4. Single instance database installation 선택
5.Typical install 선택
Typical install을 선택하여 설치하면 문자셋(CHARACTER SET) NLS_CHARACTERSET 값은 "AL32UTF8", NLS_LANGUAGE 값은 AMERICAN 으로 설치가 된다. 이를 설치시에 변경하려면 Advenced Install 을 선택하여 설치를 진행하여야 한다. (AL32UTF8 은 때문에 한글 입력은 지원됨).
참고로 한글을 지원하는 문자셋(CHARACTER SET)은 3가지 있다고 한다.
- KO16KSC5601 : 완성형 한글 - 2350자의 한글, 4888자의 한자, 히라카나, 카타카나, 영문 및 기호.
- KO16MSWIN949 : 확장 완성형 - KO16KSC5601을 그대로 포함하고 추가로 현대한글조합 가능한 8822자까지 표현.
- UTF8/AL32UTF8 : 가변길이 한글표현에 최대 3바이트 (AL32UTF8은 6바이트) 유니코드는 잘 알려진 바와 같이 현대 한글 11172자를 모두 가나다 순으로 잘 정렬된 상태로 포함.
6. Administrative password 를 입력한다. 여기에서는 Database file location 을 다른 파티션으로 지정하였다.
7. Inventory 를 생성한다.
8. 필수 사항 검사에서 아래와 같은 문제가 보여진다. 그냥 전체 무시 (ignore all)을 선택하고 진행하여도 설치가 진행된다. (참고한 문서에서 제시한 방식으로는 해결이 불가함)
9. 계속 지시사항에 따라 설치를 진행하면 됨다.
마직막으로 방화벽을 사용하고 있다면 1521 포트를 개방하면 된다.
출처: http://www.tecmint.com/oracle-database-11g-release-2-installation-in-linux/