ORACLE
HOME > DB > ORACLE
2017.03.11 / 16:34

oracle 11g R2 ¼³Ä¡ - centos6.5

Mans
Ãßõ ¼ö 289

Ãâó: http://blueray21.tistory.com/21


1. Oracle 11g R2

http://www.oracle.com/technetwork/products/express-edition/downloads/index.html

  • linux_11gR2_database_1of2.zip

  • linux_11gR2_database_2of2.zip


2. ÆÐÅ°Áö È®ÀÎ

http://docs.oracle.com/cd/E11882_01/install.112/e24323/toc.htm#autoId8

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
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
sysstat-7.0.2

 [ray@centos ~]$ sudo yum list binutils compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel elfutils-libelf-devel-static gcc gcc-c++ glibc glibc-common glibc-devel ksh libaio libaio-devel libgcc libgomp libstdc++ libstdc++-devel make sysstat 

  • ¼³Ä¡ ½Ã ¿À·ù¸¦ ÇÇÇϱâ À§Çؼ­ ¸ðµç ¸ðµâÀ» ÃֽŠ¹öÀüÀ¸·Î À¯Áö


3. Oracle °èÁ¤ ¹× µð·ºÅ丮 »ý¼º

3.1 Oracle °èÁ¤ »ý¼º

 [ray@centos ~]$ sudo groupadd oinstall
 [ray@centos ~]$ sudo groupadd dba
 [ray@centos ~]$ sudo useradd -m -g oinstall -G dba oracle
 [ray@centos ~]$ sudo passwd oracle

3.2 µð·ºÅ丮 »ý¼º

 [ray@centos ~]$ sudo mkdir /oracle
 [ray@centos ~]$ sudo chown -R oracle.dba /oracle
 [ray@centos ~]$ sudo chmod -R 755 /oracle


4. Ä¿³Î ÆĶó¹ÌÅÍ ¼³Á¤

4.1 Ä¿³Î ¼öÁ¤

 [ray@centos ~]$ sudo vi /etc/sysctl.conf

1
2
3
4
5
6
7
8
9
10
11
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
fs.aio-max-nr = 1048576
fs.file-max = 6815744
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

  • ÆÄÀÏ ¸Ç ÇÏ´Ü¿¡ Ãß°¡Ç쵂 ¾ø´Â °Í¸¸ Ãß°¡

4.2 Ä¿³Î ¼öÁ¤ ³»¿ª Àû¿ë

 [ray@centos ~]$ sudo /sbin/sysctl -p


5. Oracle »ç¿ëÀÚ °èÁ¤ Shell Limit ¼³Á¤

5.1 /etc/security/limits.conf ÆÄÀÏ ¼öÁ¤

 [ray@centos ~]$ sudo vi /etc/security/limits.conf

1
2
3
4
5
#<domain> <type>    <item>    <value>
oracle  soft    nproc   2047
oracle  hard    nproc   16384
oracle  soft    nofile  1024
oracle  hard    nofile  65536

5.2 /etc/pam.d/login ÆÄÀÏ ¼öÁ¤

 [ray@centos ~]$ sudo vi /etc/pam.d/login

1
session required    pam_limits.so

  • ÆÄÀÏ ¸Ç ÇÏ´Ü¿¡ Ãß°¡

5.3 SELinux ºñÈ°¼ºÈ­

 [ray@centos ~]$ sudo vi /etc/selinux/config

1
SELINUX=disabled

  • ÆÄÀÏ ¸Ç ÇÏ´Ü¿¡ Ãß°¡

6. ȯ°æº¯¼ö

 [ray@centos ~]$ sudo vi /home/oracle/.bash_profile

1
2
3
4
5
6
7
8
9
10
11
PATH=/usr/sbin:$PATH; export PATH
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
 
ORACLE_HOSTNAME=localhost.localdomain; export ORACLE_HOSTNAME
ORACLE_BASE=/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11g; export ORACLE_HOME
ORACLE_HOME_LISTNER=$ORACLE_HOME/bin/lsnrctl; export ORACLE_HOME_LISTNER
ORACLE_SID=ora11; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
PATH=$ORACLE_HOME/bin:$PATH; export PATH

  • °æ·Î¿Í SID µîÀº µÚ¿¡ Oracle ¼³Ä¡ ½Ã µ¿ÀÏÇÏ°Ô Àû¿ëµÇ¾î¾ß ÇÔ.


7. ¼³Ä¡

7.1 ´Ù¿î·ÎµåÇÑ ÆÄÀÏÀ» oracle °èÁ¤À¸·Î FTP Á¢¼ÓÇÏ¿© ¼­¹ö¿¡ ¾÷·Îµå

7.2 oracle °èÁ¤À¸·Î º¯°æ

 [ray@centos ~]$ su - oracle
 Password:
 
 [oracle@centos ~]$

7.3 ¾ÐÃà ÆÄÀÏ ÇØÁ¦

 [oracle@centos ~]$ ls -l
 total 2227312
 -rw-r--r--. 1 oracle oinstall 1285396902 Apr  4 17:06 linux_11gR2_database_1of2.zip
 -rw-r--r--. 1 oracle oinstall  995359177 Apr  4 17:06 linux_11gR2_database_2of2.zip
 [oracle@centos ~]$ unzip linux_11gR2_database_1of2.zip
 [oracle@centos ~]$ unzip linux_11gR2_database_2of2.zip
 [oracle@centos ~]$ ls -l
 total 2227316
 drwxr-xr-x. 8 oracle oinstall       4096 Aug 19  2009 database
 -rw-r--r--. 1 oracle oinstall 1285396902 Apr  4 17:06 linux_11gR2_database_1of2.zip
 -rw-r--r--. 1 oracle oinstall  995359177 Apr  4 17:06 linux_11gR2_database_2of2.zip

7.4 ¼³Ä¡ÇÁ·Î±×·¥ ½ÇÇà

 [oracle@centos ~]$ cd database
 [oracle@centos database]$ ./runInstaller

¸í·É ½ÇÇà ÈÄ '/usr/X11R6/bin/xdpyinfo ¸í·ÉÀ» »ç¿ëÇÏ¿© µð½ºÇ÷¹ÀÌ »ö»ó¿¡ ´ëÇÑ ÀÚµ¿ °Ë»ç¸¦ ½ÇÇàÇÒ ¼ö ¾ø½À´Ï´Ù. DISPLAY º¯¼ö°¡ ¼³Á¤µÇ¾î ÀÖ´ÂÁö È®ÀÎÇϽʽÿÀ.' Error°¡ ¹ß»ýÇϸé root·Î Á¢¼ÓÇÑ µÚ su - oracle·Î °èÁ¤À» ÀüȯÇÏ¿© ÇØ´ç ÆÄÀÏÀ» ÀÐÁö ¸øÇÏ´Â ¿¡·¯ÀÌ´Ù. ·Î±×¾Æ¿ôÇÑ ÈÄ ¾Æ¿¹ oracle °èÁ¤À¸·Î Á¢¼ÓÇϸé ÇØ°áµÊ

7.5 ¼³Ä¡È­¸é


  • üũ¹Ú½º Clear



  • Server Class ¼±ÅÃ



  • Global database nameÀº ora11·Î º¯°æ


  • Inventory Directory´Â /oracle/oraInventory·Î º¯°æ



  • ¼³Ä¡ Áß oracle net configuration assistant failed ¿À·ù ¹ß»ý ½Ã /ets/hosts ÆÄÀÏ¿¡ HOSTNAME Ãß°¡ ÈÄ Retry

 [oracle@centos database]$ su
 Password:

 [root@centos ~]$ cat /etc/sysconfig/network

 NETWORKING=yes
 HOSTNAME=centos
 
[root@centos ~]$ vi /etc/hosts

1
127.0.0.1   centos centos.testdomain





7.6 ¼³Ä¡ ¿Ï·á ÈÄ ROOT ±ÇÇÑÀ¸·Î ½ºÅ©¸³Æ® ¼öÇà

 [root@centos ~]$ /oracle/oraInventory/orainstRoot.sh
 [root@centos ~]$ /oracle/product/11g/root.sh


7.7 ÀÚµ¿½ÇÇà ¼³Á¤

 [root@centos ~]$ vi /etc/oratab

1
ora11:/oracle/product/11g:Y

  • ¸Ç ¸¶Áö¸·ÀÇ NÀ» Y·Î º¯°æ

 [root@centos ~]$ vi /etc/init.d/dbora

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh
ORACLE_BASE=/oracle
ORACLE_HOME=$ORACLE_BASE/product/11g
ORACLE_OWNER=oracle
LOG=$ORACLE_HOME/startup.log
touch $LOG
chmod a+r $LOG
chown oracle:oinstall $LOG
 
case "$1" in
    'start')
        date >> $LOG
        echo "Oracle Start Up..." >> $LOG
        su - $ORACLE_OWNER -c $ORACLE_HOME/bin/dbstart $ORACLE_HOME >> $LOG 2>$1 &
    ;;
    'stop')
        date >> $LOG
        echo "Oracle Shutdown..." >> $LOG
        su - $ORACLE_OWNER -c $ORACLE_HOME/bin/dbshut $ORACLE_HOME >> $LOG 2>$1 &
    ;;
esac

 [root@centos ~]$ chmod +x /etc/init.d/dbora
 [root@centos ~]$ ln -s /etc/init.d/dbora /etc/rc5.d/S99dbora
 [root@centos ~]$ ln -s /etc/init.d/dbora /etc/rc5.d/K11dbora

7.8 Á¤»óÀûÀ¸·Î ±âµ¿µÇ¾ú´ÂÁö È®ÀÎ - oracle °èÁ¤À¸·Î ÀüȯÇÑµÚ ¸í·É¾î ½ÇÇà

 [oracle@centos ~]$ sqlplus / as sysdba

 SQL*Plus: Release 11.2.0.1.0 Production on Wed Apr 4 23:48:43 2012

 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, OLAP, Data Mining and Real Application Testing options

 SQL> select instance_name from v$instance;
 INSTANCE_NAME
 ----------------
 ora11
 
 SQL>




Ãâó: http://dupont3031.tistory.com/entry/oracle-11g-R2-¼³Ä¡-centos65 [²ÉÀÌ ÇÇ´Â ½Ã±â´Â ²É¸¶´Ù ´Ù¸£´Ù.]