본문 바로가기

Open Source Software

Python - Oracle Database 연결 샘플 코드 Reference 아래 사이트를 참조하여 작성한 코드입니다. Oracle Database Connection in Python cx_Oracle 8 Installation 사전 조건: cx_Oracle 모듈을 설치("python -m pip install cx_Oracle --upgrade") 되어 있어야 하고, 오라클 클라이언트 라이브러리가 Path에 잡혀 있어야 합니다. import logging import cx_Oracle username = 'system' password = 'Welcome123' dsn = '150.136.212.183/orclpdb1' port = 1521 encoding = 'UTF-8' logger = logging.getLogger() logger.setLevel(lo.. 더보기
로컬 호스트 정보 출력 Python 코드 아래와 같습니다. import socket import os hostname = socket.gethostname() localip = socket.gethostbyname(hostname) username = os.getlogin() homedir = os.path.expanduser( '~' ) currdir = os.getcwd() print("Host Name : {} ".format(hostname)) print("Local IP Address : {} ".format(localip)) print("User Name : {} ".format(username)) print("Home Directory : {} ".format(homedir)) print("Current Directory : {} .. 더보기
OCI VM 인스턴스에서 도커 설치 Oracle Linux 7.9 환경에서 테스트한 내용입니다. yum 명령을 이용해서 root 유저로 도커를 설치합니다. [opc@demo ~]$ sudo -s [root@demo opc]# yum install docker-engine -y Loaded plugins: langpacks, ulninfo ... Installed: docker-engine.x86_64 0:19.03.11.ol-13.el7 Dependency Installed: container-selinux.noarch 2:2.119.2-1.911c772.el7_8 containerd.x86_64 0:1.4.8-1.el7 criu.x86_64 0:3.12-2.el7 docker-cli.x86_64 0:19.03.11.ol-13.el7 li.. 더보기
처음 사용자를 위한 Kafka - 1. Concept, 설치 방법 및 간단한 사용 샘플 참조 사이트 APACHE KAFKA KAFKA STREAMS 오픈소스 이벤트 스트리밍 (Event Streaming) 플랫폼인 Apache Kafka (이하 카프카) 설치와 간단한 사용방법을 알아보겠습니다. 아래에서 기술한 테스트 내용은 Oracle Cloud Infrastructure (OCI) 의 Oracle Linux 7.9 가상머신 환경에서 진행했습니다. 카프카 Concept 이벤트 (Event) 레코드: 레코드 또는 메세지라고도 하며, 카프카 데이터를 읽거나 카프카에 데이터를 쓸 때 이 이벤트의 형태로 이루어집니다. 이벤트는 키, 값, 타임스탬프, 메타 데이터 헤더(옵션)를 가지고 있습니다. 프로듀서 (Producer): 카프카에 이벤트를 Publish (쓰기)하는 클라이언트 어플리케이션입니다... 더보기