📖
Simple & Clear Engineer Note
  • This is me
  • Infra 용어
  • Linux Acceptance test
    • ISO 9126의 특성에 따른 OS 항목 분류
    • 기능성 (Functionality)
      • Kernel 영역
      • LVM (Logical Volume Manager)
      • API (daemon 서비스 상태 체크)
      • CPU 정보 및 Firmware 확인
      • Memory 용량 및 Slot 확인
      • Negotiation 상태 확인
      • Raid 구성 확인
      • WEB/WAS 설치
      • Cache/Swap 메모리 초기화
      • NFS (Network File System)
    • 신뢰성 (Reliability)
      • Bonding
      • System Reboot
      • Disk Mirror
      • Multipath
      • Cluster
      • Backup & Optical Drive check
      • kdump
      • watchdogtimer
    • 사용성 (Usability)
      • Locale
      • Network 구성
      • Hosts file
      • DNS(Domain Name System)
      • NTP(Network Time Protocol) 시간 동기화
      • tcpdump
      • SSH (Secure Shell)
      • Runlevel
      • Crontab 작업 예약
      • TimeZone
      • VNC(Virtual Network Computing)
      • Yum local repository
    • 유지보수성 (Maintenance)
      • hdparm
    • 보안성 (Security)
      • Permission error 해결방법
    • 기타(ETC)
      • X window
      • Macro (Shell Script & TeraTerm(TTL))
  • Webserver
    • Infra Structure 소개
      • HTML +CSS +JavaScript
      • MongoDB + Flask
  • Hadoop Guide
    • Hadoop Single설치 (ver 2.7.4)
  • MachineLearning
    • 확률(Probability)
    • Machine learning이해하기
    • Processing Data(Numpy)
    • Data Handling - Pandas
      • feature Scaling
      • Data encoding
    • Analysis(with Python & R)
      • 기초통계지식
      • 회귀(Regression)
      • 분류(Classification)
      • 차원축소(Dimension Reduction)
      • 군집화(Clustering)
      • 평가(Evaluation)
      • Scikitlearn
    • Text Analysis
    • Time Series Analysis
    • Statistics
    • Customer Value Analysis
  • Deep Learning
    • CS231n
      • CS231n (Lecture 1~6)
      • CS231n(Lecture7~12)
  • DataBase
    • DataBase
    • Transaction
    • Oracle 12C setup
    • MySQL setup
    • neo4j Enterprise Setup
    • SQL
    • Data inquiry and data analysis using SQL
    • 품질 & RiskManagement
    • 성능(Performance)
    • 안정성
    • 이기종간 데이터 이관방법
  • 기타
    • JAVA용어정리(암기)
  • Windows 관리
    • WINDOW 서버 root 권한 설정 방법
    • 접속자 확인
  • EMRproject
    • Git & Github
Powered by GitBook
On this page
  • 오라클DB 설치전 OS 환경 셋업
  • listner , tns 설정

Was this helpful?

  1. DataBase

Oracle 12C setup

GCP 환경에서 오라클(Oracle)DB 12C 구축하기

오라클DB 설치전 OS 환경 셋업

-- XWindows GUI 패키지

yum -y groups install GNOME Desktop

yum install -y xorg-x11-apps

yum install xterm

-- 계정정보 설정

root / [id] [pw] / [pw]

yum install -y unzip

-- ssh 외부접속 사용 설정

vi /etc/ssh/sshd_config

PermitRootLogin yes PasswordAuthentication yes

-- OS 정보 [root]instance-1:/root># uname -a

Linux instance-1 3.10.0-1160.25.1.el7.x86_64 #1 SMP Wed Apr 28 21:49:45 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

-- oracle 계정생성

groupadd dba

useradd -d dba oracle

passwd oracle

-- oracle directory 설정

mkdir /u01 -- ORACLE_BASE

mkdir /u01/media -- Oracle 설치파일

mkdir /oradata

mkdir /oradata/system -- system datafile PATH

mkdir /oradata/redo -- redo log PATH

mkdir /oradata/data -- datafile PATH

-- 소유권 변환

chown -R oracle:dba /u01

chown -R oracle:dba /oradata

-- oracle 설치파일 전송

/u01/media cd /u01/media unzip V839960-01.zip

-- Oracle 설치

Xmanager Xstart로 진행

$ cd /u01/media/database $ ./runInstaller y

설치중 필요 패키지 설치

yum install compat-libcap1-1.10

yum install libstdc++-devel yum install sysstat-10.1.5

yum install gcc-c++ yum install ksh

yum install libaio-devel

yum install smartmontools

필요한 패키지 설치 및 FiX & check script 실행

[root]gcpora12c:/root># /tmp/CVU_12.2.0.1.0_oracle/runfixup.sh

All Fix-up operations were completed successfully.

[root]gcpora12c:/root># uname -a

Linux gcpora12c 3.10.0-1160.25.1.el7.x86_64 #1 SMP Wed Apr 28 21:49:45 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

[root]gcpora12c:/root># ulimit -s 8192

[root]gcpora12c:/root># vi /etc/security/limits.conf

[root]gcpora12c:/root># sysctl -p

[root]gcpora12c:/root># ulimit -s

8192

[root]gcpora12c:/root># ulimit -s 10240

[root]gcpora12c:/root># ulimit -s

10240

[root]gcpora12c:/root># sysctl -p

[root]gcpora12c:/root># ulimit -s 10240

Oracle 설치 확

[root]gcpora12c:/root># su - oracle

Last login: Wed May 19 02:47:52 UTC 2021 from 125.133.174.101 on pts/0 [oracle]gcpora12c:/home/oracle>$ sqlplus " / as sysdba"

SQL*Plus: Release 12.2.0.1.0 Production on Wed May 19 03:23:42 2021

Copyright (c) 1982, 2016, Oracle. All rights reserved.

Connected to an idle instance.

SQL>

XStart 화면에서

dbca

네트 워크 설정

TNS설정

ifconfig -> 내부 IP 지정

listner , tns 설정

[oracle]gcpora12c:/oradata>$ ps -ef | grep tns

root 29 2 0 01:44 ? 00:00:00 [netns] oracle 16746 1 0 03:59 ? 00:00:00 /u01/product/12.2.0/bin/tnslsnr LISTENER -inherit oracle 17018 12510 0 04:03 pts/0 00:00:00 grep --color=auto tns

[oracle]gcpora12c:/oradata>$ lsnrctl status listener

LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 19-MAY-2021 04:03:10

Copyright (c) 1991, 2016, Oracle. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=gcpora12c.asia-northeast3-a.c.sixth-emissary-289210.internal)(PORT=1521)))

STATUS of the LISTENER

Alias LISTENER Version TNSLSNR for Linux: Version 12.2.0.1.0 - Production Start Date 19-MAY-2021 03:59:46 Uptime 0 days 0 hr. 3 min. 23 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /u01/product/12.2.0/network/admin/listener.ora Listener Log File /u01/diag/tnslsnr/gcpora12c/listener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=gcpora12c.asia-northeast3-a.c.sixth-emissary-289210.internal)(PORT=1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521))) Services Summary... Service "ENCORESY" has 1 instance(s). Instance "ENCORESY", status READY, has 1 handler(s) for this service... Service "ENCORESYXDB" has 1 instance(s). Instance "ENCORESY", status READY, has 1 handler(s) for this service... The command completed

successfully [oracle]gcpora12c:/oradata>$ cd $ORACLE_HOME [oracle]gcpora12c:/u01/product/12.2.0>$ cd network [oracle]gcpora12c:/u01/product/12.2.0/network>$ cd admin [oracle]gcpora12c:/u01/product/12.2.0/network/admin>$ ls -l

total 16 -rw-r--r--. 1 oracle dba 368 May 19 03:59 listener.ora drwxr-xr-x. 2 oracle dba 64

May 19 03:19 samples -rw-r--r--. 1 oracle dba 1441 Aug 28 2015 shrept.lst -rw-r--r--. 1 oracle dba 175 May 19 04:00 sqlnet.ora -rw-r--r--. 1 oracle dba 318 May 19 04:02 tnsnames.ora [oracle]gcpora12c:/u01/product/12.2.0/network/admin>$ vi listener.ora

[oracle]gcpora12c:/u01/product/12.2.0/network/admin>$ [oracle]gcpora12c:/u01/product/12.2.0/network/admin>$

[oracle]gcpora12c:/u01/product/12.2.0/network/admin>$ lsnrctl stop listener

LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 19-MAY-2021 04:03:33

Copyright (c) 1991, 2016, Oracle. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=gcpora12c.asia-northeast3-a.c.sixth-emissary-289210.internal)(PORT=1521))) The command completed successfully [oracle]gcpora12c:/u01/product/12.2.0/network/admin>$ [oracle]gcpora12c:/u01/product/12.2.0/network/admin>$

tns 상태 확

[oracle]gcpora12c:/u01/product/12.2.0/network/admin>$ ps -ef | grep tns root 29 2 0 01:44 ? 00:00:00 [netns] oracle 17052 12510 0 04:03 pts/0 00:00:00 grep --color=auto tns

listner 를 open시킨다.

[oracle]gcpora12c:/u01/product/12.2.0/network/admin>$ lsnrctl start listener

LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 19-MAY-2021 04:03:42

Copyright (c) 1991, 2016, Oracle. All rights reserved.

Starting /u01/product/12.2.0/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 12.2.0.1.0 - Production System parameter file is /u01/product/12.2.0/network/admin/listener.ora Log messages written to /u01/diag/tnslsnr/gcpora12c/listener/alert/log.xml Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=gcpora12c.asia-northeast3-a.c.sixth-emissary-289210.internal)(PORT=1521))) Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=gcpora12c.asia-northeast3-a.c.sixth-emissary-289210.internal)(PORT=1521)))

Alias listener Version TNSLSNR for Linux: Version 12.2.0.1.0 - Production Start Date 19-MAY-2021 04:03:42 Uptime 0 days 0 hr. 0 min. 0 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /u01/product/12.2.0/network/admin/listener.ora Listener Log File /u01/diag/tnslsnr/gcpora12c/listener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=gcpora12c.asia-northeast3-a.c.sixth-emissary-289210.internal)(PORT=1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521))) The listener supports no services The command completed successfully

tnsnames.ora 의 내 내부 IP를 확인한다.

[oracle]gcpora12c:/u01/product/12.2.0/network/admin>$ cat tnsnames.ora

tnsnames.ora Network Configuration File: /u01/product/12.2.0/network/admin/tnsnames.ora

Generated by Oracle configuration tools.

ENCORESY = (DESCRIPTION = (ADDRESSLIST = (ADDRESS = (PROTOCOL = TCP)(HOST =GCPIP)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = ENCORESY) ) )

tnsping이 아래와 같이 성공한다면 이제 접속이 가능하다.

[oracle]gcpora12c:/u01/product/12.2.0/network/admin>$ tnsping encoresy

TNS Ping Utility for Linux: Version 12.2.0.1.0 - Production on 19-MAY-2021 04:03:54

Copyright (c) 1997, 2016, Oracle. All rights reserved.

Used parameter files: /u01/product/12.2.0/network/admin/sqlnet.ora

Used TNSNAMES adapter to resolve the alias Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.178.0.9)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = ENCORESY))) OK (0 msec)

PreviousTransactionNextMySQL setup

Last updated 3 years ago

Was this helpful?

필요 패키지 설치
스크립트 실행 후 엔터 치면됩