1.필요 패키지 확인
Setarch와 compat-libstdc++은 없어도 됨.
# rpm -q(a) gcc make binutils openmotif setarch compat-db libaio compat-libstdc++
1.유저 추가(계정생성)
groupadd oinstall
groupadd dba
useradd -m -g oinstall -G dba oracle
passwd oracle
1.디렉토리 생성
mkdir -p /oracle/product/11.2.0/db_1
chown -R oracle:oinstall /oracle
chmod –R 775 /oracle
1.IP 설정.
127.0.0.1 localhost.localdomain localhost
192.168.2.181 oracle
1.커널 파라미터 수정
Add or amend the following lines in the "/etc/sysctl.conf" file.
fs.suid_dumpable = 1
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
# semaphores: semmsl, semmns, semopm, semmni
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default=4194304
net.core.rmem_max=4194304
net.core.wmem_default=262144
net.core.wmem_max=1048586
1.커널 수정 내역 적용
/sbin/sysctl –p
1.오라클 사용자 계정 Shell Limit 설정
Add the following lines to the "/etc/security/limits.conf" file.
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 4096
oracle hard nofile 65536
oracle soft stack 10240
1./etc/pam.d/login 파일 수정
session required pam_limits.so
추가.
1.Selinux 비활성화
/etc/selinux/config
SELINUX=disabled
1.환경변수
Login as the oracle user and add the following lines at the end of the ".bash_profile" file, remembering to adjust them for your specific installation.
# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
ORACLE_HOSTNAME=ol5-112.localdomain; export ORACLE_HOSTNAME
ORACLE_UNQNAME=DB11G; export ORACLE_UNQNAME
ORACLE_BASE=/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1; export ORACLE_HOME
ORACLE_SID=DB11G; export ORACLE_SID
PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
1.설치
Log into the oracle user. If you are using X emulation then set the DISPLAY environmental variable.
DISPLAY=<machine-name>:0.0; export DISPLAY
Start the Oracle Universal Installer (OUI) by issuing the following command in the database directory.
su – oracle
./runInstaller
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 |
7.8 정상적으로 기동되었는지 확인
[oracle@centos ~]$ sqlplus / as sysdba |
'DB > Oracle' 카테고리의 다른 글
[Oracle] System 용량 부족 - oracle DB 접속 에러 (1) | 2016.03.06 |
---|---|
[Oracle] Oracle Error 17002 “Io Exception: The Network Adapter could not establish the connection (0) | 2016.03.06 |
Oracle 설치 [2/2] (0) | 2016.03.06 |
[Query] like and not like (0) | 2016.03.06 |