본문 바로가기

DBMS

리눅스 Oracle 11g 설치

반응형
Oracle 11g DB 설치 조건은 RAM 4GB, SWAP 2GB 이상이다.

의존 라이브러리 설치
# yum -y install compat-libstdc++-33.x86_64 binutils elfutils-libelf elfutils-libelf-devel
# yum -y install glibc glibc-common glibc-devel glibc-headers gcc gcc-c++ libaio-devel
# yum -y install libaio libgcc libstdc++ libstdc++ make sysstat unixODBC unixODBC-devel
# yum -y install unzip
# yum -y install compat-libstdc++-33.x86_64 binutils elfutils-libelf elfutils-libelf-devel

파라미터 및 유저 리소스 설정
1) 커널 파라미터 값 설정
# vi /etc/sysctl.conf
아래 내용 추가
# Controls the maximum shared segment size, in bytes
kernel.shmmax = 68719476736

# Controls the maximum number of shared memory segments, in pages
kernel.shmall = 10523004
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128

fs.aio-max-nr = 1048576
fs.file-max = 6815744

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

2) 파라미터 값 적용
# /sbin/sysctl -p

3) 유저 자원 사용 제한 설정
# vi /etc/security/limits.conf
oracle soft nproc 2048
oracle hard nproc 65536
oracle soft nofile 1024
oracle hard nofile 65536

4) SELINUX 설정
# vi /etc/selinux/config
# 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=disabled


유저 생성, 환경변수, 권한 설정
오라클을 사용할 유저를 생성하고 패스워드를 설정.

# groupadd dba
# useradd -g dba oracle
# passwd oracle
오라클을 설치할 디렉터리를 생성하고 위에서 만든 oracle 계정에 권한을 부여한다.

# mkdir -p /app/oracle
# chown -R oracle:dba /app
# chmod -R 775 /app
oracle 계정으로 접속하여 변수를 저장한다.

[root@localhost ~]# su - oracle
[oracle@localhost ~]$ vi .bash_profile
export ORACLE_BASE=/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
export ORACLE_SID=orcl
export NLS_LANG=AMERICAN_AMERICA.AL32UTF8
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib
export PATH=$PATH:$ORACLE_HOME/bin

# alias ss='sqlplus / as sysdba'

오라클 설치

설치 파일 다운 경로 - https://www.oracle.com/database/technologies/oracle-database-software-downloads.html
Oracle Database 11g Release 2 Express Edition for Linux x86 and Windows


# wget https://www.oracle.com/webapps/redirect/signon?nexturl=https://download.oracle.com/otn/linux/oracle11g/xe/oracle-xe-11.2.0-1.0.x86_64.rpm.zip
# unzip oracle-xe-11.2.0-1.0.x86_64.rpm.zip
# cd Disk1
# rpm -ivh oracle-xe-11.2.0-1.0.x86_64.rpm
# /etc/init.d/oracle-xe configure

오라클 환경변수 설정
# su – oracle
# export ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe
# export ORACLE_BASE=/u01/app/oracle
# export ORACLE_SID=XE
# cd /u01/app/oracle/product/11.2.0/xe/bin
# ./sqlplus /nolog
SQL> connect /as sysdba
Conneted.

- sql Developer 접속 테스트


- 터미널에서 오라클 계정 접속
1# sqlplus system/passwd;
2# sqlplus system/passwd@192.168.17.129:1521/xe


• 참고 자료
https://everyflower.tistory.com/202
https://xxsiyoung.tistory.com/3
https://idchowto.com/?p=42697


반응형

'DBMS' 카테고리의 다른 글

오라클 SQL 쿼리 샘플  (0) 2021.01.30
mysql 설치  (0) 2020.12.02
MySQL 실행 쿼리 확인하기  (0) 2020.12.02
postgresql 설치  (0) 2020.07.02
Oracle DB Vault  (0) 2017.11.22