I. 개요
1. 사용 Software
제품명 | 버전 | 아키텍쳐 | 배포 사이트 |
---|---|---|---|
VirtualBox | 5.x | 호스트 환경에 따름 | https://www.virtualbox.org |
Oracle Enterprise Linux | 6 (Update 8 이상) | x86 64bit | |
Clusterware, Database | 11.2.0.4 | x86 64bit | https://support.oracle.com (My Oracle Support 권한 필요) |
Oracle Database 12.1.0.2은 https://support.oracle.com에서 받을 수 있습니다.
2. 구성 계획
A) 서버
VM | Host Name | Memory | Disk | Net Adapter 1 | Net Adapter 2 | 구성 방법 | 비고 |
---|---|---|---|---|---|---|---|
RAC1 | rac1 | 4GB | 50GB | 브리지 어댑터 | 호스트 전용 어댑터 | 리눅스 설치 | dnsmasq를 사용하여 DNS 구성 |
RAC2 | rac2 | 4GB | 50GB | 브리지 어댑터 | 호스트 전용 어댑터 | RAC1 복제 | dnsmasq를 사용하여 DNS 구성 |
리눅스 기반의 2 node RAC로 구성합니다.
B) 스토리지
파일 이름 | 용량 | 타입 | 용도 |
---|---|---|---|
RAWDEVICE.vdi | 20GB | Fixed / Shareable | Raw Device 분할 할당 |
실습의 편의를 위해 하나의 가상 디스크를 VM에 등록하고 이를 분할하여 Raw Device로 할당하는 방식으로 구성합니다.
C) 네트워크
VM | Public IP | Private IP | Virtual IP | Netmask | Gateway | DNS Server | SCAN IP |
---|---|---|---|---|---|---|---|
RAC1 | 10.0.1.101 | 10.0.5.101 | 10.0.1.111 | 255.255.255.0 | 10.0.1.1 | 10.0.1.101 | 10.0.1.110 |
RAC2 | 10.0.1.102 | 10.0.5.102 | 10.0.1.112 | 255.255.255.0 | 10.0.1.1 | 10.0.1.102 |
Netmask의 경우 Public과 Private 모두 24bit(255.255.255.0)을 사용합니다.
인터넷 공유기 또는 Gateway의 IP에 맞춰 Public IP와 Virtual IP를 설정하기 바랍니다.
만약 공유기 IP가 192.168.0.1일 경우 Public IP와 VIP는 192.168.0.XXX로, Gateway는 192.168.0.1로 지정해야 합니다.
실습을 위해 별도의 DNS 서버 구성 없이 dnsmasq를 사용하여 RAC를 구축할 계획이므로 DNS는 자신의 IP로 지정합니다.
3. 호스트 환경
원활한 실습을 위해 64비트 운영체제에 16GB 이상의 메모리가 장착된 환경에서 작업하는 것을 권합니다.
디스크 I/O에 의한 지연을 최소화하기 위해 호스트의 OS가 설치되지 않은 별도의 내장 디스크를 사용하거나 SSD의 사용을 권합니다.
ESATA 또는 USB 3.0 이상의 빠른 속도를 보장하는 외장 디스크를 사용하는 것도 방법일 수 있습니다만 지속적인 연결이 보장되어야 합니다.
II. 리눅스 (OEL 6) 설치
1. 시작
기본값인 "Install or upgrade an existing system"이 선택된 상태에서 '엔터키'를 입력하면 다음 단계로 진행됩니다.
설치 미디어 테스트를 진행하려면 "OK", 테스트 없이 바로 설치를 진행하려면 "Skip"을 선택하고 '엔터키'를 입력합니다.
GUI 화면의 설치 초기 화면이 출력되면 마우스로 <Next> 버튼을 클릭하여 다음 단계로 넘어갑니다.
2. 언어 설정
기본으로 화면에 표시하는 문자는 "Korean(한국어)"를 선택하고 <Next> 버튼을 클릭합니다.
키보드 입력에 사용되는 언어는 "U.S. 영어" 입니다.
3. 저장 장치 선택
설치와 관련된 장치 종류는 "기본 저장 장치"입니다.
데이터 초기화에 대한 경고가 나올 경우, 설치를 진행하기 위해 "예, 모든 데이터를 삭제합니다"를 선택합니다.
4. 네트워크 설정
네트워크 설정을 위해 화면 좌측 하단에 <네트워크 설정> 버튼을 클릭합니다
A) Public 네트워크 구성
Public 네트워크 구성을 먼저 진행하겠습니다.
해당 네트워크를 선택하고 <변경하기...> 버튼을 클릭합니다.
"자동으로 연결"을 체크합니다.
IPv4 설정 탭에서 방식을 "수동"으로 선택하고 <추가> 버튼을 클릭합니다.
할당된 Public IP 정보를 주소란에 입력합니다.
DNS정보를 입력할 때, 별도의 DNS 서버 구성없이 dnsmasq를 사용하려 한다면 해당 서버의 자체 IP 또는 루핑 주소인 127.0.0.1을 입력합니다.
검색 도메인은 호스트명에 사용한 도메인을 입력하거나 별도의 도메인을 구성하지 않을 경우에는 빈 공간으로 남겨둡니다.
설정이 완료되면 <적용...> 버튼을 클릭합니다.
B) Private 네트워크 구성
RAC 노드간의 연결을 위한 Private 구성을 진행합니다.
해당되는 네트워크를 선택하고 <변경하기...>를 클릭합니다.
"자동으로 연결"을 체크합니다.
IPv4 설정에서 방식을 "수동"으로 변경한 후 <추가> 버튼을 클릭합니다.
Private IP 정보를 입력합니다.
외부와의 연결은 구성하지 않기 때문에 DNS와 검색 도메인 부분은 생략합니다.
<적용>을 선택하면 변경된 값이 저장됩니다.
모든 IP 정보를 입력하였으면 <닫기> 버튼을 클릭합니다.
호스트명을 1번 서버에 맞게 입력합니다.
도메인을 입력한 경우에는 이후에 진행하는 프로파일 설정이나 클러스터 설치 부분에서도 변경된 내용을 반영하고 진행해야 합니다.
네트워크 설정이 완료되었으니 <다음>을 클릭합니다.
5. 시간대 설정
설치가 되는 장소에 맞게 지정이 되었는지 확인하고 <다음> 버튼을 클릭합니다.
6. 관리자 계정 암호 설정
root 계정의 암호를 입력합니다.
설치 시에는 편의를 위해 모든 OS 계정은 동일한 암호를 사용할 예정입니다.
RAC 구축이 완료된 후에는 암호를 변경해도 됩니다.
암호 복잡도에 맞지 않게 쉬운 암호를 입력했을 경우, 경고 메시지가 출력됩니다.
테스트를 위해 또는 설치시에 임시로 사용할 암호이므로 우선 <어쨋든 사용> 버튼을 클릭하여 다음 단계로 진행합니다.
7. 디스크 구성
"사용자 레이아웃 만들기"를 선택하고 <다음>을 클릭합니다.
로컬 디스크의 파티션을 구성하기 위해 <만들기> 버튼을 클릭합니다.
기본값 "표준 파티션"이 선택된 상태에서 <생성>을 클릭합니다.
먼저 swap 영역을 Grid Infrastructure 권고사항에 맞게 생성합니다.
- 4~16GB : 메모리와 동일한 값
- 16GB 이상 : 16GB 고정
파일시스템 유형을 "swap"로 변경하고 용량에 "5120"을 입력하고 <확인>을 클릭합니다.
나머지 영역은 OS 파일이나 DB 엔진 등이 설치되는 영역으로 할당하려 합니다.
마운트 지점을 "/"로 선택하고, "가능한 최대 용량으로 채움"을 선택하면 swap을 제외한 모든 공간이 할당됩니다.
<확인> 버튼을 클릭하여 다음 단계로 진행합니다.
디스크 구성이 완료되었으면 <다음> 버튼을 클릭합니다.
할당된 디스크 용량에 따라 캡쳐한 예제와는 다른 크기로 나올 수 있습니다.
파티션 생성에 앞서 디스크 포맷에 대한 경고 메시지가 출력됩니다.
<포맷> 버튼을 클릭하여 디스크 구성을 진행합니다.
디스크에 저장 장치 설정을 기록하기 위해 "디스크에 변경 사항 기록"을 선택합니다.
8. 부트 영역 선택
부트로더 설정 화면입니다.
리눅스 update 버전에 따라 예제와는 다른 값이 나올 수 있지만, 기본적으로 동일한 내용이므로 <다음>을 클릭합니다.
9. 설치 패키지 선택
OS 패키지 구성을 선택하는 화면입니다.
수동으로 패키지를 선택할 것이므로 "지금 선택"을 체크하고 <다음> 버튼을 클릭합니다.
A) 기반 시스템
기반 시스템에서는 아래 항목을 선택합니다
- 기본
- 레거시 유닉스 호환성
- 성능 도구
레거시 유닉스 호환성에서 추가로 선택해야 하는 패키지가 있으므로 해당 항목을 선택하고, <선택적 패키지> 버튼을 클릭합니다.
※ 운영 환경에서 패치나 업그레이드를 고려한다면 "Perl 지원" 패키지도 함께 선택하여 설치합니다.
항목에서 ksh 패키지를 추가 선택한 후에 <닫기> 버튼을 클릭합니다.
기반 시스템에 선택 항목에 스크롤을 내려 추가로 패키지를 선택합니다.
- 호환성 라이브러리
B) 서버
서버에서는 다음의 항목을 선택해줍니다.
- 시스템 관리 도구
시스템 관리 도구에서도 추가할 패키지가 있으므로, <선택적 패키지> 버튼을 클릭합니다.
아래 2개의 패키지를 선택하고 <닫기>를 클릭합니다.
- oracle-rdbms-server-12cR1-preinstall-*
- oracleasm-support-*
11g R2 설치를 진행할 경우에는 oracle-rdbms-server-11gR2-preinstall-* 패키지를 선택합니다.
그리고 공유 클러스터 스토리지 설정이 필요한 경우 ocfs2-tools-* 패키지도 선택합니다.
C) 데스크탑
데스크탑에서는 아래 패키지를 선택합니다
- X 윈도우 시스템
- 그래픽기반 관리 도구
- 데스크탑
- 입력 방식
- 폰트
D) 개발
개발에서는 두 개의 항목을 선택합니다.
- 개발용 도구
- 추가 개발
그리고 추가 개발 항목에 <선택적 패키지> 버튼을 클릭합니다.
추가 개발 패키지 중에 libaio-devel 패키지를 선택하고 <닫기> 버튼을 클릭합니다.
필요한 패키지 선택이 완료되었으므로 <다음>을 클릭하여 설치를 진행합니다.
10. 설치 진행
리눅스가 로컬 디스크에 설치됩니다.
11. 재부팅
설치가 모두 완료되면 <재부팅> 버튼을 클릭합니다.
12. 설치 후 추가 작업
맨처음 재기동시 환영 메시지가 나옵니다.
<앞으로> 버튼을 클릭하여 다음 단계로 진행합니다.
A) 라이센스 정보
라이센스 정보에 "예, 라이센스 조항에 동의합니다"를 선택하고 <앞으로> 버튼을 클릭합니다.
B) 소프트웨어 업데이트 설정
운영 환경에서는 주기적으로 OS의 문제점을 패치하여야겠지만, 테스트를 위해 가상으로 구축하는 경우이므로 이 부분은 생략하고자 합니다.
소프트웨어 업데이트 설정은 "아니오, 나중에 등록합니다"를 선택하고 <앞으로>를 클릭합니다.
리눅스 패치와 관련한 확인 메시지가 출력되면 <나중에 연결합니다> 버튼을 클릭합니다.
업데이트 설정 완료 화면에서 <앞으로> 버튼을 클릭합니다.
C) 사용자 생성
추가적인 OS 유저는 생성하지 않을 것이므로, <앞으로>를 클릭합니다.
D) 날짜 및 시간
테스트 환경에서는 NTP 구성없이 CTSS를 사용할 것이므로 환경을 구성하지 않고 <앞으로>를 클릭합니다.
E) Kdump
테스트를 위한 환경이므로 충돌 덤프 없이 구성을 마무리합니다.
"kdump를 활성화하겠습니까?"를 해제하고 <완료>를 클릭합니다.
시스템 재부팅 안내 메시지가 나오면 <확인>을 클릭합니다.
{}
III. OS 환경 설정
1. 설치 내역 확인
A) OS 버전 확인
cat /etc/oracle-release cat /etc/redhat-release lsb_release -id uname -r
[root@rac1 ~]# cat /etc/oracle-release Oracle Linux Server release 6.8 [root@rac1 ~]# cat /etc/redhat-release Red Hat Enterprise Linux Server release 6.8 (Santiago) [root@rac1 ~]# lsb_release -id Distributor ID: OracleServer Description: Oracle Linux Server release 6.8 [root@rac1 ~]# uname -r 4.1.12-37.4.1.el6uek.x86_64
설치된 리눅스의 버전 정보를 확인합니다.
설치된 버전에 따라 출력되는 메시지는 다를 수 있습니다.
B) OS 패키지 확인
rpm -q binutils-* rpm -q compat-libcap1-* rpm -q compat-libstdc++-33-* rpm -q gcc-* rpm -q gcc-c++-* rpm -q glibc-* rpm -q glibc-devel-* rpm -q ksh rpm -q libgcc-* rpm -q libstdc++-* rpm -q libstdc++-devel-* rpm -q libaio-* rpm -q libaio-devel-* rpm -q libXext-* rpm -q libXtst-* rpm -q libX11-* rpm -q libXau-* rpm -q libxcb-* rpm -q libXi-* rpm -q make-* rpm -q sysstat-*
[root@rac1 ~]# rpm -q binutils-* binutils-2.20.51.0.2-5.44.el6.x86_64 [root@rac1 ~]# rpm -q compat-libcap1-* compat-libcap1-1.10-1.x86_64 [root@rac1 ~]# rpm -q compat-libstdc++-33-* compat-libstdc++-33-3.2.3-69.el6.x86_64 [root@rac1 ~]# rpm -q gcc-* gcc-4.4.7-17.el6.x86_64 [root@rac1 ~]# rpm -q gcc-c++-* gcc-c++-4.4.7-17.el6.x86_64 [root@rac1 ~]# rpm -q glibc-* glibc-2.12-1.192.el6.x86_64 glibc-2.12-1.192.el6.i686 [root@rac1 ~]# rpm -q glibc-devel-* glibc-devel-2.12-1.192.el6.x86_64 [root@rac1 ~]# rpm -q ksh ksh-20120801-33.el6.x86_64 [root@rac1 ~]# rpm -q libgcc-* libgcc-4.4.7-17.el6.x86_64 libgcc-4.4.7-17.el6.i686 [root@rac1 ~]# rpm -q libstdc++-* libstdc++-4.4.7-17.el6.x86_64 [root@rac1 ~]# rpm -q libstdc++-devel-* libstdc++-devel-4.4.7-17.el6.x86_64 [root@rac1 ~]# rpm -q libaio-* libaio-0.3.107-10.el6.x86_64 [root@rac1 ~]# rpm -q libaio-devel-* libaio-devel-0.3.107-10.el6.x86_64 [root@rac1 ~]# rpm -q libXext-* libXext-1.3.3-1.el6.x86_64 [root@rac1 ~]# rpm -q libXtst-* libXtst-1.2.2-2.1.el6.x86_64 [root@rac1 ~]# rpm -q libX11-* libX11-1.6.3-2.el6.x86_64 [root@rac1 ~]# rpm -q libXau-* libXau-1.0.6-4.el6.x86_64 [root@rac1 ~]# rpm -q libxcb-* libxcb-1.11-2.el6.x86_64 [root@rac1 ~]# rpm -q libXi-* libXi-1.7.4-1.el6.x86_64 [root@rac1 ~]# rpm -q make-* make-3.81-23.el6.x86_64 [root@rac1 ~]# rpm -q sysstat-* sysstat-9.0.4-31.el6.x86_64
오라클 소프트웨어 설치를 위해 필요한 OS 패키지가 모두 설치되었는지 확인합니다.
2. OS 설정 변경
A) 호스트 파일 수정
### Public 10.0.1.101 rac1 10.0.1.102 rac2 ### Private 10.0.5.101 rac1-priv 10.0.5.102 rac2-priv ### Virtual 10.0.1.111 rac1-vip 10.0.1.112 rac2-vip ### SCAN 10.0.1.110 rac-scan
/etc/hosts 파일에 서버 정보를 추가합니다.
오라클 소프트웨어 설치를 정상적으로 진행하기 위해 정확한 정보를 입력해야 합니다.
B) 사전 설정 패키지 설치
rpm -ivh oracle-rdbms-server-11gR2-preinstall-*.el6.x86_64.rpm
[root@rac1 ~]# cd /media/OL6.8\ x86_64\ Disc\ 1\ 20160518/Packages/ [root@rac1 Packages]# rpm -ivh oracle-rdbms-server-11gR2-preinstall-1.0-13.el6.x86_64.rpm 경고: oracle-rdbms-server-11gR2-preinstall-1.0-13.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY 준비 중... ########################################### [100%] 1:oracle-rdbms-server-11g########################################### [100%]
11g R2 구성을 대비한 패키지를 설치합니다.
패키지 파일은 리눅스 설치 이미지를 이용하거나 http://yum.oracle.com 에서 다운로드할 수 있습니다.
C) tmpfs 수정
tmpfs /dev/shm tmpfs size=5g 0 0
mount -o remount /dev/shm
오라클의 MEMORY_TARGET 파라미터를 사용하기 위해서 tmpfs를 변경해야 합니다.
기존에 설정된 tmpfs 값은 #로 주석 처리하거나 삭제합니다.
remount하여 바로 적용시킵니다.
D) 시스템 변수 수정
kernel.sem = 250 32000 100 128 kernel.shmmni = 4096 fs.file-max = 6815744 net.ipv4.ip_local_port_range = 9000 65535 net.core.rmem_default = 262144 net.core.rmem_max = 4194304 net.core.wmem_default = 262144 net.core.wmem_max = 1048576 fs.aio-max-nr = 1048576
커널 변수를 수정하는 작업입니다.
oracle-rdbms-server-11gR2-preinstall 패키지가 설치되었다면 이미 반영된 내용이므로 생략해도 됩니다.
하지만 해당 패키지를 따로 설치하지 않은 상태에서 오라클 소프트웨어를 설치하려면 왼쪽의 내용을 /etc/sysctl.conf에 추가해야 합니다.
E) DNSMASQ 서비스 기동
service dnsmasq start chkconfig dnsmasq on
[root@rac1 ~]# service dnsmasq start Starting dnsmasq: [ OK ]
별도의 DNS 서비스 없이 SCAN을 DNS에 등록된 것처럼 처리하기 위해 DNSMASQ 프로세스를 활성화합니다.
F) 미사용 프로세스 중지
chkconfig --level 123456 xinetd off chkconfig --level 123456 cups off chkconfig --level 123456 smartd off chkconfig --level 123456 iptables off chkconfig --level 123456 ip6tables off chkconfig --level 123456 bluetooth off
추가적인 리소스 확보를 위해 기본적으로 실행중인 불필요한 OS 프로그램을 off 시킵니다.
G) CTSS 사용을 위한 NTP 중지
mv /etc/sysconfig/ntpd /etc/sysconfig/ntpd.original mv /etc/ntp /etc/ntp.original mv /etc/ntp.conf /etc/ntp.conf.original
실습 환경에서는 CTSS를 NTP 대신 사용할 것이므로 NTP 서비스를 중지하고 관련 파일을 삭제해야 합니다.
NTP 서비스가 기동중이거나 관련 파일이 있는 경우 CTSS는 observer mode로만 기동되므로 정리가 필요합니다.
H) SELINUX 설정 변경
SELINUX=permissive
Selinux 모드를 permissive로 변경합니다.
I) User Processes 설정 변경
# Change this * soft nproc 1024 # To this * - nproc 16384
프로세스 한도 제한을 오라클 권고사항에 맞게 1024에서 16384로 수정합니다.
3. 그룹 및 사용자 설정
A) 그룹 & 사용자 설정 변경
# groupadd oinstall # groupadd dba groupadd oper groupadd asmdba groupadd asmoper groupadd asmadmin usermod -g oinstall -G dba,oper oracle useradd -g oinstall -G dba,asmdba,asmoper,asmadmin grid passwd oracle passwd grid
[root@rac1 ~]# groupadd oper [root@rac1 ~]# groupadd asmdba [root@rac1 ~]# groupadd asmoper [root@rac1 ~]# groupadd asmadmin [root@rac1 ~]# usermod -g oinstall -G dba,oper,vboxsf oracle [root@rac1 ~]# useradd -g oinstall -G dba,asmdba,asmoper,asmadmin,vboxsf grid [root@rac1 ~]# passwd oracle oracle 사용자의 비밀 번호 변경 중 새 암호: 잘못된 암호: 사전에 있는 단어를 기반으로 합니다 잘못된 암호: 너무 간단함 새 암호 재입력: passwd: 모든 인증 토큰이 성공적으로 업데이트 되었습니다. [root@rac1 ~]# passwd grid grid 사용자의 비밀 번호 변경 중 새 암호: 잘못된 암호: 사전에 있는 단어를 기반으로 합니다 잘못된 암호: 너무 간단함 새 암호 재입력: passwd: 모든 인증 토큰이 성공적으로 업데이트 되었습니다.
설치를 진행할 사용자 계정과 그룹을 생성 또는 추가합니다.
oracle-rdbms-server-11gR2-preinstall 패키지가 설치되었다면 oracle 유저와 oinstall, dba 그룹은 이미 생성되어 있습니다.
vboxsf 그룹은 VirtualBox의 Guest Addition을 사용하기 위한 그룹으로, 실제 운영 환경에서 Guest Addition을 사용하지 않는다면 추가하지 않습니다.
passwd 명령어로 각 계정의 암호를 지정해주면 됩니다.
B) 사용자별 프로세스 제한 변경
grid hard nproc 16384 grid hard nofile 65536
리소스 제한을 위한 사용자별 설정값을 입력합니다.
오라클을 설치하는 OS 계정에 맞게 oracle 또는 grid 유저별로 제한값을 입력합니다
C) 설치 경로 생성 및 권한 부여
mkdir -p /u01/app/oracle/product chown -R grid:oinstall /u01 chmod -R 770 /u01
오라클 소프트웨어 설치를 위한 경로를 생성하고, 해당 경로에 대한 권한과 소유권을 수정합니다.
D) root 유저 환경 설정
export GRID_HOME=/u01/app/11.2.0/grid export PATH=$GRID_HOME/bin:$PATH
E) grid 유저 환경 설정
export TMP=/tmp export TMPDIR=$TMP export EDITOR=vi export ORACLE_HOSTNAME=rac1 # rac2 => 2번 노드 export ORACLE_BASE=/u01/app/oracle export GRID_HOME=/u01/app/11.2.0/grid export DB_HOME=$ORACLE_BASE/product/11.2.0/db_1 export ORACLE_HOME=$GRID_HOME export ORACLE_SID=+ASM1 # +ASM2 => 2번 노드 export ORACLE_TERM=xterm export BASE_PATH=/usr/sbin:$PATH export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$BASE_PATH export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib export NLS_LANG=AMERICAN_AMERICA.AL32UTF8 export PS1='[\u@$ORACLE_SID \W]$ '
grid 계정으로 접속한 후에 .bash_profile을 수정합니다.
F) oracle 유저 환경 설정
export TMP=/tmp export TMPDIR=$TMP export EDITOR=vi export ORACLE_HOSTNAME=rac1 # rac2 => 2번 노드 export ORACLE_UNQNAME=racdb export ORACLE_BASE=/u01/app/oracle export GRID_HOME=/u01/app/11.2.0/grid export DB_HOME=$ORACLE_BASE/product/11.2.0/db_1 export ORACLE_HOME=$DB_HOME export ORACLE_SID=racdb1 # racdb2 => 2번 노드 export ORACLE_TERM=xterm export BASE_PATH=/usr/sbin:$PATH export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$GRID_HOME/bin:$BASE_PATH export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib export NLS_LANG=AMERICAN_KOREA.AL32UTF8 export PS1='[\u@$ORACLE_SID \W]$ '
마찬가지로 oracle 계정으로 접속하여 .bash_profile을 수정합니다.
{}
IV. 공유 스토리지 설정
1. 디스크 파티션 작업
파티션명 | 파티션 크기 | 용도 |
---|---|---|
/dev/sdb1 | 15G | Raw Device 영역으로 세부 분할하여 사용 |
/dev/sdb2 | 5G | OCFS2 영역으로 할당하여 Fast Recovery Area로 사용 (OCFS2를 이용한 공유 영역) |
A) 디스크 파티션 생성
fdisk /dev/sdb
[root@rac1 ~]# ls /dev/sd* /dev/sda /dev/sda1 /dev/sda2 /dev/sdb [root@rac1 ~]# fdisk /dev/sdb Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel Building a new DOS disklabel with disk identifier 0x71c49a77. Changes will remain in memory only, until you decide to write them. After that, of course, the previous content won't be recoverable. Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite) WARNING: DOS-compatible mode is deprecated. It's strongly recommended to switch off the mode (command 'c') and change display units to sectors (command 'u'). Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 1 First cylinder (1-2610, default 1): Using default value 1 Last cylinder, +cylinders or +size{K,M,G} (1-2610, default 2610): +15G Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 2 First cylinder (1960-2610, default 1960): Using default value 1960 Last cylinder, +cylinders or +size{K,M,G} (1960-2610, default 2610): Using default value 2610 Command (m for help): p Disk /dev/sdb: 21.5 GB, 21474836480 bytes 255 heads, 63 sectors/track, 2610 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x71c49a77 Device Boot Start End Blocks Id System /dev/sdb1 1 1959 15735636 83 Linux /dev/sdb2 1960 2610 5229157+ 83 Linux Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks. [root@rac1 ~]# ls /dev/sd* /dev/sda /dev/sda1 /dev/sda2 /dev/sdb /dev/sdb1 /dev/sdb2
fdisk 명령어로 Raw Device로 사용할 디스크의 파티션을 생성합니다.
각 프롬프트에서 n → p → 1 → "엔터(기본값 1)" → "+15G" → n → p → 2 → "엔터(기본값 1960)" → "엔터(기본값 2610)" → p → w 를 입력하여 파티션 분할
B) 디스크 파티션 확인
fdisk -l /dev/sdb
[root@rac1 ~]# fdisk -l /dev/sdb Disk /dev/sdb: 21.5 GB, 21474836480 bytes 255 heads, 63 sectors/track, 2610 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x71c49a77 Device Boot Start End Blocks Id System /dev/sdb1 1 1959 15735636 83 Linux /dev/sdb2 1960 2610 5229157+ 83 Linux
생성한 파티션은 fdisk의 l 옵션으로 확인할 수 있습니다.
2. Raw Device 설정
Raw Device의 이름과 크기는 다음의 표와 같이 분할하여 할당합니다.
논리 볼륨명 | 크기 | Raw Device 명 | 용도 |
---|---|---|---|
ocr01 | 300MB | /dev/raw/raw1 | Oracle Cluster Registry 1번 |
ocr02 | 300MB | /dev/raw/raw2 | Oracle Cluster Registry 2번 |
vote01 | 300MB | /dev/raw/raw3 | Voting Disk 1번 |
vote02 | 300MB | /dev/raw/raw4 | Voting Disk 2번 |
vote03 | 300MB | /dev/raw/raw5 | Voting Disk 3번 |
system | 1024MB | /dev/raw/raw6 | system 테이블스페이스 |
sysaux | 1024MB | /dev/raw/raw7 | sysaux 테이블스페이스 |
users | 1024MB | /dev/raw/raw8 | users 테이블스페이스 |
temp | 700MB | /dev/raw/raw9 | temp 테이블스페이스 |
undotbs1 | 1024MB | /dev/raw/raw10 | 1번 노드 undo 테이블스페이스 |
undotbs2 | 1024MB | /dev/raw/raw11 | 2번 노드 undo 테이블스페이스 |
control01 | 100MB | /dev/raw/raw12 | 컨트롤파일 1번 |
control02 | 100MB | /dev/raw/raw13 | 컨트롤파일 2번 |
redo01 | 200MB | /dev/raw/raw14 | 리두 로그 1번 그룹 |
redo02 | 200MB | /dev/raw/raw15 | 리두 로그 2번 그룹 |
redo03 | 200MB | /dev/raw/raw16 | 리두 로그 3번 그룹 |
redo04 | 200MB | /dev/raw/raw17 | 리두 로그 4번 그룹 |
redo05 | 200MB | /dev/raw/raw18 | 리두 로그 5번 그룹 |
redo06 | 200MB | /dev/raw/raw19 | 리두 로그 6번 그룹 |
spfile | 200MB | /dev/raw/raw20 | 파라미터 파일 |
A) 물리 볼륨 생성
pvcreate /dev/sdb1
[root@rac1 ~]# pvcreate /dev/sdb1 Physical volume "/dev/sdb1" successfully created
파티션을 pvcreate 명령어로 물리 볼륨으로 생성합니다.
B) 물리 볼륨 확인
pvdisplay /dev/sdb1
[root@rac1 ~]# pvdisplay /dev/sdb1 "/dev/sdb1" is a new physical volume of "15.01 GiB" --- NEW Physical volume --- PV Name /dev/sdb1 VG Name PV Size 15.01 GiB Allocatable NO PE Size 0 Total PE 0 Free PE 0 Allocated PE 0 PV UUID z91Jgt-E254-UQGX-RMLd-FIzn-npCL-Cjo30R
생성된 물리 볼륨은 pvdisplay 명령어로 확인할 수 있습니다.
C) 볼륨 그룹 생성
vgcreate rac /dev/sdb1
[root@rac1 ~]# vgcreate rac /dev/sdb1 Volume group "rac" successfully created
vgcreate 명령어로 물리 볼륨을 볼륨 그룹으로 생성합니다.
D) 볼륨 그룹 확인
vgdisplay rac
[root@rac1 ~]# vgdisplay rac --- Volume group --- VG Name rac System ID Format lvm2 Metadata Areas 1 Metadata Sequence No 1 VG Access read/write VG Status resizable MAX LV 0 Cur LV 0 Open LV 0 Max PV 0 Cur PV 1 Act PV 1 VG Size 15.00 GiB PE Size 4.00 MiB Total PE 3841 Alloc PE / Size 0 / 0 Free PE / Size 3841 / 15.00 GiB VG UUID EE23Lq-Ctgg-2JJN-bHw6-sCA3-Ou26-15aFXs
볼륨 그룸은 vgdisplay 명령어로 확인할 수 있습니다.
E) 논리 볼륨 생성
lvcreate -L 300M -n ocr01 rac lvcreate -L 300M -n ocr02 rac lvcreate -L 300M -n vote01 rac lvcreate -L 300M -n vote02 rac lvcreate -L 300M -n vote03 rac lvcreate -L 1024M -n system rac lvcreate -L 1024M -n sysaux rac lvcreate -L 1024M -n users rac lvcreate -L 700M -n temp rac lvcreate -L 1024M -n undotbs1 rac lvcreate -L 1024M -n undotbs2 rac lvcreate -L 100M -n control01 rac lvcreate -L 100M -n control02 rac lvcreate -L 200M -n redo01 rac lvcreate -L 200M -n redo02 rac lvcreate -L 200M -n redo03 rac lvcreate -L 200M -n redo04 rac lvcreate -L 200M -n redo05 rac lvcreate -L 200M -n redo06 rac lvcreate -L 200M -n spfile rac
[root@rac1 ~]# lvcreate -L 300M -n ocr01 rac Logical volume "ocr01" created. [root@rac1 ~]# lvcreate -L 300M -n ocr02 rac Logical volume "ocr02" created. [root@rac1 ~]# lvcreate -L 300M -n vote01 rac Logical volume "vote01" created. [root@rac1 ~]# lvcreate -L 300M -n vote02 rac Logical volume "vote02" created. [root@rac1 ~]# lvcreate -L 300M -n vote03 rac Logical volume "vote03" created. [root@rac1 ~]# lvcreate -L 1024M -n system rac Logical volume "system" created. [root@rac1 ~]# lvcreate -L 1024M -n sysaux rac Logical volume "sysaux" created. [root@rac1 ~]# lvcreate -L 1024M -n users rac Logical volume "users" created. [root@rac1 ~]# lvcreate -L 700M -n temp rac Logical volume "temp" created. [root@rac1 ~]# lvcreate -L 1024M -n undotbs1 rac Logical volume "undotbs1" created. [root@rac1 ~]# lvcreate -L 1024M -n undotbs2 rac Logical volume "undotbs2" created. [root@rac1 ~]# lvcreate -L 100M -n control01 rac Logical volume "control01" created. [root@rac1 ~]# lvcreate -L 100M -n control02 rac Logical volume "control02" created. [root@rac1 ~]# lvcreate -L 200M -n redo01 rac Logical volume "redo01" created. [root@rac1 ~]# lvcreate -L 200M -n redo02 rac Logical volume "redo02" created. [root@rac1 ~]# lvcreate -L 200M -n redo03 rac Logical volume "redo03" created. [root@rac1 ~]# lvcreate -L 200M -n redo04 rac Logical volume "redo04" created. [root@rac1 ~]# lvcreate -L 200M -n redo05 rac Logical volume "redo05" created. [root@rac1 ~]# lvcreate -L 200M -n redo06 rac Logical volume "redo06" created. [root@rac1 ~]# lvcreate -L 200M -n spfile rac Logical volume "spfile" created.
볼륨 그룹에서 논리 볼륨을 lvcreate 명령어로 생성합니다.
각 논리 볼륨을 데이터베이스에서 사용할 크기에 맞게 분할합니다.
F) 논리 볼륨 확인
lvdisplay
[root@rac1 ~]# lvdisplay --- Logical volume --- LV Path /dev/rac/ocr01 LV Name ocr01 VG Name rac LV UUID 2A6pwH-TC3c-ZvEW-gG0x-Optj-cnVh-VvEvGy LV Write Access read/write LV Creation host, time rac1, 2020-09-10 13:28:38 +0900 LV Status available # open 0 LV Size 300.00 MiB Current LE 75 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 251:0 --- Logical volume --- LV Path /dev/rac/ocr02 LV Name ocr02 VG Name rac LV UUID 5efRaq-GIK5-W3mf-Z65P-ei23-DIJN-WjMBQ3 LV Write Access read/write LV Creation host, time rac1, 2020-09-10 13:28:38 +0900 LV Status available # open 0 LV Size 300.00 MiB Current LE 75 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 251:1 --- Logical volume --- LV Path /dev/rac/vote01 LV Name vote01 VG Name rac LV UUID mSwKQF-QfFh-zrfz-JLIf-3fph-rKBc-iy5JKy LV Write Access read/write LV Creation host, time rac1, 2020-09-10 13:28:38 +0900 LV Status available # open 0 LV Size 300.00 MiB Current LE 75 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 251:2 --- Logical volume --- LV Path /dev/rac/vote02 LV Name vote02 VG Name rac LV UUID XfS7eI-4YqP-DgAM-wEZC-msD0-QCQw-erlZr9 LV Write Access read/write LV Creation host, time rac1, 2020-09-10 13:28:38 +0900 LV Status available # open 0 LV Size 300.00 MiB Current LE 75 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 251:3 --- Logical volume --- LV Path /dev/rac/vote03 LV Name vote03 VG Name rac LV UUID bPw7UB-ynRH-u4mR-37nV-u91W-bI25-Y0ebRd LV Write Access read/write LV Creation host, time rac1, 2020-09-10 13:28:39 +0900 LV Status available # open 0 LV Size 300.00 MiB Current LE 75 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 251:4 --- Logical volume --- LV Path /dev/rac/system LV Name system VG Name rac LV UUID 30EWd9-7dem-f7m3-K9cX-ht20-otLL-6cJ3Mi LV Write Access read/write LV Creation host, time rac1, 2020-09-10 13:28:39 +0900 LV Status available # open 0 LV Size 1.00 GiB Current LE 256 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 251:5 --- Logical volume --- LV Path /dev/rac/sysaux LV Name sysaux VG Name rac LV UUID wKOofc-aUji-KqbE-lGAW-vmcH-NSW2-CUZrRb LV Write Access read/write LV Creation host, time rac1, 2020-09-10 13:28:39 +0900 LV Status available # open 0 LV Size 1.00 GiB Current LE 256 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 251:6 --- Logical volume --- LV Path /dev/rac/users LV Name users VG Name rac LV UUID iTZHnk-0PLo-uUY3-c4wy-6RWL-b5T8-0MWchs LV Write Access read/write LV Creation host, time rac1, 2020-09-10 13:28:40 +0900 LV Status available # open 0 LV Size 1.00 GiB Current LE 256 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 251:7 --- Logical volume --- LV Path /dev/rac/temp LV Name temp VG Name rac LV UUID DNPNyS-j3IZ-c95S-HZOi-CTSa-0bFe-CorXNh LV Write Access read/write LV Creation host, time rac1, 2020-09-10 13:28:40 +0900 LV Status available # open 0 LV Size 700.00 MiB Current LE 175 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 251:8 --- Logical volume --- LV Path /dev/rac/undotbs1 LV Name undotbs1 VG Name rac LV UUID 7ulYU2-109x-kkLZ-qKpR-nZXy-P5VD-UdKK05 LV Write Access read/write LV Creation host, time rac1, 2020-09-10 13:28:40 +0900 LV Status available # open 0 LV Size 1.00 GiB Current LE 256 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 251:9 --- Logical volume --- LV Path /dev/rac/undotbs2 LV Name undotbs2 VG Name rac LV UUID FBJ6yJ-mwAM-5G4N-DaHb-03NQ-L70B-StdMbq LV Write Access read/write LV Creation host, time rac1, 2020-09-10 13:28:41 +0900 LV Status available # open 0 LV Size 1.00 GiB Current LE 256 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 251:10 --- Logical volume --- LV Path /dev/rac/control01 LV Name control01 VG Name rac LV UUID pryjEM-C98N-kDtt-sEJG-1Ioz-0MYe-eLovRw LV Write Access read/write LV Creation host, time rac1, 2020-09-10 13:28:41 +0900 LV Status available # open 0 LV Size 100.00 MiB Current LE 25 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 251:11 --- Logical volume --- LV Path /dev/rac/control02 LV Name control02 VG Name rac LV UUID c0OVqY-qBIM-l0Vt-9Uvh-RWnM-pJqU-lcINs1 LV Write Access read/write LV Creation host, time rac1, 2020-09-10 13:28:41 +0900 LV Status available # open 0 LV Size 100.00 MiB Current LE 25 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 251:12 --- Logical volume --- LV Path /dev/rac/redo01 LV Name redo01 VG Name rac LV UUID Inf829-loyW-81Z9-Qnhk-rlzV-yE2z-cdafKN LV Write Access read/write LV Creation host, time rac1, 2020-09-10 13:28:42 +0900 LV Status available # open 0 LV Size 200.00 MiB Current LE 50 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 251:13 --- Logical volume --- LV Path /dev/rac/redo02 LV Name redo02 VG Name rac LV UUID 5vt942-Ae1R-CVBf-JUKX-eo5y-ce7N-2j7N1o LV Write Access read/write LV Creation host, time rac1, 2020-09-10 13:28:42 +0900 LV Status available # open 0 LV Size 200.00 MiB Current LE 50 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 251:14 --- Logical volume --- LV Path /dev/rac/redo03 LV Name redo03 VG Name rac LV UUID shcaEp-2Hok-VoUL-QAXY-KkHz-j8GW-OQj3Ir LV Write Access read/write LV Creation host, time rac1, 2020-09-10 13:28:42 +0900 LV Status available # open 0 LV Size 200.00 MiB Current LE 50 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 251:15 --- Logical volume --- LV Path /dev/rac/redo04 LV Name redo04 VG Name rac LV UUID BUlOLg-7Y53-RfD7-6DxZ-eHFx-M5FW-S76dsj LV Write Access read/write LV Creation host, time rac1, 2020-09-10 13:28:42 +0900 LV Status available # open 0 LV Size 200.00 MiB Current LE 50 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 251:16 --- Logical volume --- LV Path /dev/rac/redo05 LV Name redo05 VG Name rac LV UUID ihsSZY-dYBb-VzVP-zfHs-1p7r-wIFW-L6Sldr LV Write Access read/write LV Creation host, time rac1, 2020-09-10 13:28:43 +0900 LV Status available # open 0 LV Size 200.00 MiB Current LE 50 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 251:17 --- Logical volume --- LV Path /dev/rac/redo06 LV Name redo06 VG Name rac LV UUID MGspjs-6JcA-vd9f-0fG5-nf48-QNqX-xOKBdq LV Write Access read/write LV Creation host, time rac1, 2020-09-10 13:28:43 +0900 LV Status available # open 0 LV Size 200.00 MiB Current LE 50 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 251:18 --- Logical volume --- LV Path /dev/rac/spfile LV Name spfile VG Name rac LV UUID 188sIa-Ijtj-qy65-QdEE-9yXs-TMg2-XgzyTv LV Write Access read/write LV Creation host, time rac1, 2020-09-10 13:28:44 +0900 LV Status available # open 0 LV Size 200.00 MiB Current LE 50 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 251:19
분할 생성된 논리 볼륨은 lvdisplay 명령어로 확인할 수 있습니다.
G) 논리 볼륨을 Raw Device로 변환
raw /dev/raw/raw1 /dev/rac/ocr01 raw /dev/raw/raw2 /dev/rac/ocr02 raw /dev/raw/raw3 /dev/rac/vote01 raw /dev/raw/raw4 /dev/rac/vote02 raw /dev/raw/raw5 /dev/rac/vote03 raw /dev/raw/raw6 /dev/rac/system raw /dev/raw/raw7 /dev/rac/sysaux raw /dev/raw/raw8 /dev/rac/users raw /dev/raw/raw9 /dev/rac/temp raw /dev/raw/raw10 /dev/rac/undotbs1 raw /dev/raw/raw11 /dev/rac/undotbs2 raw /dev/raw/raw12 /dev/rac/control01 raw /dev/raw/raw13 /dev/rac/control02 raw /dev/raw/raw14 /dev/rac/redo01 raw /dev/raw/raw15 /dev/rac/redo02 raw /dev/raw/raw16 /dev/rac/redo03 raw /dev/raw/raw17 /dev/rac/redo04 raw /dev/raw/raw18 /dev/rac/redo05 raw /dev/raw/raw19 /dev/rac/redo06 raw /dev/raw/raw20 /dev/rac/spfile
[root@rac1 ~]# raw /dev/raw/raw1 /dev/rac/ocr01 /dev/raw/raw1: bound to major 249, minor 0 [root@rac1 ~]# raw /dev/raw/raw2 /dev/rac/ocr02 /dev/raw/raw2: bound to major 249, minor 1 [root@rac1 ~]# raw /dev/raw/raw3 /dev/rac/vote01 /dev/raw/raw3: bound to major 249, minor 2 [root@rac1 ~]# raw /dev/raw/raw4 /dev/rac/vote02 /dev/raw/raw4: bound to major 249, minor 3 [root@rac1 ~]# raw /dev/raw/raw5 /dev/rac/vote03 /dev/raw/raw5: bound to major 249, minor 4 [root@rac1 ~]# raw /dev/raw/raw6 /dev/rac/system /dev/raw/raw6: bound to major 249, minor 5 [root@rac1 ~]# raw /dev/raw/raw7 /dev/rac/sysaux /dev/raw/raw7: bound to major 249, minor 6 [root@rac1 ~]# raw /dev/raw/raw8 /dev/rac/users /dev/raw/raw8: bound to major 249, minor 7 [root@rac1 ~]# raw /dev/raw/raw9 /dev/rac/temp /dev/raw/raw9: bound to major 249, minor 8 [root@rac1 ~]# raw /dev/raw/raw10 /dev/rac/undotbs1 /dev/raw/raw10: bound to major 249, minor 9 [root@rac1 ~]# raw /dev/raw/raw11 /dev/rac/undotbs2 /dev/raw/raw11: bound to major 249, minor 10 [root@rac1 ~]# raw /dev/raw/raw12 /dev/rac/control01 /dev/raw/raw12: bound to major 249, minor 11 [root@rac1 ~]# raw /dev/raw/raw13 /dev/rac/control02 /dev/raw/raw13: bound to major 249, minor 12 [root@rac1 ~]# raw /dev/raw/raw14 /dev/rac/redo01 /dev/raw/raw14: bound to major 249, minor 13 [root@rac1 ~]# raw /dev/raw/raw15 /dev/rac/redo02 /dev/raw/raw15: bound to major 249, minor 14 [root@rac1 ~]# raw /dev/raw/raw16 /dev/rac/redo03 /dev/raw/raw16: bound to major 249, minor 15 [root@rac1 ~]# raw /dev/raw/raw17 /dev/rac/redo04 /dev/raw/raw17: bound to major 249, minor 16 [root@rac1 ~]# raw /dev/raw/raw18 /dev/rac/redo05 /dev/raw/raw18: bound to major 249, minor 17 [root@rac1 ~]# raw /dev/raw/raw19 /dev/rac/redo06 /dev/raw/raw19: bound to major 249, minor 18 [root@rac1 ~]# raw /dev/raw/raw20 /dev/rac/spfile /dev/raw/raw20: bound to major 249, minor 19
쉘에서 수행할 경우 서버를 재부팅하게 되면 초기화되므로 /etc/rc.d/rc.local에 등록합니다.
H) Raw Device 소유자, 그룹 및 권한 정의
ACTION=="add", KERNEL=="raw*", OWNER=="grid", GROUP=="dba", MODE=="0660" #ACTION=="add", KERNEL=="raw*", OWNER=="oracle", GROUP=="dba", MODE=="0660"
Raw Device 의 소유자, 그룹 및 권한 설정이 재부팅시에도 적용될 수 있도록 rules에 추가합니다.
{"enableNumbering":true}
3. FRA 영역을 위한 OCFS2 설정
A) OCFS2 설치를 위한 Linux Local Yum 설정
외부 인터넷 연결을 하지않고 설치 ISO 이미지로 YUM Repository를 구성하여 yum install을 사용할 수 있도록 설정하는 방법입니다.
mount /dev/cdrom /mnt df | grep mnt
[root@ol6 ~]# mount /dev/cdrom /mnt mount: block device /dev/sr0 is write-protected, mounting read-only [root@ol6 ~]# df | grep mnt Filesystem 1K-blocks Used Available Use% Mounted on /dev/sr0 3976444 3976444 0 100% /mnt
VM에 ISO 파일을 연결하고, cdrom을 디렉토리에 mount 시켜줍니다.
mv /etc/yum.repos.d/public-yum-ol6.repo /etc/yum.repos.d/public-yum-ol6.repo.bak
[root@ol6 ~]# mv /etc/yum.repos.d/public-yum-ol6.repo /etc/yum.repos.d/public-yum-ol6.repo.bak
기존에 생성되어 있던 Repository 파일은 모두 이름을 변경하여, 사용하지 않도록 수정합니다.
[ol6] name=ol6 baseurl=file:///mnt/ enabled=1 gpgcheck=0
[root@ol6 ~]# cat /etc/yum.repos.d/local.repo [ol6] name=ol6 baseurl=file:///mnt/ enabled=1 gpgcheck=0
local.repo라는 Repository 파일을 생성합니다.
Repository 이름과 연결될 디렉토리 등을 입력합니다.
yum clean all yum repolist all
[root@ol6 ~]# yum clean all Loaded plugins: refresh-packagekit, security, ulninfo Cleaning repos: ol6 Cleaning up Everything [root@ol6 ~]# yum repolist all Loaded plugins: refresh-packagekit, security, ulninfo ol6 | 3.7 kB 00:00 ... ol6/primary_db | 3.1 MB 00:00 ... repo id repo name status ol6 ol6 enabled: 3,864 repolist: 3,864
Repository를 재로딩하면 정상적으로 등록된 것을 확인할 수 있습니다.
{}
B) OCFS2 패키지 설치
yum install ocfs2-tools ocfs2-tools-devel
[root@rac1 ~]# yum install ocfs2-tools ocfs2-tools-devel Loaded plugins: refresh-packagekit, security, ulninfo Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package ocfs2-tools.x86_64 0:1.8.6-2.el6 will be installed --> Processing Dependency: redhat-lsb for package: ocfs2-tools-1.8.6-2.el6.x86_64 ---> Package ocfs2-tools-devel.x86_64 0:1.8.6-2.el6 will be installed --> Processing Dependency: e2fsprogs-devel for package: ocfs2-tools-devel-1.8.6-2.el6.x86_64 --> Running transaction check ---> Package e2fsprogs-devel.x86_64 0:1.42.8-1.0.2.el6 will be installed ---> Package redhat-lsb.x86_64 0:4.0-7.0.2.el6 will be installed --> Processing Dependency: redhat-lsb-printing(x86-64) = 4.0-7.0.2.el6 for package: redhat-lsb-4.0-7.0.2.el6.x86_64 --> Processing Dependency: redhat-lsb-graphics(x86-64) = 4.0-7.0.2.el6 for package: redhat-lsb-4.0-7.0.2.el6.x86_64 --> Processing Dependency: redhat-lsb-core(x86-64) = 4.0-7.0.2.el6 for package: redhat-lsb-4.0-7.0.2.el6.x86_64 --> Processing Dependency: redhat-lsb-compat(x86-64) = 4.0-7.0.2.el6 for package: redhat-lsb-4.0-7.0.2.el6.x86_64 --> Running transaction check ---> Package redhat-lsb-compat.x86_64 0:4.0-7.0.2.el6 will be installed ---> Package redhat-lsb-core.x86_64 0:4.0-7.0.2.el6 will be installed --> Processing Dependency: perl-Test-Simple for package: redhat-lsb-core-4.0-7.0.2.el6.x86_64 --> Processing Dependency: perl-CGI for package: redhat-lsb-core-4.0-7.0.2.el6.x86_64 --> Processing Dependency: /usr/bin/pax for package: redhat-lsb-core-4.0-7.0.2.el6.x86_64 ---> Package redhat-lsb-graphics.x86_64 0:4.0-7.0.2.el6 will be installed --> Processing Dependency: libQtXml.so.4()(64bit) for package: redhat-lsb-graphics-4.0-7.0.2.el6.x86_64 --> Processing Dependency: libQtSvg.so.4()(64bit) for package: redhat-lsb-graphics-4.0-7.0.2.el6.x86_64 --> Processing Dependency: libQtSql.so.4()(64bit) for package: redhat-lsb-graphics-4.0-7.0.2.el6.x86_64 --> Processing Dependency: libQtOpenGL.so.4()(64bit) for package: redhat-lsb-graphics-4.0-7.0.2.el6.x86_64 --> Processing Dependency: libQtNetwork.so.4()(64bit) for package: redhat-lsb-graphics-4.0-7.0.2.el6.x86_64 --> Processing Dependency: libQtGui.so.4()(64bit) for package: redhat-lsb-graphics-4.0-7.0.2.el6.x86_64 --> Processing Dependency: libQtCore.so.4()(64bit) for package: redhat-lsb-graphics-4.0-7.0.2.el6.x86_64 ---> Package redhat-lsb-printing.x86_64 0:4.0-7.0.2.el6 will be installed --> Processing Dependency: /usr/bin/lpr for package: redhat-lsb-printing-4.0-7.0.2.el6.x86_64 --> Processing Dependency: /usr/bin/lp for package: redhat-lsb-printing-4.0-7.0.2.el6.x86_64 --> Processing Dependency: /usr/bin/gs for package: redhat-lsb-printing-4.0-7.0.2.el6.x86_64 --> Processing Dependency: /usr/bin/foomatic-rip for package: redhat-lsb-printing-4.0-7.0.2.el6.x86_64 --> Running transaction check ---> Package cups.x86_64 1:1.4.2-74.el6 will be installed --> Processing Dependency: portreserve for package: 1:cups-1.4.2-74.el6.x86_64 --> Processing Dependency: poppler-utils for package: 1:cups-1.4.2-74.el6.x86_64 ---> Package foomatic.x86_64 0:4.0.4-5.el6_7 will be installed --> Processing Dependency: foomatic-db for package: foomatic-4.0.4-5.el6_7.x86_64 ---> Package ghostscript.x86_64 0:8.70-21.el6 will be installed --> Processing Dependency: urw-fonts >= 1.1 for package: ghostscript-8.70-21.el6.x86_64 --> Processing Dependency: ghostscript-fonts for package: ghostscript-8.70-21.el6.x86_64 ---> Package pax.x86_64 0:3.4-10.1.el6 will be installed ---> Package perl-CGI.x86_64 0:3.51-141.el6_7.1 will be installed ---> Package perl-Test-Simple.x86_64 0:0.92-141.el6_7.1 will be installed ---> Package qt.x86_64 1:4.6.2-28.el6_5 will be installed ---> Package qt-x11.x86_64 1:4.6.2-28.el6_5 will be installed --> Processing Dependency: qt-sqlite(x86-64) = 1:4.6.2-28.el6_5 for package: 1:qt-x11-4.6.2-28.el6_5.x86_64 --> Processing Dependency: phonon-backend(x86-64) >= 4.3 for package: 1:qt-x11-4.6.2-28.el6_5.x86_64 --> Running transaction check ---> Package foomatic-db.noarch 0:4.0-7.20091126.el6 will be installed --> Processing Dependency: foomatic-db-ppds = 4.0-7.20091126.el6 for package: foomatic-db-4.0-7.20091126.el6.noarch --> Processing Dependency: foomatic-db-filesystem = 4.0-7.20091126.el6 for package: foomatic-db-4.0-7.20091126.el6.noarch ---> Package ghostscript-fonts.noarch 0:5.50-23.2.el6 will be installed ---> Package phonon-backend-gstreamer.x86_64 1:4.6.2-28.el6_5 will be installed ---> Package poppler-utils.x86_64 0:0.12.4-10.el6 will be installed --> Processing Dependency: poppler = 0.12.4-10.el6 for package: poppler-utils-0.12.4-10.el6.x86_64 --> Processing Dependency: libpoppler.so.5()(64bit) for package: poppler-utils-0.12.4-10.el6.x86_64 --> Processing Dependency: libopenjpeg.so.2()(64bit) for package: poppler-utils-0.12.4-10.el6.x86_64 ---> Package portreserve.x86_64 0:0.0.4-11.el6 will be installed ---> Package qt-sqlite.x86_64 1:4.6.2-28.el6_5 will be installed ---> Package urw-fonts.noarch 0:2.4-11.el6 will be installed --> Running transaction check ---> Package foomatic-db-filesystem.noarch 0:4.0-7.20091126.el6 will be installed ---> Package foomatic-db-ppds.noarch 0:4.0-7.20091126.el6 will be installed ---> Package openjpeg-libs.x86_64 0:1.3-11.el6 will be installed ---> Package poppler.x86_64 0:0.12.4-10.el6 will be installed --> Processing Dependency: poppler-data >= 0.4.0 for package: poppler-0.12.4-10.el6.x86_64 --> Running transaction check ---> Package poppler-data.noarch 0:0.4.0-1.el6 will be installed --> Finished Dependency Resolution Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: ocfs2-tools x86_64 1.8.6-2.el6 ol6 540 k ocfs2-tools-devel x86_64 1.8.6-2.el6 ol6 159 k Installing for dependencies: cups x86_64 1:1.4.2-74.el6 ol6 2.3 M e2fsprogs-devel x86_64 1.42.8-1.0.2.el6 ol6 221 k foomatic x86_64 4.0.4-5.el6_7 ol6 250 k foomatic-db noarch 4.0-7.20091126.el6 ol6 980 k foomatic-db-filesystem noarch 4.0-7.20091126.el6 ol6 3.9 k foomatic-db-ppds noarch 4.0-7.20091126.el6 ol6 19 M ghostscript x86_64 8.70-21.el6 ol6 4.4 M ghostscript-fonts noarch 5.50-23.2.el6 ol6 589 k openjpeg-libs x86_64 1.3-11.el6 ol6 60 k pax x86_64 3.4-10.1.el6 ol6 69 k perl-CGI x86_64 3.51-141.el6_7.1 ol6 209 k perl-Test-Simple x86_64 0.92-141.el6_7.1 ol6 112 k phonon-backend-gstreamer x86_64 1:4.6.2-28.el6_5 ol6 126 k poppler x86_64 0.12.4-10.el6 ol6 558 k poppler-data noarch 0.4.0-1.el6 ol6 2.2 M poppler-utils x86_64 0.12.4-10.el6 ol6 73 k portreserve x86_64 0.0.4-11.el6 ol6 23 k qt x86_64 1:4.6.2-28.el6_5 ol6 3.9 M qt-sqlite x86_64 1:4.6.2-28.el6_5 ol6 51 k qt-x11 x86_64 1:4.6.2-28.el6_5 ol6 12 M redhat-lsb x86_64 4.0-7.0.2.el6 ol6 11 k redhat-lsb-compat x86_64 4.0-7.0.2.el6 ol6 9.9 k redhat-lsb-core x86_64 4.0-7.0.2.el6 ol6 25 k redhat-lsb-graphics x86_64 4.0-7.0.2.el6 ol6 12 k redhat-lsb-printing x86_64 4.0-7.0.2.el6 ol6 11 k urw-fonts noarch 2.4-11.el6 ol6 3.0 M Transaction Summary ================================================================================ Install 28 Package(s) Total download size: 51 M Installed size: 132 M Is this ok [y/N]: y Downloading Packages: -------------------------------------------------------------------------------- Total 105 MB/s | 51 MB 00:00 Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Warning: RPMDB altered outside of yum. Installing : 1:qt-4.6.2-28.el6_5.x86_64 1/28 Installing : foomatic-db-filesystem-4.0-7.20091126.el6.noarch 2/28 Installing : openjpeg-libs-1.3-11.el6.x86_64 3/28 Installing : 1:qt-sqlite-4.6.2-28.el6_5.x86_64 4/28 Installing : 1:phonon-backend-gstreamer-4.6.2-28.el6_5.x86_64 5/28 Installing : 1:qt-x11-4.6.2-28.el6_5.x86_64 6/28 Installing : perl-CGI-3.51-141.el6_7.1.x86_64 7/28 Installing : portreserve-0.0.4-11.el6.x86_64 8/28 Installing : urw-fonts-2.4-11.el6.noarch 9/28 Installing : perl-Test-Simple-0.92-141.el6_7.1.x86_64 10/28 Installing : poppler-data-0.4.0-1.el6.noarch 11/28 Installing : poppler-0.12.4-10.el6.x86_64 12/28 Installing : poppler-utils-0.12.4-10.el6.x86_64 13/28 Installing : 1:cups-1.4.2-74.el6.x86_64 14/28 Installing : foomatic-db-ppds-4.0-7.20091126.el6.noarch 15/28 Installing : foomatic-db-4.0-7.20091126.el6.noarch 16/28 Installing : ghostscript-fonts-5.50-23.2.el6.noarch 17/28 Installing : ghostscript-8.70-21.el6.x86_64 18/28 Installing : foomatic-4.0.4-5.el6_7.x86_64 19/28 Installing : pax-3.4-10.1.el6.x86_64 20/28 Installing : redhat-lsb-core-4.0-7.0.2.el6.x86_64 21/28 Installing : redhat-lsb-printing-4.0-7.0.2.el6.x86_64 22/28 Installing : redhat-lsb-graphics-4.0-7.0.2.el6.x86_64 23/28 Installing : redhat-lsb-compat-4.0-7.0.2.el6.x86_64 24/28 Installing : redhat-lsb-4.0-7.0.2.el6.x86_64 25/28 Installing : ocfs2-tools-1.8.6-2.el6.x86_64 26/28 Installing : e2fsprogs-devel-1.42.8-1.0.2.el6.x86_64 27/28 Installing : ocfs2-tools-devel-1.8.6-2.el6.x86_64 28/28 Verifying : e2fsprogs-devel-1.42.8-1.0.2.el6.x86_64 1/28 Verifying : redhat-lsb-printing-4.0-7.0.2.el6.x86_64 2/28 Verifying : foomatic-4.0.4-5.el6_7.x86_64 3/28 Verifying : redhat-lsb-core-4.0-7.0.2.el6.x86_64 4/28 Verifying : openjpeg-libs-1.3-11.el6.x86_64 5/28 Verifying : pax-3.4-10.1.el6.x86_64 6/28 Verifying : ghostscript-8.70-21.el6.x86_64 7/28 Verifying : ghostscript-fonts-5.50-23.2.el6.noarch 8/28 Verifying : 1:qt-x11-4.6.2-28.el6_5.x86_64 9/28 Verifying : 1:cups-1.4.2-74.el6.x86_64 10/28 Verifying : foomatic-db-filesystem-4.0-7.20091126.el6.noarch 11/28 Verifying : poppler-data-0.4.0-1.el6.noarch 12/28 Verifying : poppler-utils-0.12.4-10.el6.x86_64 13/28 Verifying : ocfs2-tools-devel-1.8.6-2.el6.x86_64 14/28 Verifying : foomatic-db-ppds-4.0-7.20091126.el6.noarch 15/28 Verifying : perl-Test-Simple-0.92-141.el6_7.1.x86_64 16/28 Verifying : urw-fonts-2.4-11.el6.noarch 17/28 Verifying : redhat-lsb-graphics-4.0-7.0.2.el6.x86_64 18/28 Verifying : 1:qt-4.6.2-28.el6_5.x86_64 19/28 Verifying : portreserve-0.0.4-11.el6.x86_64 20/28 Verifying : 1:qt-sqlite-4.6.2-28.el6_5.x86_64 21/28 Verifying : ocfs2-tools-1.8.6-2.el6.x86_64 22/28 Verifying : perl-CGI-3.51-141.el6_7.1.x86_64 23/28 Verifying : poppler-0.12.4-10.el6.x86_64 24/28 Verifying : redhat-lsb-compat-4.0-7.0.2.el6.x86_64 25/28 Verifying : 1:phonon-backend-gstreamer-4.6.2-28.el6_5.x86_64 26/28 Verifying : foomatic-db-4.0-7.20091126.el6.noarch 27/28 Verifying : redhat-lsb-4.0-7.0.2.el6.x86_64 28/28 Installed: ocfs2-tools.x86_64 0:1.8.6-2.el6 ocfs2-tools-devel.x86_64 0:1.8.6-2.el6 Dependency Installed: cups.x86_64 1:1.4.2-74.el6 e2fsprogs-devel.x86_64 0:1.42.8-1.0.2.el6 foomatic.x86_64 0:4.0.4-5.el6_7 foomatic-db.noarch 0:4.0-7.20091126.el6 foomatic-db-filesystem.noarch 0:4.0-7.20091126.el6 foomatic-db-ppds.noarch 0:4.0-7.20091126.el6 ghostscript.x86_64 0:8.70-21.el6 ghostscript-fonts.noarch 0:5.50-23.2.el6 openjpeg-libs.x86_64 0:1.3-11.el6 pax.x86_64 0:3.4-10.1.el6 perl-CGI.x86_64 0:3.51-141.el6_7.1 perl-Test-Simple.x86_64 0:0.92-141.el6_7.1 phonon-backend-gstreamer.x86_64 1:4.6.2-28.el6_5 poppler.x86_64 0:0.12.4-10.el6 poppler-data.noarch 0:0.4.0-1.el6 poppler-utils.x86_64 0:0.12.4-10.el6 portreserve.x86_64 0:0.0.4-11.el6 qt.x86_64 1:4.6.2-28.el6_5 qt-sqlite.x86_64 1:4.6.2-28.el6_5 qt-x11.x86_64 1:4.6.2-28.el6_5 redhat-lsb.x86_64 0:4.0-7.0.2.el6 redhat-lsb-compat.x86_64 0:4.0-7.0.2.el6 redhat-lsb-core.x86_64 0:4.0-7.0.2.el6 redhat-lsb-graphics.x86_64 0:4.0-7.0.2.el6 redhat-lsb-printing.x86_64 0:4.0-7.0.2.el6 urw-fonts.noarch 0:2.4-11.el6 Complete!
OCFS2 패키지와 연관된 패키지를 함께 설치하기 위해서는 yum을 이용하는 것이 편리합니다.
C) 클러스터 및 노드 추가
o2cb add-cluster <클러스터명>
[root@rac1 ~]# o2cb add-cluster ocfs2
o2cb add-node <클러스터명> <노드명> --ip <IP 주소>
[root@rac1 ~]# o2cb add-node ocfs2 rac1 --ip 10.0.5.101 [root@rac1 ~]# o2cb add-node ocfs2 rac2 --ip 10.0.5.102
cat /etc/ocfs2/cluster.conf
[root@rac1 ~]# cat /etc/ocfs2/cluster.conf cluster: heartbeat_mode = local node_count = 2 name = ocfs2 node: number = 0 cluster = ocfs2 ip_port = 7777 ip_address = 10.0.5.101 name = rac1 node: number = 1 cluster = ocfs2 ip_port = 7777 ip_address = 10.0.5.102 name = rac2
D) 클러스터 스택 설정 및 확인
service o2cb configure
[root@rac1 ~]# service o2cb configure Configuring the O2CB driver. This will configure the on-boot properties of the O2CB driver. The following questions will determine whether the driver is loaded on boot. The current values will be shown in brackets ('[]'). Hitting <ENTER> without typing an answer will keep that current value. Ctrl-C will abort. Load O2CB driver on boot (y/n) [n]: y Cluster stack backing O2CB [o2cb]: Cluster to start on boot (Enter "none" to clear) [ocfs2]: Specify heartbeat dead threshold (>=7) [31]: Specify network idle timeout in ms (>=5000) [30000]: Specify network keepalive delay in ms (>=1000) [2000]: Specify network reconnect delay in ms (>=2000) [2000]: Writing O2CB configuration: OK checking debugfs... Loading filesystem "configfs": OK Mounting configfs filesystem at /sys/kernel/config: OK Loading stack plugin "o2cb": OK Loading filesystem "ocfs2_dlmfs": OK Creating directory '/dlm': OK Mounting ocfs2_dlmfs filesystem at /dlm: OK Setting cluster stack "o2cb": OK Registering O2CB cluster "ocfs2": OK Setting O2CB cluster timeouts : OK
service o2cb status
[root@rac1 ~]# service o2cb status Driver for "configfs": Loaded Filesystem "configfs": Mounted Stack glue driver: Loaded Stack plugin "o2cb": Loaded Driver for "ocfs2_dlmfs": Loaded Filesystem "ocfs2_dlmfs": Mounted Checking O2CB cluster "ocfs2": Online Heartbeat dead threshold: 31 Network idle timeout: 30000 Network keepalive delay: 2000 Network reconnect delay: 2000 Heartbeat mode: Local Checking O2CB heartbeat: Not active Debug file system at /sys/kernel/debug: mounted
E) 클러스터 활성화
chkconfig o2cb on chkconfig ocfs2 on
[root@rac1 ~]# chkconfig o2cb on [root@rac1 ~]# chkconfig ocfs2 on
F) 리눅스 커널 변수 수정 및 적용
kernel.panic = 30 kernel.panic_on_oops = 1
[root@rac1 ~]# cat /etc/sysctl.conf | grep panic # oracle-rdbms-server-11gR2-preinstall setting for kernel.panic_on_oops is 1 per Orabug 19212317 kernel.panic_on_oops = 1 kernel.panic = 30
sysctl -p
[root@rac1 ~]# sysctl -p net.ipv4.ip_forward = 0 net.ipv4.conf.default.rp_filter = 1 net.ipv4.conf.default.accept_source_route = 0 kernel.sysrq = 0 kernel.core_uses_pid = 1 net.ipv4.tcp_syncookies = 1 kernel.msgmnb = 65536 kernel.msgmax = 65536 kernel.shmall = 4294967296 fs.file-max = 6815744 kernel.sem = 250 32000 100 128 kernel.shmmni = 4096 kernel.shmmax = 4398046511104 kernel.panic_on_oops = 1 kernel.panic = 30 net.core.rmem_default = 262144 net.core.rmem_max = 4194304 net.core.wmem_default = 262144 net.core.wmem_max = 1048576 fs.aio-max-nr = 1048576 net.ipv4.ip_local_port_range = 9000 65500
G) OCFS2 볼륨 생성 및 마운트
mkfs.ocfs2 -L <볼륨명> /dev/sdb2
[root@rac1 ~]# mkfs.ocfs2 -L fravol /dev/sdb2 mkfs.ocfs2 1.8.6 Cluster stack: classic o2cb Label: fravol Features: sparse extended-slotmap backup-super unwritten inline-data strict-journal-super xattr indexed-dirs refcount discontig-bg Block size: 4096 (12 bits) Cluster size: 4096 (12 bits) Volume size: 5354655744 (1307289 clusters) (1307289 blocks) Cluster groups: 41 (tail covers 17049 clusters, rest cover 32256 clusters) Extent allocator size: 4194304 (1 groups) Journal size: 67108864 Node slots: 4 Creating bitmaps: done Initializing superblock: done Writing system files: done Writing superblock: done Writing backup superblock: 2 block(s) Formatting Journals: done Growing extent allocator: done Formatting slot map: done Formatting quota files: done Writing lost+found: done mkfs.ocfs2 successful
mkdir /FRA mount /dev/sdb2 /FRA chown -R oracle:dba /FRA
[root@rac1 ~]# mkdir /FRA [root@rac1 ~]# mount /dev/sdb2 /FRA [root@rac1 ~]# chown -R oracle:dba /FRA [root@rac1 ~]# chmod -R 770 /FRA [root@rac1 ~]# ls /FRA lost+found
/dev/sdb2 /FRA ocfs2 _netdev,defaults 0 0
chown -R oracle:dba /FRA chmod -R 770 /FRA
{}
{"enableNumbering":true}
V. 2번 노드 설정
1. 복제본 생성
vboxmanage clonemedium <원본>.vdi <복제본>.vdi --format VDI
1번 노드를 먼저 정지하고, 1번 노드에 대한 복제본을 생성합니다.
복제본은 좌측의 명령어 또는 VirtualBox의 가상 미디어 관리자에서 복사를 통해 복제할 수 있습니다.
파일을 그대로 복사할 경우 UUID가 동일하여 충돌하게 되므로 반드시 VirtualBox에서 제공하는 방식으로 복제해야 합니다.
2. 네트워크 설정 변경
A) IP 정보 변경
1번 노드와 동일한 사양으로 VirtualBox에 2번 노드를 생성합니다.
복제한 1번 노드의 가상 디스크 이미지와 공유 스토리지를 모두 연결시키고 부팅한 후, root 유저로 접속합니다.
복제된 서버는 1번 서버의 정보와 함께 MAC 주소가 다른 네트워크 카드가 등록되어 있으므로, 2번 노드에 맞게 변경해야 합니다.
먼저 root 유저로 접속한 상태에서 시스템 > 기본 설정 > 네트워크 연결에 갑니다.
기존 1번 노드에서 복제된 네트워크 정보와 함께 2번 노드와 함께 새로 인식된 네트워크 카드에 대한 정보가 나옵니다.
1번 노드에서 사용된 네트워크 등록 정보는 2번에서 사용할 수 없으므로 public과 private 네트워크 정보를 모두 삭제합니다.
새로 인식한 네트워크 카드에 2번 노드에 대한 정보를 등록해야 합니다.
먼저 public 네트워크 정보를 입력합니다.
네트워크 활성화를 위해 '자동으로 연결'을 체크합니다.
IPv4 설정 탭으로 이동해서 방식은 '수동'을 선택하고 2번 노드에 맞는 Public IP 정보를 추가로 입력합니다.
값을 입력했으면 <적용>을 클릭합니다.
Private 네트워크도 동일하게 '자동으로 연결'을 체크합니다.
IPv4 설정 탭으로 이동하여 방식은 '수동'을 선택하고 IP는 2번 노드의 private 네트워크 정보에 맞게 입력한 후 <적용> 버튼을 클릭합니다.
기본적인 IP 정보가 새로운 네트워크 카드에 등록되었으므로 <닫기>를 클릭합니다.
B) 네트워크명 변경
ifconfig -a vi /etc/udev/rules.d/70-persistent-net.rules cd /etc/sysconfig/network-scripts mv ifcfg-<pubic ip 할당 NIC명> ifcfg-eth0 mv ifcfg-<private ip 할당 NIC명> ifcfg-eth1
[root@rac2 ~]# ifconfig -a eth2 Link encap:Ethernet HWaddr 08:00:27:9B:01:9E inet addr:10.0.1.102 Bcast:10.0.1.255 Mask:255.255.255.0 inet6 addr: fe80::a00:27ff:fe9b:19e/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:332 errors:0 dropped:0 overruns:0 frame:0 TX packets:220 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:32398 (31.6 KiB) TX bytes:32196 (31.4 KiB) eth3 Link encap:Ethernet HWaddr 08:00:27:06:0D:38 inet addr:10.0.5.102 Bcast:10.0.5.255 Mask:255.255.255.0 inet6 addr: fe80::a00:27ff:fe06:d38/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:11 errors:0 dropped:0 overruns:0 frame:0 TX packets:20 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:756 (756.0 b) TX bytes:1428 (1.3 KiB) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:48 errors:0 dropped:0 overruns:0 frame:0 TX packets:48 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:2944 (2.8 KiB) TX bytes:2944 (2.8 KiB)
[root@rac2 ~]# vi /etc/udev/rules.d/70-persistent-net.rules
예제에서는 eth0과 eth1은 1번 노드에서 복제된 정보로 미사용인 네트워크 이므로 삭제하였습니다.
# PCI device 0x8086:0x100e (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="08:00:27:76:c1:bf", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
# PCI device 0x8086:0x100e (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="08:00:27:67:3c:e6", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
# PCI device 0x8086:0x100e (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="08:00:27:9b:01:9e", ATTR{type}=="1", KERNEL=="eth*", NAME="eth2"
# PCI device 0x8086:0x100e (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="08:00:27:06:0d:38", ATTR{type}=="1", KERNEL=="eth*", NAME="eth3"
그리고 1번 노드와 동일하게 public은 eth0, private는 eth1로 네트워크 이름을 변경하였습니다.
# PCI device 0x8086:0x100e (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="08:00:27:9b:01:9e", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
# PCI device 0x8086:0x100e (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="08:00:27:06:0d:38", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
network-scripts에 있는 파일도 변경된 네트워크 이름에 맞게 변경합니다.
[root@rac2 rules.d]# cd /etc/sysconfig/network-scripts [root@rac2 network-scripts]# mv ifcfg-Auto_eth2 ifcfg-eth0 [root@rac2 network-scripts]# mv ifcfg-Auto_eth3 ifcfg-eth1
등록된 IP 정보를 ifconfig 명령으로 조회합니다.
70-persistent-net.rules 파일에 있는 미사용 네트워크 정보를 삭제하고, 새로 추가된 네트워크 명(eth*)을 1번 노드에 맞게 변경합니다.
네트워크 스크립트 파일명도 함께 변경합니다.
3. 호스트명 및 환경 파일 수정
HOSTNAME=rac2
호스트명 또한 2번 노드의 호스트명으로 변경합니다.
export ORACLE_HOSTNAME=rac2 export ORACLE_SID=racdb2
grid 유저의 환경 파일도 수정합니다.
export ORACLE_HOSTNAME=rac2 export ORACLE_SID=+ASM2
마찬가지로 oracle 유저의 환경 파일도 수정합니다.
4. 2번 노드 실행 모드 변경
id:3:initdefault:
리소스 사용을 줄이기 위해 2번은 GUI 모드가 아닌 텍스트 모드로 실행되도록 수정합니다. (재부팅시 적용됩니다.)
5. 재기동
reboot
2번 노드를 재기동합니다.
더불어 1번 노드도 기동합니다.
6. 사전 테스트
ping -c 3 rac1 ping -c 3 rac1-priv ping -c 3 rac2 ping -c 3 rac2-priv nslookup rac-scan ssh rac1 date ssh rac1-priv date ssh rac2 date ssh rac2-priv date
[root@rac1 ~]# ping -c 3 rac1 PING rac1 (10.0.1.101) 56(84) bytes of data. 64 bytes from rac1 (10.0.1.101): icmp_seq=1 ttl=64 time=0.028 ms 64 bytes from rac1 (10.0.1.101): icmp_seq=2 ttl=64 time=0.071 ms 64 bytes from rac1 (10.0.1.101): icmp_seq=3 ttl=64 time=0.056 ms --- rac1 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2006ms rtt min/avg/max/mdev = 0.028/0.051/0.071/0.019 ms [root@rac1 ~]# ping -c 3 rac1-priv PING rac1-priv (10.0.5.101) 56(84) bytes of data. 64 bytes from rac1-priv (10.0.5.101): icmp_seq=1 ttl=64 time=0.023 ms 64 bytes from rac1-priv (10.0.5.101): icmp_seq=2 ttl=64 time=0.053 ms 64 bytes from rac1-priv (10.0.5.101): icmp_seq=3 ttl=64 time=0.056 ms --- rac1-priv ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2004ms rtt min/avg/max/mdev = 0.023/0.044/0.056/0.014 ms [root@rac1 ~]# ping -c 3 rac2 PING rac2 (10.0.1.102) 56(84) bytes of data. 64 bytes from rac2 (10.0.1.102): icmp_seq=1 ttl=64 time=0.819 ms 64 bytes from rac2 (10.0.1.102): icmp_seq=2 ttl=64 time=0.643 ms 64 bytes from rac2 (10.0.1.102): icmp_seq=3 ttl=64 time=0.634 ms --- rac2 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2008ms rtt min/avg/max/mdev = 0.634/0.698/0.819/0.090 ms [root@rac1 ~]# ping -c 3 rac2-priv PING rac2-priv (10.0.5.102) 56(84) bytes of data. 64 bytes from rac2-priv (10.0.5.102): icmp_seq=1 ttl=64 time=0.745 ms 64 bytes from rac2-priv (10.0.5.102): icmp_seq=2 ttl=64 time=0.610 ms 64 bytes from rac2-priv (10.0.5.102): icmp_seq=3 ttl=64 time=0.707 ms --- rac2-priv ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2014ms rtt min/avg/max/mdev = 0.610/0.687/0.745/0.060 ms [root@rac1 ~]# nslookup rac-scan Server: 127.0.0.1 Address: 127.0.0.1#53 Name: rac-scan Address: 10.0.1.120 [root@rac1 ~]# ssh rac1 date The authenticity of host 'rac1 (10.0.1.101)' can't be established. RSA key fingerprint is 6c:aa:b3:f6:9b:9d:3b:88:fe:7a:ce:6d:10:ee:0c:eb. Are you sure you want to continue connecting (yes/no) root@rac1's password: 2017. 04. 15. (토) 23:37:03 KST [root@rac1 ~]# ssh rac1 date The authenticity of host 'rac1 (10.0.1.101)' can't be established. RSA key fingerprint is 6c:aa:b3:f6:9b:9d:3b:88:fe:7a:ce:6d:10:ee:0c:eb. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'rac1,10.0.1.101' (RSA) to the list of known hosts. root@rac1's password: 2017. 04. 15. (토) 23:37:18 KST [root@rac1 ~]# ssh rac1-priv date The authenticity of host 'rac1-priv (10.0.5.101)' can't be established. RSA key fingerprint is 6c:aa:b3:f6:9b:9d:3b:88:fe:7a:ce:6d:10:ee:0c:eb. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'rac1-priv,10.0.5.101' (RSA) to the list of known hosts. root@rac1-priv's password: 2017. 04. 15. (토) 23:37:36 KST [root@rac1 ~]# ssh rac2 date The authenticity of host 'rac2 (10.0.1.102)' can't be established. RSA key fingerprint is 6c:aa:b3:f6:9b:9d:3b:88:fe:7a:ce:6d:10:ee:0c:eb. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'rac2,10.0.1.102' (RSA) to the list of known hosts. root@rac2's password: 2017. 04. 15. (토) 23:37:47 KST [root@rac1 ~]# ssh rac2-priv date The authenticity of host 'rac2-priv (10.0.5.102)' can't be established. RSA key fingerprint is 6c:aa:b3:f6:9b:9d:3b:88:fe:7a:ce:6d:10:ee:0c:eb. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'rac2-priv,10.0.5.102' (RSA) to the list of known hosts. root@rac2-priv's password: 2017. 04. 15. (토) 23:38:06 KST
[root@rac2 ~]# ping -c 3 rac1 PING rac1 (10.0.1.101) 56(84) bytes of data. 64 bytes from rac1 (10.0.1.101): icmp_seq=1 ttl=64 time=0.325 ms 64 bytes from rac1 (10.0.1.101): icmp_seq=2 ttl=64 time=0.417 ms 64 bytes from rac1 (10.0.1.101): icmp_seq=3 ttl=64 time=0.942 ms --- rac1 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2003ms rtt min/avg/max/mdev = 0.325/0.561/0.942/0.272 ms [root@rac2 ~]# ping -c 3 rac1-priv PING rac1-priv (10.0.5.101) 56(84) bytes of data. 64 bytes from rac1-priv (10.0.5.101): icmp_seq=1 ttl=64 time=0.377 ms 64 bytes from rac1-priv (10.0.5.101): icmp_seq=2 ttl=64 time=0.519 ms 64 bytes from rac1-priv (10.0.5.101): icmp_seq=3 ttl=64 time=0.517 ms --- rac1-priv ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2002ms rtt min/avg/max/mdev = 0.377/0.471/0.519/0.066 ms [root@rac2 ~]# ping -c 3 rac2 PING rac2 (10.0.1.102) 56(84) bytes of data. 64 bytes from rac2 (10.0.1.102): icmp_seq=1 ttl=64 time=0.023 ms 64 bytes from rac2 (10.0.1.102): icmp_seq=2 ttl=64 time=0.042 ms 64 bytes from rac2 (10.0.1.102): icmp_seq=3 ttl=64 time=0.046 ms --- rac2 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 1999ms rtt min/avg/max/mdev = 0.023/0.037/0.046/0.010 ms [root@rac2 ~]# ping -c 3 rac2-priv PING rac2-priv (10.0.5.102) 56(84) bytes of data. 64 bytes from rac2-priv (10.0.5.102): icmp_seq=1 ttl=64 time=0.016 ms 64 bytes from rac2-priv (10.0.5.102): icmp_seq=2 ttl=64 time=0.049 ms 64 bytes from rac2-priv (10.0.5.102): icmp_seq=3 ttl=64 time=0.056 ms --- rac2-priv ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2001ms rtt min/avg/max/mdev = 0.016/0.040/0.056/0.018 ms [root@rac2 ~]# nslookup rac-scan Server: 127.0.0.1 Address: 127.0.0.1#53 Name: rac-scan Address: 10.0.1.120 [root@rac2 ~]# ssh rac1 date The authenticity of host 'rac1 (10.0.1.101)' can't be established. RSA key fingerprint is 6c:aa:b3:f6:9b:9d:3b:88:fe:7a:ce:6d:10:ee:0c:eb. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'rac1,10.0.1.101' (RSA) to the list of known hosts. root@rac1's password: 2017. 04. 15. (토) 23:39:25 KST [root@rac2 ~]# ssh rac1-priv date The authenticity of host 'rac1-priv (10.0.5.101)' can't be established. RSA key fingerprint is 6c:aa:b3:f6:9b:9d:3b:88:fe:7a:ce:6d:10:ee:0c:eb. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'rac1-priv,10.0.5.101' (RSA) to the list of known hosts. root@rac1-priv's password: 2017. 04. 15. (토) 23:39:35 KST [root@rac2 ~]# ssh rac2 date The authenticity of host 'rac2 (10.0.1.102)' can't be established. RSA key fingerprint is 6c:aa:b3:f6:9b:9d:3b:88:fe:7a:ce:6d:10:ee:0c:eb. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'rac2,10.0.1.102' (RSA) to the list of known hosts. root@rac2's password: 2017. 04. 15. (토) 23:39:46 KST [root@rac2 ~]# ssh rac2-priv date The authenticity of host 'rac2-priv (10.0.5.102)' can't be established. RSA key fingerprint is 6c:aa:b3:f6:9b:9d:3b:88:fe:7a:ce:6d:10:ee:0c:eb. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'rac2-priv,10.0.5.102' (RSA) to the list of known hosts. root@rac2-priv's password: 2017. 04. 15. (토) 23:39:55 KST
1번과 2번 노드가 네트워크 충돌없이 서로를 인식하는지 테스트합니다.
설치에 앞서 dnsmasq에서 SCAN 정보를 제대로 인식하는지, 그리고 SSH 사용이 정상적으로 가능한지 테스트합니다.
VI. Grid 설치
1. Grid 설치 사전 설정
cd <설치 파일 압축해제 경로>/grid/rpm/ rpm -ivh cvuqdisk-1.0.9-1.rpm scp cvuqdisk-1.0.9-1.rpm root@[HOST_NAME2]:/tmp ssh root@[HOST_NAME2] cd /tmp rpm -ivh cvuqdisk-1.0.9-1.rpm
[root@rac1 ~]# cd /media/sf_oracle/grid/rpm [root@rac1 rpm]# rpm -ivh cvuqdisk-1.0.9-1.rpm 준비 중... ########################################### [100%] Using default group oinstall to install package 1:cvuqdisk ########################################### [100%] [root@rac1 rpm]# scp cvuqdisk-1.0.9-1.rpm root@rac2:/tmp The authenticity of host 'rac2 (10.0.1.102)' can't be established. RSA key fingerprint is 12:cf:8a:65:85:4c:2d:9d:bd:b8:92:3f:49:6c:2d:a9. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'rac2,10.0.1.102' (RSA) to the list of known hosts. root@rac2's password: cvuqdisk-1.0.9-1.rpm 100% 8288 8.1KB/s 00:00 [root@rac1 rpm]# ssh root@rac2 root@rac2's password: Last login: Fri Apr 5 18:11:42 2019 from 10.0.1.1 [root@rac2 ~]# cd /tmp [root@rac2 tmp]# rpm -ivh cvuqdisk-1.0.9-1.rpm 준비 중... ########################################### [100%] Using default group oinstall to install package 1:cvuqdisk ########################################### [100%]
cd <설치 파일 압축해제 경로>/grid/sshsetup ./sshUserSetup.sh -user [USER_NAME] -hosts "[HOST_NAME1] [HOST_NAME2]" -noPromptPassphrase -advanced
[grid@+ASM1 ~]$ cd /media/sf_oracle/grid/sshsetup [grid@+ASM1 sshsetup]$ ./sshUserSetup.sh -user grid -hosts "rac1 rac2" -noPromptPassphrase -advanced The output of this script is also logged into /tmp/sshUserSetup_2019-04-05-18-29-24.log Hosts are rac1 rac2 user is grid Platform:- Linux Checking if the remote hosts are reachable PING rac1 (10.0.1.101) 56(84) bytes of data. 64 bytes from rac1 (10.0.1.101): icmp_seq=1 ttl=64 time=0.027 ms 64 bytes from rac1 (10.0.1.101): icmp_seq=2 ttl=64 time=0.060 ms 64 bytes from rac1 (10.0.1.101): icmp_seq=3 ttl=64 time=0.044 ms 64 bytes from rac1 (10.0.1.101): icmp_seq=4 ttl=64 time=0.041 ms 64 bytes from rac1 (10.0.1.101): icmp_seq=5 ttl=64 time=0.047 ms --- rac1 ping statistics --- 5 packets transmitted, 5 received, 0% packet loss, time 4002ms rtt min/avg/max/mdev = 0.027/0.043/0.060/0.013 ms PING rac2 (10.0.1.102) 56(84) bytes of data. 64 bytes from rac2 (10.0.1.102): icmp_seq=1 ttl=64 time=0.392 ms 64 bytes from rac2 (10.0.1.102): icmp_seq=2 ttl=64 time=0.443 ms 64 bytes from rac2 (10.0.1.102): icmp_seq=3 ttl=64 time=0.483 ms 64 bytes from rac2 (10.0.1.102): icmp_seq=4 ttl=64 time=0.439 ms 64 bytes from rac2 (10.0.1.102): icmp_seq=5 ttl=64 time=0.893 ms --- rac2 ping statistics --- 5 packets transmitted, 5 received, 0% packet loss, time 4006ms rtt min/avg/max/mdev = 0.392/0.530/0.893/0.183 ms Remote host reachability check succeeded. The following hosts are reachable: rac1 rac2. The following hosts are not reachable: . All hosts are reachable. Proceeding further... firsthost rac1 numhosts 2 The script will setup SSH connectivity from the host rac1 to all the remote hosts. After the script is executed, the user can use SSH to run commands on the remote hosts or copy files between this host rac1 and the remote hosts without being prompted for passwords or confirmations. NOTE 1: As part of the setup procedure, this script will use ssh and scp to copy files between the local host and the remote hosts. Since the script does not store passwords, you may be prompted for the passwords during the execution of the script whenever ssh or scp is invoked. NOTE 2: AS PER SSH REQUIREMENTS, THIS SCRIPT WILL SECURE THE USER HOME DIRECTORY AND THE .ssh DIRECTORY BY REVOKING GROUP AND WORLD WRITE PRIVILEDGES TO THESE directories. Do you want to continue and let the script make the above mentioned changes (yes/no)? yes The user chose yes User chose to skip passphrase related questions. Creating .ssh directory on local host, if not present already Creating authorized_keys file on local host Changing permissions on authorized_keys to 644 on local host Creating known_hosts file on local host Changing permissions on known_hosts to 644 on local host Creating config file on local host If a config file exists already at /home/grid/.ssh/config, it would be backed up to /home/grid/.ssh/config.backup. Removing old private/public keys on local host Running SSH keygen on local host with empty passphrase Generating public/private rsa key pair. Your identification has been saved in /home/grid/.ssh/id_rsa. Your public key has been saved in /home/grid/.ssh/id_rsa.pub. The key fingerprint is: 15:a9:b4:5a:72:7d:bd:bc:4a:5f:89:a7:55:df:3d:07 grid@rac1 The key's randomart image is: +--[ RSA 1024]----+ | .. | | . .. | | . +. . | | . =.. . . | | =S . .E..| | . +.*| | .. **| | . .=.o| | .o. | +-----------------+ Creating .ssh directory and setting permissions on remote host rac1 THE SCRIPT WOULD ALSO BE REVOKING WRITE PERMISSIONS FOR group AND others ON THE HOME DIRECTORY FOR grid. THIS IS AN SSH REQUIREMENT. The script would create ~grid/.ssh/config file on remote host rac1. If a config file exists already at ~grid/.ssh/config, it would be backed up to ~grid/.ssh/config.backup. The user may be prompted for a password here since the script would be running SSH on host rac1. Warning: Permanently added 'rac1,10.0.1.101' (RSA) to the list of known hosts. grid@rac1's password: Done with creating .ssh directory and setting permissions on remote host rac1. Creating .ssh directory and setting permissions on remote host rac2 THE SCRIPT WOULD ALSO BE REVOKING WRITE PERMISSIONS FOR group AND others ON THE HOME DIRECTORY FOR grid. THIS IS AN SSH REQUIREMENT. The script would create ~grid/.ssh/config file on remote host rac2. If a config file exists already at ~grid/.ssh/config, it would be backed up to ~grid/.ssh/config.backup. The user may be prompted for a password here since the script would be running SSH on host rac2. Warning: Permanently added 'rac2,10.0.1.102' (RSA) to the list of known hosts. grid@rac2's password: Done with creating .ssh directory and setting permissions on remote host rac2. Copying local host public key to the remote host rac1 The user may be prompted for a password or passphrase here since the script would be using SCP for host rac1. grid@rac1's password: Done copying local host public key to the remote host rac1 Copying local host public key to the remote host rac2 The user may be prompted for a password or passphrase here since the script would be using SCP for host rac2. grid@rac2's password: Done copying local host public key to the remote host rac2 Creating keys on remote host rac1 if they do not exist already. This is required to setup SSH on host rac1. Creating keys on remote host rac2 if they do not exist already. This is required to setup SSH on host rac2. Generating public/private rsa key pair. Your identification has been saved in .ssh/id_rsa. Your public key has been saved in .ssh/id_rsa.pub. The key fingerprint is: 6a:5c:65:a6:ec:39:18:91:2e:3c:0e:33:b2:ec:1d:e5 grid@rac2 The key's randomart image is: +--[ RSA 1024]----+ | | | . | | o + | | . . o = | |. + +.o S | |.o =o+ * . | |.. ..E= + | |. . .. . | | . . | +-----------------+ Updating authorized_keys file on remote host rac1 Updating known_hosts file on remote host rac1 Updating authorized_keys file on remote host rac2 Updating known_hosts file on remote host rac2 cat: /home/grid/.ssh/known_hosts.tmp: 그런 파일이나 디렉터리가 없습니다 cat: /home/grid/.ssh/authorized_keys.tmp: 그런 파일이나 디렉터리가 없습니다 SSH setup is complete. ------------------------------------------------------------------------ Verifying SSH setup =================== The script will now run the date command on the remote nodes using ssh to verify if ssh is setup correctly. IF THE SETUP IS CORRECTLY SETUP, THERE SHOULD BE NO OUTPUT OTHER THAN THE DATE AND SSH SHOULD NOT ASK FOR PASSWORDS. If you see any output other than date or are prompted for the password, ssh is not setup correctly and you will need to resolve the issue and set up ssh again. The possible causes for failure could be: 1. The server settings in /etc/ssh/sshd_config file do not allow ssh for user grid. 2. The server may have disabled public key based authentication. 3. The client public key on the server may be outdated. 4. ~grid or ~grid/.ssh on the remote host may not be owned by grid. 5. User may not have passed -shared option for shared remote users or may be passing the -shared option for non-shared remote users. 6. If there is output in addition to the date, but no password is asked, it may be a security alert shown as part of company policy. Append the additional text to the <OMS HOME>/sysman/prov/resources/ignoreMessages.txt file. ------------------------------------------------------------------------ --rac1:-- Running /usr/bin/ssh -x -l grid rac1 date to verify SSH connectivity has been setup from local host to rac1. IF YOU SEE ANY OTHER OUTPUT BESIDES THE OUTPUT OF THE DATE COMMAND OR IF YOU ARE PROMPTED FOR A PASSWORD HERE, IT MEANS SSH SETUP HAS NOT BEEN SUCCESSFUL. Please note that being prompted for a passphrase may be OK but being prompted for a password is ERROR. 2019. 04. 05. (금) 18:29:47 KST ------------------------------------------------------------------------ --rac2:-- Running /usr/bin/ssh -x -l grid rac2 date to verify SSH connectivity has been setup from local host to rac2. IF YOU SEE ANY OTHER OUTPUT BESIDES THE OUTPUT OF THE DATE COMMAND OR IF YOU ARE PROMPTED FOR A PASSWORD HERE, IT MEANS SSH SETUP HAS NOT BEEN SUCCESSFUL. Please note that being prompted for a passphrase may be OK but being prompted for a password is ERROR. 2019. 04. 05. (금) 18:29:47 KST ------------------------------------------------------------------------ ------------------------------------------------------------------------ Verifying SSH connectivity has been setup from rac1 to rac1 IF YOU SEE ANY OTHER OUTPUT BESIDES THE OUTPUT OF THE DATE COMMAND OR IF YOU ARE PROMPTED FOR A PASSWORD HERE, IT MEANS SSH SETUP HAS NOT BEEN SUCCESSFUL. bash: -c: line 0: unexpected EOF while looking for matching `"' bash: -c: line 1: syntax error: unexpected end of file ------------------------------------------------------------------------ ------------------------------------------------------------------------ Verifying SSH connectivity has been setup from rac1 to rac2 IF YOU SEE ANY OTHER OUTPUT BESIDES THE OUTPUT OF THE DATE COMMAND OR IF YOU ARE PROMPTED FOR A PASSWORD HERE, IT MEANS SSH SETUP HAS NOT BEEN SUCCESSFUL. bash: -c: line 0: unexpected EOF while looking for matching `"' bash: -c: line 1: syntax error: unexpected end of file ------------------------------------------------------------------------ -Verification from complete- SSH verification complete.
ssh [HOST_NAME1] date ssh [HOST_NAME2] date ssh [PRIVATE_NAME1] date ssh [PRIVATE_NAME2]-priv date
[grid@+ASM1 ~]$ ssh rac1 date 2019. 04. 05. (금) 18:31:12 KST [grid@+ASM1 ~]$ ssh rac2 date 2019. 04. 05. (금) 18:31:15 KST [grid@+ASM1 ~]$ ssh rac1-priv date The authenticity of host 'rac1-priv (10.0.5.101)' can't be established. RSA key fingerprint is 12:cf:8a:65:85:4c:2d:9d:bd:b8:92:3f:49:6c:2d:a9. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'rac1-priv,10.0.5.101' (RSA) to the list of known hosts. 2019. 04. 05. (금) 18:31:22 KST [grid@+ASM1 ~]$ ssh rac2-priv date The authenticity of host 'rac2-priv (10.0.5.102)' can't be established. RSA key fingerprint is 12:cf:8a:65:85:4c:2d:9d:bd:b8:92:3f:49:6c:2d:a9. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'rac2-priv,10.0.5.102' (RSA) to the list of known hosts. 2019. 04. 05. (금) 18:31:27 KST
[grid@+ASM2 ~]$ ssh rac1 date 2019. 04. 05. (금) 18:31:30 KST [grid@+ASM2 ~]$ ssh rac2 date 2019. 04. 05. (금) 18:31:33 KST [grid@+ASM2 ~]$ ssh rac1-priv date The authenticity of host 'rac1-priv (10.0.5.101)' can't be established. RSA key fingerprint is 12:cf:8a:65:85:4c:2d:9d:bd:b8:92:3f:49:6c:2d:a9. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'rac1-priv,10.0.5.101' (RSA) to the list of known hosts. 2019. 04. 05. (금) 18:31:40 KST [grid@+ASM2 ~]$ ssh rac2-priv date The authenticity of host 'rac2-priv (10.0.5.102)' can't be established. RSA key fingerprint is 12:cf:8a:65:85:4c:2d:9d:bd:b8:92:3f:49:6c:2d:a9. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'rac2-priv,10.0.5.102' (RSA) to the list of known hosts. 2019. 04. 05. (금) 18:31:45 KST
mkdir -p /u01/app/oraInventory chmod -R 775 /u01/app/oraInventory
[grid@+ASM1 ~]$ mkdir -p /u01/app/oraInventory [grid@+ASM1 ~]$ chmod -R 775 /u01/app/oraInventory [grid@+ASM1 ~]$ ls -ltra /u01/app/oraInventory 합계 8 drwxrwxr-x. 2 grid oinstall 4096 2019-04-05 18:33 . drwxrwx---. 5 grid oinstall 4096 2019-04-05 18:33 ..
[grid@+ASM2 ~]$ mkdir -p /u01/app/oraInventory [grid@+ASM2 ~]$ chmod -R 775 /u01/app/oraInventory [grid@+ASM2 ~]$ ls -ltra /u01/app/oraInventory 합계 8 drwxrwx---. 5 grid oinstall 4096 2019-04-05 18:33 .. drwxrwxr-x. 2 grid oinstall 4096 2019-04-05 18:33 .
2. 설치 전 검증
cd <설치 파일 압축해제 경로>/grid ./runcluvfy.sh stage -pre crsinst -n [HOST_NAME1],[HOST_NAME2] -fixup -verbose
[grid@+ASM1 ~]$ cd /media/sf_oracle/grid [grid@+ASM1 grid]$ ./runcluvfy.sh stage -pre crsinst -n rac1,rac2 -fixup -verbose 클러스터 서비스 설정에 대한 사전 확인 수행 노드 연결 가능성을 검사하는 중... 검사: "rac1" 노드에서의 노드 연결 가능성 대상 노드 연결 가능? ------------------------------------ ------------------------ rac2 예 rac1 예 결과: "rac1" 노드에서 노드 연결 가능성 검사를 성공했습니다. 사용자 equivalence를 검사하는 중... 검사: 사용자 "grid"에 대한 사용자 equivalence 노드 이름 상태 ------------------------------------ ------------------------ rac2 성공 rac1 성공 결과: 사용자 "grid"에 대한 사용자 equivalence 검사를 성공했습니다. 노드 연결을 검사하는 중... 호스트 구성 파일 확인 중... 노드 이름 상태 ------------------------------------ ------------------------ rac2 성공 rac1 성공 호스트 구성 파일 확인을 성공했습니다. "rac2" 노드에 대한 인터페이스 정보 이름 IP 주소 서브넷 게이트웨이 Def. 게이트웨이 HW 주소 MTU ------ --------------- --------------- --------------- --------------- ----------------- ------ eth0 10.0.1.102 10.0.1.0 0.0.0.0 10.0.1.1 08:00:27:F4:80:BB 1500 eth1 10.0.5.102 10.0.5.0 0.0.0.0 10.0.1.1 08:00:27:B8:4E:0E 1500 "rac1" 노드에 대한 인터페이스 정보 이름 IP 주소 서브넷 게이트웨이 Def. 게이트웨이 HW 주소 MTU ------ --------------- --------------- --------------- --------------- ----------------- ------ eth0 10.0.1.101 10.0.1.0 0.0.0.0 10.0.1.1 08:00:27:9C:B9:81 1500 eth1 10.0.5.101 10.0.5.0 0.0.0.0 10.0.1.1 08:00:27:CB:58:2B 1500 검사: "10.0.1.0" 서브넷에 대한 노드 연결 소스 대상 접속됨? ------------------------------ ------------------------------ ---------------- rac2[10.0.1.102] rac1[10.0.1.101] 예 결과: rac2,rac1개의 노드를 사용하는 "10.0.1.0" 서브넷에 대한 노드 연결을 성공했습니다. 검사: "10.0.1.0" 서브넷의 TCP 접속 소스 대상 접속됨? ------------------------------ ------------------------------ ---------------- rac1:10.0.1.101 rac2:10.0.1.102 성공 결과: "10.0.1.0" 서브넷에 대한 TCP 접속 검사를 성공했습니다. 검사: "10.0.5.0" 서브넷에 대한 노드 연결 소스 대상 접속됨? ------------------------------ ------------------------------ ---------------- rac2[10.0.5.102] rac1[10.0.5.101] 예 결과: rac2,rac1개의 노드를 사용하는 "10.0.5.0" 서브넷에 대한 노드 연결을 성공했습니다. 검사: "10.0.5.0" 서브넷의 TCP 접속 소스 대상 접속됨? ------------------------------ ------------------------------ ---------------- rac1:10.0.5.101 rac2:10.0.5.102 성공 결과: "10.0.5.0" 서브넷에 대한 TCP 접속 검사를 성공했습니다. "10.0.1.0" 서브넷에서 발견된 VIP 후보로 적합한 인터페이스: rac2 eth0:10.0.1.102 rac1 eth0:10.0.1.101 "10.0.5.0" 서브넷에서 발견된 전용 상호 접속 후보로 적합한 인터페이스: rac2 eth1:10.0.5.102 rac1 eth1:10.0.5.101 서브넷 마스크 일관성 확인 중... "10.0.1.0" 서브넷에 대한 서브넷 마스크 일관성 검사를 성공했습니다. "10.0.5.0" 서브넷에 대한 서브넷 마스크 일관성 검사를 성공했습니다. 서브넷 마스크 일관성 검사를 성공했습니다. 결과: 노드 연결 검사를 성공했습니다. 멀티캐스트 통신을 검사하는 중... 멀티캐스트 그룹 "230.0.1.0"과(와) 멀티캐스트 통신을 위해 "10.0.1.0" 서브넷을 검사하는 중... 멀티캐스트 그룹 "230.0.1.0"과(와) 멀티캐스트 통신을 위한 "10.0.1.0" 서브넷 검사를 성공했습니다. 멀티캐스트 그룹 "230.0.1.0"과(와) 멀티캐스트 통신을 위해 "10.0.5.0" 서브넷을 검사하는 중... 멀티캐스트 그룹 "230.0.1.0"과(와) 멀티캐스트 통신을 위한 "10.0.5.0" 서브넷 검사를 성공했습니다. 멀티캐스트 통신 검사를 성공했습니다. ASMLib 구성을 검사하는 중입니다. 노드 이름 상태 ------------------------------------ ------------------------ rac2 성공 rac1 성공 결과: ASMLib 구성 검사를 성공했습니다. 검사: 총 메모리 노드 이름 사용 가능 필수 상태 ------------ ------------------------ ------------------------ ---------- rac2 1.9522GB (2047044.0KB) 1.5GB (1572864.0KB) 성공 rac1 1.9522GB (2047044.0KB) 1.5GB (1572864.0KB) 성공 결과: 총 메모리 검사를 성공했습니다. 검사: 사용 가능한 메모리 노드 이름 사용 가능 필수 상태 ------------ ------------------------ ------------------------ ---------- rac2 1.8518GB (1941788.0KB) 50MB (51200.0KB) 성공 rac1 1.725GB (1808800.0KB) 50MB (51200.0KB) 성공 결과: 사용 가능한 메모리 검사를 성공했습니다. 검사: 교체 공간 노드 이름 사용 가능 필수 상태 ------------ ------------------------ ------------------------ ---------- rac2 4GB (4194300.0KB) 2.9283GB (3070566.0KB) 성공 rac1 4GB (4194300.0KB) 2.9283GB (3070566.0KB) 성공 결과: 교체 공간 검사를 성공했습니다. 검사: "rac2:/tmp"에 대한 여유 디스크 공간 경로 노드 이름 마운트 위치 사용 가능 필수 상태 ---------------- ------------ ------------ ------------ ------------ ------------ /tmp rac2 / 22.0244GB 1GB 성공 결과: "rac2:/tmp"에 대한 여유 디스크 공간 검사를 성공했습니다. 검사: "rac1:/tmp"에 대한 여유 디스크 공간 경로 노드 이름 마운트 위치 사용 가능 필수 상태 ---------------- ------------ ------------ ------------ ------------ ------------ /tmp rac1 / 22.0056GB 1GB 성공 결과: "rac1:/tmp"에 대한 여유 디스크 공간 검사를 성공했습니다. 검사: "grid"에 대한 사용자 존재 여부 노드 이름 상태 설명 ------------ ------------------------ ------------------------ rac2 성공 존재함(54322) rac1 성공 존재함(54322) UID 값이 54322인 다중 사용자를 검사하는 중 결과: UID 값이 54322인 다중 사용자 검사를 성공했습니다. 결과: "grid"에 대한 사용자 존재 여부 검사를 성공했습니다. 검사: "oinstall"에 대한 그룹 존재 여부 노드 이름 상태 설명 ------------ ------------------------ ------------------------ rac2 성공 존재함 rac1 성공 존재함 결과: "oinstall"에 대한 그룹 존재 여부 검사를 성공했습니다. 검사: "dba"에 대한 그룹 존재 여부 노드 이름 상태 설명 ------------ ------------------------ ------------------------ rac2 성공 존재함 rac1 성공 존재함 결과: "dba"에 대한 그룹 존재 여부 검사를 성공했습니다. 검사: "oinstall" 그룹[기본]의 사용자 "grid"에 대한 멤버쉽 노드 이름 사용자가 존재함 그룹이 존재함 그룹의 사용자 기본 상태 ---------------- ------------ ------------ ------------ ------------ ------------ rac2 예 예 예 예 성공 rac1 예 예 예 예 성공 결과: "oinstall" 그룹[기본]의 사용자 "grid"에 대한 멤버쉽 검사를 성공했습니다. 검사: "dba" 그룹의 사용자 "grid"에 대한 멤버쉽 노드 이름 사용자가 존재함 그룹이 존재함 그룹의 사용자 상태 ---------------- ------------ ------------ ------------ ---------------- rac2 예 예 예 성공 rac1 예 예 예 성공 결과: "dba" 그룹의 사용자 "grid"에 대한 멤버쉽 검사를 성공했습니다. 검사: 실행 레벨 노드 이름 실행 레벨 필수 상태 ------------ ------------------------ ------------------------ ---------- rac2 3 3,5 성공 rac1 5 3,5 성공 결과: 실행 레벨 검사를 성공했습니다. 검사: "최대 열린 파일 기술자"에 대한 완전 제한 노드 이름 유형 사용 가능 필수 상태 ---------------- ------------ ------------ ------------ ---------------- rac2 완전 65536 65536 성공 rac1 완전 65536 65536 성공 결과: "최대 열린 파일 기술자"에 대한 완전 제한 검사를 성공했습니다. 검사: "최대 열린 파일 기술자"에 대한 부분 제한 노드 이름 유형 사용 가능 필수 상태 ---------------- ------------ ------------ ------------ ---------------- rac2 부분 65536 1024 성공 rac1 부분 65536 1024 성공 결과: "최대 열린 파일 기술자"에 대한 부분 제한 검사를 성공했습니다. 검사: "최대 사용자 프로세스"에 대한 완전 제한 노드 이름 유형 사용 가능 필수 상태 ---------------- ------------ ------------ ------------ ---------------- rac2 완전 16384 16384 성공 rac1 완전 16384 16384 성공 결과: "최대 사용자 프로세스"에 대한 완전 제한 검사를 성공했습니다. 검사: "최대 사용자 프로세스"에 대한 부분 제한 노드 이름 유형 사용 가능 필수 상태 ---------------- ------------ ------------ ------------ ---------------- rac2 부분 16384 2047 성공 rac1 부분 16384 2047 성공 결과: "최대 사용자 프로세스"에 대한 부분 제한 검사를 성공했습니다. 검사: 시스템 구조 노드 이름 사용 가능 필수 상태 ------------ ------------------------ ------------------------ ---------- rac2 x86_64 x86_64 성공 rac1 x86_64 x86_64 성공 결과: 시스템 구조 검사를 성공했습니다. 검사: 커널 버전 노드 이름 사용 가능 필수 상태 ------------ ------------------------ ------------------------ ---------- rac2 4.1.12-124.16.4.el6uek.x86_64 2.6.32 성공 rac1 4.1.12-124.16.4.el6uek.x86_64 2.6.32 성공 결과: 커널 버전 검사를 성공했습니다. 검사: "semmsl"에 대한 커널 매개변수 노드 이름 현재 구성됨 필수 상태 설명 ---------------- ------------ ------------ ------------ ------------ ------------ rac2 250 250 250 성공 rac1 250 250 250 성공 결과: "semmsl"에 대한 커널 매개변수 검사를 성공했습니다. 검사: "semmns"에 대한 커널 매개변수 노드 이름 현재 구성됨 필수 상태 설명 ---------------- ------------ ------------ ------------ ------------ ------------ rac2 32000 32000 32000 성공 rac1 32000 32000 32000 성공 결과: "semmns"에 대한 커널 매개변수 검사를 성공했습니다. 검사: "semopm"에 대한 커널 매개변수 노드 이름 현재 구성됨 필수 상태 설명 ---------------- ------------ ------------ ------------ ------------ ------------ rac2 100 100 100 성공 rac1 100 100 100 성공 결과: "semopm"에 대한 커널 매개변수 검사를 성공했습니다. 검사: "semmni"에 대한 커널 매개변수 노드 이름 현재 구성됨 필수 상태 설명 ---------------- ------------ ------------ ------------ ------------ ------------ rac2 128 128 128 성공 rac1 128 128 128 성공 결과: "semmni"에 대한 커널 매개변수 검사를 성공했습니다. 검사: "shmmax"에 대한 커널 매개변수 노드 이름 현재 구성됨 필수 상태 설명 ---------------- ------------ ------------ ------------ ------------ ------------ rac2 4398046511104 4398046511104 1048086528 성공 rac1 4398046511104 4398046511104 1048086528 성공 결과: "shmmax"에 대한 커널 매개변수 검사를 성공했습니다. 검사: "shmmni"에 대한 커널 매개변수 노드 이름 현재 구성됨 필수 상태 설명 ---------------- ------------ ------------ ------------ ------------ ------------ rac2 4096 4096 4096 성공 rac1 4096 4096 4096 성공 결과: "shmmni"에 대한 커널 매개변수 검사를 성공했습니다. 검사: "shmall"에 대한 커널 매개변수 노드 이름 현재 구성됨 필수 상태 설명 ---------------- ------------ ------------ ------------ ------------ ------------ rac2 4294967296 4294967296 2097152 성공 rac1 4294967296 4294967296 2097152 성공 결과: "shmall"에 대한 커널 매개변수 검사를 성공했습니다. 검사: "file-max"에 대한 커널 매개변수 노드 이름 현재 구성됨 필수 상태 설명 ---------------- ------------ ------------ ------------ ------------ ------------ rac2 6815744 6815744 6815744 성공 rac1 6815744 6815744 6815744 성공 결과: "file-max"에 대한 커널 매개변수 검사를 성공했습니다. 검사: "ip_local_port_range"에 대한 커널 매개변수 노드 이름 현재 구성됨 필수 상태 설명 ---------------- ------------ ------------ ------------ ------------ ------------ rac2 between 9000.0 & 65500.0 between 9000.0 & 65500.0 between 9000.0 & 65500.0 성공 rac1 between 9000.0 & 65500.0 between 9000.0 & 65500.0 between 9000.0 & 65500.0 성공 결과: "ip_local_port_range"에 대한 커널 매개변수 검사를 성공했습니다. 검사: "rmem_default"에 대한 커널 매개변수 노드 이름 현재 구성됨 필수 상태 설명 ---------------- ------------ ------------ ------------ ------------ ------------ rac2 262144 262144 262144 성공 rac1 262144 262144 262144 성공 결과: "rmem_default"에 대한 커널 매개변수 검사를 성공했습니다. 검사: "rmem_max"에 대한 커널 매개변수 노드 이름 현재 구성됨 필수 상태 설명 ---------------- ------------ ------------ ------------ ------------ ------------ rac2 4194304 4194304 4194304 성공 rac1 4194304 4194304 4194304 성공 결과: "rmem_max"에 대한 커널 매개변수 검사를 성공했습니다. 검사: "wmem_default"에 대한 커널 매개변수 노드 이름 현재 구성됨 필수 상태 설명 ---------------- ------------ ------------ ------------ ------------ ------------ rac2 262144 262144 262144 성공 rac1 262144 262144 262144 성공 결과: "wmem_default"에 대한 커널 매개변수 검사를 성공했습니다. 검사: "wmem_max"에 대한 커널 매개변수 노드 이름 현재 구성됨 필수 상태 설명 ---------------- ------------ ------------ ------------ ------------ ------------ rac2 1048576 1048576 1048576 성공 rac1 1048576 1048576 1048576 성공 결과: "wmem_max"에 대한 커널 매개변수 검사를 성공했습니다. 검사: "aio-max-nr"에 대한 커널 매개변수 노드 이름 현재 구성됨 필수 상태 설명 ---------------- ------------ ------------ ------------ ------------ ------------ rac2 1048576 1048576 1048576 성공 rac1 1048576 1048576 1048576 성공 결과: "aio-max-nr"에 대한 커널 매개변수 검사를 성공했습니다. 검사: "binutils"에 대한 패키지 존재 여부 노드 이름 사용 가능 필수 상태 ------------ ------------------------ ------------------------ ---------- rac2 binutils-2.20.51.0.2-5.48.el6 binutils-2.20.51.0.2 성공 rac1 binutils-2.20.51.0.2-5.48.el6 binutils-2.20.51.0.2 성공 결과: "binutils"에 대한 패키지 존재 여부 검사를 성공했습니다. 검사: "compat-libcap1"에 대한 패키지 존재 여부 노드 이름 사용 가능 필수 상태 ------------ ------------------------ ------------------------ ---------- rac2 compat-libcap1-1.10-1 compat-libcap1-1.10 성공 rac1 compat-libcap1-1.10-1 compat-libcap1-1.10 성공 결과: "compat-libcap1"에 대한 패키지 존재 여부 검사를 성공했습니다. 검사: "compat-libstdc++-33(x86_64)"에 대한 패키지 존재 여부 노드 이름 사용 가능 필수 상태 ------------ ------------------------ ------------------------ ---------- rac2 compat-libstdc++-33(x86_64)-3.2.3-69.el6 compat-libstdc++-33(x86_64)-3.2.3 성공 rac1 compat-libstdc++-33(x86_64)-3.2.3-69.el6 compat-libstdc++-33(x86_64)-3.2.3 성공 결과: "compat-libstdc++-33(x86_64)"에 대한 패키지 존재 여부 검사를 성공했습니다. 검사: "libgcc(x86_64)"에 대한 패키지 존재 여부 노드 이름 사용 가능 필수 상태 ------------ ------------------------ ------------------------ ---------- rac2 libgcc(x86_64)-4.4.7-23.0.1.el6 libgcc(x86_64)-4.4.4 성공 rac1 libgcc(x86_64)-4.4.7-23.0.1.el6 libgcc(x86_64)-4.4.4 성공 결과: "libgcc(x86_64)"에 대한 패키지 존재 여부 검사를 성공했습니다. 검사: "libstdc++(x86_64)"에 대한 패키지 존재 여부 노드 이름 사용 가능 필수 상태 ------------ ------------------------ ------------------------ ---------- rac2 libstdc++(x86_64)-4.4.7-23.0.1.el6 libstdc++(x86_64)-4.4.4 성공 rac1 libstdc++(x86_64)-4.4.7-23.0.1.el6 libstdc++(x86_64)-4.4.4 성공 결과: "libstdc++(x86_64)"에 대한 패키지 존재 여부 검사를 성공했습니다. 검사: "libstdc++-devel(x86_64)"에 대한 패키지 존재 여부 노드 이름 사용 가능 필수 상태 ------------ ------------------------ ------------------------ ---------- rac2 libstdc++-devel(x86_64)-4.4.7-23.0.1.el6 libstdc++-devel(x86_64)-4.4.4 성공 rac1 libstdc++-devel(x86_64)-4.4.7-23.0.1.el6 libstdc++-devel(x86_64)-4.4.4 성공 결과: "libstdc++-devel(x86_64)"에 대한 패키지 존재 여부 검사를 성공했습니다. 검사: "sysstat"에 대한 패키지 존재 여부 노드 이름 사용 가능 필수 상태 ------------ ------------------------ ------------------------ ---------- rac2 sysstat-9.0.4-33.el6_9.1 sysstat-9.0.4 성공 rac1 sysstat-9.0.4-33.el6_9.1 sysstat-9.0.4 성공 결과: "sysstat"에 대한 패키지 존재 여부 검사를 성공했습니다. 검사: "gcc"에 대한 패키지 존재 여부 노드 이름 사용 가능 필수 상태 ------------ ------------------------ ------------------------ ---------- rac2 gcc-4.4.7-23.0.1.el6 gcc-4.4.4 성공 rac1 gcc-4.4.7-23.0.1.el6 gcc-4.4.4 성공 결과: "gcc"에 대한 패키지 존재 여부 검사를 성공했습니다. 검사: "gcc-c++"에 대한 패키지 존재 여부 노드 이름 사용 가능 필수 상태 ------------ ------------------------ ------------------------ ---------- rac2 gcc-c++-4.4.7-23.0.1.el6 gcc-c++-4.4.4 성공 rac1 gcc-c++-4.4.7-23.0.1.el6 gcc-c++-4.4.4 성공 결과: "gcc-c++"에 대한 패키지 존재 여부 검사를 성공했습니다. 검사: "ksh"에 대한 패키지 존재 여부 노드 이름 사용 가능 필수 상태 ------------ ------------------------ ------------------------ ---------- rac2 ksh-20120801-37.el6_9 ksh-20100621 성공 rac1 ksh-20120801-37.el6_9 ksh-20100621 성공 결과: "ksh"에 대한 패키지 존재 여부 검사를 성공했습니다. 검사: "make"에 대한 패키지 존재 여부 노드 이름 사용 가능 필수 상태 ------------ ------------------------ ------------------------ ---------- rac2 make-3.81-23.el6 make-3.81 성공 rac1 make-3.81-23.el6 make-3.81 성공 결과: "make"에 대한 패키지 존재 여부 검사를 성공했습니다. 검사: "glibc(x86_64)"에 대한 패키지 존재 여부 노드 이름 사용 가능 필수 상태 ------------ ------------------------ ------------------------ ---------- rac2 glibc(x86_64)-2.12-1.212.0.1.el6 glibc(x86_64)-2.12 성공 rac1 glibc(x86_64)-2.12-1.212.0.1.el6 glibc(x86_64)-2.12 성공 결과: "glibc(x86_64)"에 대한 패키지 존재 여부 검사를 성공했습니다. 검사: "glibc-devel(x86_64)"에 대한 패키지 존재 여부 노드 이름 사용 가능 필수 상태 ------------ ------------------------ ------------------------ ---------- rac2 glibc-devel(x86_64)-2.12-1.212.0.1.el6 glibc-devel(x86_64)-2.12 성공 rac1 glibc-devel(x86_64)-2.12-1.212.0.1.el6 glibc-devel(x86_64)-2.12 성공 결과: "glibc-devel(x86_64)"에 대한 패키지 존재 여부 검사를 성공했습니다. 검사: "libaio(x86_64)"에 대한 패키지 존재 여부 노드 이름 사용 가능 필수 상태 ------------ ------------------------ ------------------------ ---------- rac2 libaio(x86_64)-0.3.107-10.el6 libaio(x86_64)-0.3.107 성공 rac1 libaio(x86_64)-0.3.107-10.el6 libaio(x86_64)-0.3.107 성공 결과: "libaio(x86_64)"에 대한 패키지 존재 여부 검사를 성공했습니다. 검사: "libaio-devel(x86_64)"에 대한 패키지 존재 여부 노드 이름 사용 가능 필수 상태 ------------ ------------------------ ------------------------ ---------- rac2 libaio-devel(x86_64)-0.3.107-10.el6 libaio-devel(x86_64)-0.3.107 성공 rac1 libaio-devel(x86_64)-0.3.107-10.el6 libaio-devel(x86_64)-0.3.107 성공 결과: "libaio-devel(x86_64)"에 대한 패키지 존재 여부 검사를 성공했습니다. UID 값이 0인 다중 사용자를 검사하는 중 결과: UID 값이 0인 다중 사용자 검사를 성공했습니다. 검사: 현재 그룹 ID 결과: 현재 그룹 ID 검사를 성공했습니다. 루트 사용자의 기본 그룹 일관성 검사를 시작하는 중입니다. 노드 이름 상태 ------------------------------------ ------------------------ rac2 성공 rac1 성공 루트 사용자의 기본 그룹에 대한 일관성 검사를 성공했습니다. NTP(Network Time Protocol)를 사용하여 시계 동기화 검사를 시작하는 중... NTP 구성 파일 검사가 시작되었습니다. 노드에서 NTP(Network Time Protocol) 구성 파일을 찾을 수 없습니다. 클러스터 노드에 대한 시간 동기화에 NTP 대신 Oracle CTSS(Cluster Time Synchronization Service)를 사용할 수 있습니다. 실행 중인 NTP 데몬 또는 서비스가 없는 것으로 확인되었습니다. 결과: NTP(Network Time Protocol)를 사용한 시계 동기화 검사를 성공했습니다. 코어 파일 이름 패턴 일관성을 검사하는 중... 코어 파일 이름 패턴 일관성 검사를 성공했습니다. 사용자 "grid"이(가) "root" 그룹에 속해 있지 않은지 확인하는 중입니다. 노드 이름 상태 설명 ------------ ------------------------ ------------------------ rac2 성공 존재하지 않음 rac1 성공 존재하지 않음 결과: 사용자 "grid"이(가) "root" 그룹에 속해 있지 않습니다. 검사를 성공했습니다. 기본 사용자 파일 생성 마스크 검사 노드 이름 사용 가능 필수 설명 ------------ ------------------------ ------------------------ ---------- rac2 0022 0022 성공 rac1 0022 0022 성공 결과: 기본 사용자 파일 생성 마스크 검사를 성공했습니다. 노드에서 "/etc/resolv.conf" 파일의 일관성을 검사하는 중 "/etc/resolv.conf" 파일에서 'domain' 및 'search' 항목이 하나씩만 정의되어 있는지 검사하는 중 "/etc/resolv.conf" 파일에 'domain' 항목과 'search' 항목이 모두 정의되지 않았습니다. "/etc/resolv.conf" 파일의 'domain' 항목이 노드에서 일치하는지 여부를 검사하는 중... "/etc/resolv.conf" 파일의 'domain' 항목이 노드에서 일치합니다. "/etc/resolv.conf" 파일의 'search' 항목이 노드에서 일치하는지 여부를 검사하는 중... "/etc/resolv.conf" 파일의 'search' 항목이 노드에서 일치합니다. 연결할 수 없는 노드에 대한 DNS 응답 시간을 검사하는 중 노드 이름 상태 ------------------------------------ ------------------------ rac2 성공 rac1 성공 모든 노드에서 연결할 수 없는 노드에 대한 DNS 응답 시간이 허용되는 제한 범위에 속합니다. "/etc/resolv.conf" 파일이 노드에서 일치합니다. 검사: 시간대 일관성 결과: 시간대 일관성 검사를 성공했습니다. 클러스터 서비스 설정에 대한 사전 확인을 성공했습니다.
3. Grid 설치 response 파일 설정
cp <설치 파일 압축해제 경로>/grid/response/grid_install.rsp ~/. vi ~/grid_install.rsp
oracle.install.responseFileVersion=/oracle/install/rspfmt_crsinstall_response_schema_v11_2_0 ORACLE_HOSTNAME=[HOST_NAME1] INVENTORY_LOCATION=[ORACLE_INVENTORY] SELECTED_LANGUAGES=en,ko oracle.install.option=CRS_CONFIG ORACLE_BASE=[ORACLE_BASE] ORACLE_HOME=[GRID_HOME] oracle.install.asm.OSDBA=asmdba oracle.install.asm.OSOPER=asmoper oracle.install.asm.OSASM=asmadmin oracle.install.crs.config.gpnp.scanName=[SCAN_NAME] oracle.install.crs.config.gpnp.scanPort=[LISTENER_PORT] oracle.install.crs.config.clusterName=[CLUSTER_NAME] oracle.install.crs.config.gpnp.configureGNS=false oracle.install.crs.config.autoConfigureClusterNodeVIP=false oracle.install.crs.config.clusterNodes=[HOST_NAME1]:[VIP_NAME1],[HOST_NAME2]:[VIP_NAME2] oracle.install.crs.config.networkInterfaceList=[PUBLIC_INTERFACE_NAME]:[PUBLIC_SUBNET]:1,[PRIVATE_INTERFACE_NAME]:[PRIVATE_SUBNET]:2 oracle.install.crs.config.storageOption=ASM_STORAGE oracle.install.crs.config.sharedFileSystemStorage.votingDiskRedundancy=EXTERNAL oracle.install.crs.config.sharedFileSystemStorage.ocrRedundancy=EXTERNAL oracle.install.crs.config.useIPMI=false oracle.install.asm.SYSASMPassword=[ASM_PASSWD] oracle.install.asm.diskGroup.name=DATA oracle.install.asm.diskGroup.redundancy=EXTERNAL oracle.install.asm.diskGroup.AUSize=1 oracle.install.asm.diskGroup.disks=/dev/raw/raw6 oracle.install.asm.diskGroup.diskDiscoveryString=/dev/raw/raw* oracle.install.asm.monitorPassword=[HOST_NAME1] oracle.install.asm.upgradeASM=false oracle.installer.autoupdates.option=SKIP_UPDATES
oracle.install.responseFileVersion=/oracle/install/rspfmt_crsinstall_response_schema_v11_2_0 ORACLE_HOSTNAME=rac1 INVENTORY_LOCATION=/u01/app/oraInventory SELECTED_LANGUAGES=en,ko oracle.install.option=CRS_CONFIG ORACLE_BASE=/u01/app/oracle ORACLE_HOME=/u01/app/11.2.0/grid oracle.install.asm.OSDBA=asmdba oracle.install.asm.OSOPER=asmoper oracle.install.asm.OSASM=asmadmin oracle.install.crs.config.gpnp.scanName=rac-scan oracle.install.crs.config.gpnp.scanPort=1521 oracle.install.crs.config.clusterName=rac oracle.install.crs.config.gpnp.configureGNS=false oracle.install.crs.config.autoConfigureClusterNodeVIP=false oracle.install.crs.config.clusterNodes=rac1:rac1-vip,rac2:rac2-vip oracle.install.crs.config.networkInterfaceList=eth0:10.0.1.0:1,eth1:10.0.5.0:2 oracle.install.crs.config.storageOption=ASM_STORAGE oracle.install.crs.config.sharedFileSystemStorage.votingDiskRedundancy=EXTERNAL oracle.install.crs.config.sharedFileSystemStorage.ocrRedundancy=EXTERNAL oracle.install.crs.config.useIPMI=false oracle.install.asm.SYSASMPassword=oracle_4U oracle.install.asm.diskGroup.name=DATA oracle.install.asm.diskGroup.redundancy=EXTERNAL oracle.install.asm.diskGroup.AUSize=1 oracle.install.asm.diskGroup.disks=/dev/raw/raw6 oracle.install.asm.diskGroup.diskDiscoveryString=/dev/raw/raw* oracle.install.asm.monitorPassword=oracle_4U oracle.install.asm.upgradeASM=false oracle.installer.autoupdates.option=SKIP_UPDATES
4. Grid 설치 수행
cd <설치 파일 압축해제 경로>/grid ./runInstaller -ignorePrereq -silent -force -responseFile ~/grid_install.rsp
[grid@+ASM1 grid]$ cd /media/sf_oracle/grid [grid@+ASM1 grid]$ ./runInstaller -ignorePrereq -silent -force -responseFile ~/grid_install.rsp Oracle Universal Installer 시작 중... 임시 공간 확인 중: 120MB 이상이어야 합니다.. 실제 21508MB 성공 스왑 공간 확인 중: 150MB 이상이어야 합니다.. 실제 4095MB 성공 다음에서 Oracle Universal Installer의 시작을 준비하는 중 /tmp/OraInstall2019-04-05_06-55-41PM. 기다리십시오.[grid@+ASM1 grid]$ 다음 위치에서 이 설치 세션의 로그를 찾을 수 있습니다. /u01/app/oraInventory/logs/installActions2019-04-05_06-55-41PM.log Oracle Grid Infrastructure 11g의 설치을(를) 성공했습니다. 자세한 내용은 '/u01/app/oraInventory/logs/silentInstall2019-04-05_06-55-41PM.log'을(를) 확인하십시오. 루트 사용자로 다음 스크립트를 실행합니다. 1. /u01/app/oraInventory/orainstRoot.sh 2. /u01/app/11.2.0/grid/root.sh 다음 노드에서 /u01/app/oraInventory/orainstRoot.sh을(를) 실행하십시오. [rac1, rac2] 다음 노드에서 /u01/app/11.2.0/grid/root.sh을(를) 실행하십시오. [rac1, rac2] 설치 사용자로 다음 스크립트를 실행하여 구성을 완료하십시오. 1. /u01/app/11.2.0/grid/cfgtoollogs/configToolAllCommands RESPONSE_FILE=<response_file> 참고: 1. 이 스크립트는 설치 프로그램이 실행된 동일한 호스트에서 실행해야 합니다. 2. 이 스크립트에는 비밀번호가 필요한 Configuration Assistant에 대한 작은 비밀번호 속성 파일이 필요합니다(설치 설명서 참조). Successfully Setup Software.
installActions2019-04-05_06-55-41PM.log
silentInstall2019-04-05_06-55-41PM.log5. root 유저 스크립트 수행
/u01/app/oraInventory/orainstRoot.sh
[root@rac1 ~]# /u01/app/oraInventory/orainstRoot.sh 다음 권한 변경 중/u01/app/oraInventory. 그룹에 대한 읽기, 쓰기 권한을 추가하는 중입니다. 월드에 대한 읽기, 쓰기, 실행 권한을 제거하는 중입니다. 그룹 이름 변경 중 /u01/app/oraInventory 대상 oinstall. 스크립트 실행이 완료되었습니다.
[root@rac2 ~]# /u01/app/oraInventory/orainstRoot.sh 다음 권한 변경 중/u01/app/oraInventory. 그룹에 대한 읽기, 쓰기 권한을 추가하는 중입니다. 월드에 대한 읽기, 쓰기, 실행 권한을 제거하는 중입니다. 그룹 이름 변경 중 /u01/app/oraInventory 대상 oinstall. 스크립트 실행이 완료되었습니다.
/u01/app/11.2.0/grid/root.sh
[root@rac1 ~]# /u01/app/11.2.0/grid/root.sh Check /u01/app/11.2.0/grid/install/root_rac1_2019-04-05_19-04-22.log for the output of root script
Performing root user operation for Oracle 11g The following environment variables are set as: ORACLE_OWNER= grid ORACLE_HOME= /u01/app/11.2.0/grid Copying dbhome to /usr/local/bin ... Copying oraenv to /usr/local/bin ... Copying coraenv to /usr/local/bin ... Creating /etc/oratab file... Entries will be added to the /etc/oratab file as needed by Database Configuration Assistant when a database is created Finished running generic part of root script. Now product-specific root actions will be performed. Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params Creating trace directory User ignored Prerequisites during installation Installing Trace File Analyzer OLR initialization - successful root wallet root wallet cert root cert export peer wallet profile reader wallet pa wallet peer wallet keys pa wallet keys peer cert request pa cert request peer cert pa cert peer root cert TP profile reader root cert TP pa root cert TP peer pa cert TP pa peer cert TP profile reader pa cert TP profile reader peer cert TP peer user cert pa user cert Adding Clusterware entries to upstart CRS-2672: Attempting to start 'ora.mdnsd' on 'rac1' CRS-2676: Start of 'ora.mdnsd' on 'rac1' succeeded CRS-2672: Attempting to start 'ora.gpnpd' on 'rac1' CRS-2676: Start of 'ora.gpnpd' on 'rac1' succeeded CRS-2672: Attempting to start 'ora.cssdmonitor' on 'rac1' CRS-2672: Attempting to start 'ora.gipcd' on 'rac1' CRS-2676: Start of 'ora.cssdmonitor' on 'rac1' succeeded CRS-2676: Start of 'ora.gipcd' on 'rac1' succeeded CRS-2672: Attempting to start 'ora.cssd' on 'rac1' CRS-2672: Attempting to start 'ora.diskmon' on 'rac1' CRS-2676: Start of 'ora.diskmon' on 'rac1' succeeded CRS-2676: Start of 'ora.cssd' on 'rac1' succeeded ASM이 성공적으로 생성되고 시작되었습니다. 디스크 그룹 DATA이(가) 성공적으로 생성되었습니다. clscfg: -install mode specified Successfully accumulated necessary OCR keys. Creating OCR keys for user 'root', privgrp 'root'.. Operation successful. CRS-4256: Updating the profile Successful addition of voting disk 7d91b543779a4fdebfc8895c7fda9c05. Successfully replaced voting disk group with +DATA. CRS-4256: Updating the profile CRS-4266: Voting file(s) successfully replaced ## STATE File Universal Id File Name Disk group -- ----- ----------------- --------- --------- 1. ONLINE 7d91b543779a4fdebfc8895c7fda9c05 (/dev/raw/raw6) [DATA] Located 1 voting disk(s). CRS-2672: Attempting to start 'ora.asm' on 'rac1' CRS-2676: Start of 'ora.asm' on 'rac1' succeeded CRS-2672: Attempting to start 'ora.DATA.dg' on 'rac1' CRS-2676: Start of 'ora.DATA.dg' on 'rac1' succeeded [1mConfigure Oracle Grid Infrastructure for a Cluster ... succeeded [0m
[root@rac2 ~]# /u01/app/11.2.0/grid/root.sh Check /u01/app/11.2.0/grid/install/root_rac2_2019-04-05_19-11-19.log for the output of root script
Performing root user operation for Oracle 11g The following environment variables are set as: ORACLE_OWNER= grid ORACLE_HOME= /u01/app/11.2.0/grid Copying dbhome to /usr/local/bin ... Copying oraenv to /usr/local/bin ... Copying coraenv to /usr/local/bin ... Creating /etc/oratab file... Entries will be added to the /etc/oratab file as needed by Database Configuration Assistant when a database is created Finished running generic part of root script. Now product-specific root actions will be performed. Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params Creating trace directory User ignored Prerequisites during installation Installing Trace File Analyzer OLR initialization - successful Adding Clusterware entries to upstart CRS-4402: CSS 데몬이 배타 모드에서 시작되었지만 활성 CSS 데몬이 노드 rac1, 번호 1에서 발견되어 종료 중입니다. An active cluster was found during exclusive startup, restarting to join the cluster [1mConfigure Oracle Grid Infrastructure for a Cluster ... succeeded [0m
6. Grid 설치 후 스크립트 수행
oracle.assistants.asm|S_ASMPASSWORD=[ASM_PASSWD] oracle.assistants.asm|S_ASMMONITORPASSWORD=[ASM_PASSWD]
oracle.assistants.asm|S_ASMPASSWORD=oracle_4U oracle.assistants.asm|S_ASMMONITORPASSWORD=oracle_4U
cd $GRID_HOME/cfgtoollogs chmod 600 cfgrsp.properties ./configToolAllCommands RESPONSE_FILE=./cfgrsp.properties
[grid@+ASM1 grid]$ cd $GRID_HOME/cfgtoollogs [grid@+ASM1 cfgtoollogs]$ chmod 600 cfgrsp.properties [grid@+ASM1 cfgtoollogs]$ ./configToolAllCommands RESPONSE_FILE=./cfgrsp.properties Setting the invPtrLoc to /u01/app/11.2.0/grid/oraInst.loc perform - 작업 시작 중인 모드: configure 2019. 4. 5 오후 7:18:04 oracle.install.driver.oui.config.GenericInternalPlugIn invoke 정보: Executing ASMCA 2019. 4. 5 오후 7:18:04 oracle.install.driver.oui.config.GenericInternalPlugIn invoke 정보: Command /u01/app/11.2.0/grid/bin/asmca -silent -postConfigureASM -oui_internal 2019. 4. 5 오후 7:18:04 oracle.install.driver.oui.config.GenericInternalPlugIn handleProcess 정보: ... GenericInternalPlugIn.handleProcess() entered. 2019. 4. 5 오후 7:18:04 oracle.install.driver.oui.config.GenericInternalPlugIn handleProcess 정보: ... GenericInternalPlugIn: getting configAssistantParmas. 2019. 4. 5 오후 7:18:04 oracle.install.driver.oui.config.GenericInternalPlugIn handleProcess 정보: ... GenericInternalPlugIn: checking secretArguments. 2019. 4. 5 오후 7:18:04 oracle.install.driver.oui.config.GenericInternalPlugIn handleProcess 정보: ... GenericInternalPlugIn: starting read loop. 2019. 4. 5 오후 7:18:13 oracle.install.driver.oui.config.GenericInternalPlugIn handleProcess 정보: Read: SYS_PASSWORD_PROMPT 2019. 4. 5 오후 7:18:13 oracle.install.driver.oui.config.GenericInternalPlugIn handleProcess 정보: Processing: SYS_PASSWORD_PROMPT for argument tag -sysAsmPassword 2019. 4. 5 오후 7:18:13 oracle.install.driver.oui.config.GenericInternalPlugIn handleProcess 정보: Read: ASMSNMP_PASSWORD_PROMPT 2019. 4. 5 오후 7:18:13 oracle.install.driver.oui.config.GenericInternalPlugIn handleProcess 정보: Processing: ASMSNMP_PASSWORD_PROMPT for argument tag -asmMonitorPassword 2019. 4. 5 오후 7:18:13 oracle.install.driver.oui.config.GenericInternalPlugIn handleProcess 정보: End of argument passing to stdin 2019. 4. 5 오후 7:18:16 oracle.install.driver.oui.config.GenericInternalPlugIn handleProcess 정보: Read: 2019. 4. 5 오후 7:18:16 oracle.install.driver.oui.config.GenericInternalPlugIn handleProcess 정보: Read: PostConfiguration이 성공적으로 완료되었습니다. 2019. 4. 5 오후 7:18:16 oracle.install.driver.oui.config.GenericInternalPlugIn handleProcess 정보: Read: perform - 작업이 완료된 모드: configure 로그 파일을 확인할 수 있습니다./u01/app/11.2.0/grid/cfgtoollogs/oui/configActions2019-04-05_07-16-49-PM.log
################################################### The action configuration is performing ------------------------------------------------------ The plug-in Update Inventory is running /u01/app/11.2.0/grid/oui/bin/runInstaller -nowait -noconsole -waitforcompletion -ignoreSysPrereqs -updateNodeList -silent CRS=true "CLUSTER_NODES={rac1,rac2}" ORACLE_HOME=/u01/app/11.2.0/grid Oracle Universal Installer 시작 중... 스왑 공간 확인 중: 500MB 이상이어야 합니다.. 실제 4076MB 성공 The inventory pointer is located at /etc/oraInst.loc The inventory is located at /u01/app/oraInventory The plug-in Update Inventory has successfully been performed ------------------------------------------------------ ------------------------------------------------------ The plug-in Oracle Net Configuration Assistant is running 명령행 인수 분석: 매개변수 "orahome" = /u01/app/11.2.0/grid 매개변수 "orahnam" = Ora11g_gridinfrahome1 매개변수 "instype" = typical 매개변수 "inscomp" = client,oraclenet,javavm,server,ano 매개변수 "insprtcl" = tcp 매개변수 "cfg" = local 매개변수 "authadp" = NO_VALUE 매개변수 "responsefile" = /u01/app/11.2.0/grid/network/install/netca_typ.rsp 매개변수 "silent" = true 매개변수 "silent" = true 명령행 인수 분석을 완료했습니다. Oracle Net Service 구성: 프로파일 구성이 완료되었습니다. 프로파일 구성이 완료되었습니다. rac1... rac2... Oracle Net 리스너 시작: 리스너가 성공적으로 시작되었습니다. 리스너 구성이 완료되었습니다. Oracle Net Service 구성을 성공했습니다. 종료 코드는 다음과 같습니다. 0 The plug-in Oracle Net Configuration Assistant has successfully been performed ------------------------------------------------------ ------------------------------------------------------ The plug-in Automatic Storage Management Configuration Assistant is running The plug-in Automatic Storage Management Configuration Assistant has successfully been performed ------------------------------------------------------ ------------------------------------------------------ The plug-in Oracle Cluster Verification Utility is running 클러스터 서비스 설정에 대한 사후 확인 수행 노드 연결 가능성을 검사하는 중... "rac1" 노드에서 노드 연결 가능성 검사를 성공했습니다. 사용자 equivalence를 검사하는 중... 사용자 "grid"에 대한 사용자 equivalence 검사를 성공했습니다. 노드 연결을 검사하는 중... 호스트 구성 파일 확인 중... 호스트 구성 파일 확인을 성공했습니다. 검사: "eth0" 인터페이스에 대한 노드 연결 "eth0" 인터페이스에 대한 노드 연결을 성공했습니다. "10.0.1.0" 서브넷에 대한 TCP 접속 검사를 성공했습니다. 검사: "eth1" 인터페이스에 대한 노드 연결 "eth1" 인터페이스에 대한 노드 연결을 성공했습니다. "10.0.5.0" 서브넷에 대한 TCP 접속 검사를 성공했습니다. 서브넷 마스크 일관성 확인 중... "10.0.1.0" 서브넷에 대한 서브넷 마스크 일관성 검사를 성공했습니다. "10.0.5.0" 서브넷에 대한 서브넷 마스크 일관성 검사를 성공했습니다. 서브넷 마스크 일관성 검사를 성공했습니다. 노드 연결 검사를 성공했습니다. 멀티캐스트 통신을 검사하는 중... 멀티캐스트 그룹 "230.0.1.0"과(와) 멀티캐스트 통신을 위해 "10.0.1.0" 서브넷을 검사하는 중... 멀티캐스트 그룹 "230.0.1.0"과(와) 멀티캐스트 통신을 위한 "10.0.1.0" 서브넷 검사를 성공했습니다. 멀티캐스트 그룹 "230.0.1.0"과(와) 멀티캐스트 통신을 위해 "10.0.5.0" 서브넷을 검사하는 중... 멀티캐스트 그룹 "230.0.1.0"과(와) 멀티캐스트 통신을 위한 "10.0.5.0" 서브넷 검사를 성공했습니다. 멀티캐스트 통신 검사를 성공했습니다. 시간대 일관성 검사를 성공했습니다. Oracle 클러스터 선호 디스크 구성을 검사하는 중... ASM 실행 여부 검사를 성공했습니다. ASM이 지정된 모든 노드에서 실행 중입니다. Oracle 클러스터 선호 디스크 구성 검사를 성공했습니다. 클러스터 관리자 무결성을 검사하는 중... CSS 데몬을 검사하는 중... Oracle Cluster Synchronization Services가 온라인입니다. 클러스터 관리자 무결성 검사를 성공했습니다. OCR 위치에 대한 UDev 속성 검사가 시작되었습니다. OCR 위치에 대한 UDev 속성 검사를 성공했습니다. 선호 디스크 위치에 대한 UDev 속성 검사가 시작되었습니다. 선호 디스크 위치에 대한 UDev 속성 검사를 성공했습니다. 기본 사용자 파일 생성 마스크 검사를 성공했습니다. 클러스터 무결성을 검사하는 중... 클러스터 무결성 검사를 성공했습니다. OCR 무결성을 검사하는 중... 클러스터화되지 않은 구성이 없는지 검사하는 중... 모든 노드에 클러스터화되지 않은 로컬 전용 구성이 없습니다. ASM 실행 여부 검사를 성공했습니다. ASM이 지정된 모든 노드에서 실행 중입니다. OCR 구성 파일 "/etc/oracle/ocr.loc"을(를) 검사하는 중... OCR 구성 파일 "/etc/oracle/ocr.loc" 검사를 성공했습니다. 모든 노드에서 사용 가능한 OCR 위치 "+DATA"에 대한 디스크 그룹 NOTE: 이 검사는 OCR 콘텐츠의 무결성을 확인하지 않습니다. OCR 콘텐츠를 확인하려면 권한이 있는 사용자로 'ocrcheck'를 실행하십시오. OCR 무결성 검사를 성공했습니다. CRS 무결성을 검사하는 중... Clusterware 버전 일관성 검사를 성공했습니다. CRS 무결성 검사를 성공했습니다. 노드 응용 프로그램의 존재 여부를 검사하는 중... VIP 노드 응용 프로그램이 존재하는지 검사하는 중(필수) VIP 노드 응용 프로그램 검사를 성공했습니다. NETWORK 노드 응용 프로그램이 존재하는지 검사하는 중(필수) NETWORK 노드 응용 프로그램 검사를 성공했습니다. GSD 노드 응용 프로그램이 존재하는지 검사하는 중(선택 사항) GSD 노드 응용 프로그램이 "rac2,rac1" 노드에서 오프라인 상태입니다. ONS 노드 응용 프로그램이 존재하는지 검사하는 중(선택 사항) ONS 노드 응용 프로그램 검사를 성공했습니다. SCAN(단일 클라이언트 액세스 이름) 검사 중... SCAN 리스너에 대한 TCP 접속을 검사하는 중... SCAN 리스너에 대한 TCP 접속이 모든 클러스터 노드에 존재합니다. "rac-scan"에 대한 이름 분석 설정을 검사하는 중... Checking integrity of name service switch configuration file "/etc/nsswitch.conf" ... All nodes have same "hosts" entry defined in file "/etc/nsswitch.conf" Check for integrity of name service switch configuration file "/etc/nsswitch.conf" passed SCAN VIP 및 리스너 설정 확인을 성공했습니다. OLR 무결성 검사 중... OLR 구성 파일 확인 중... OLR 구성 파일 확인을 성공했습니다. OLR 파일 속성 확인 중... OLR 파일 확인을 성공했습니다. WARNING: 이 검사는 OLR 콘텐츠의 무결성을 확인하지 않습니다. OLR 콘텐츠를 확인하려면 권한이 있는 사용자로 'ocrcheck -local'을 실행하십시오. OLR 무결성 검사를 성공했습니다. 사용자 "grid"이(가) "root" 그룹에 속해 있지 않습니다. 검사를 성공했습니다. 모든 노드에 Clusterware가 설치되었는지 여부를 검사하는 중... Clusterware 설치 검사를 성공했습니다. CTSS 리소스가 모든 노드에서 실행 중인지 여부를 검사하는 중... CTSS 리소스 검사를 성공했습니다. 모든 노드에서 시간 오프셋에 대해 CTSS를 질의하는 중... 시간 오프셋에 대한 CTSS 질의를 성공했습니다. CTSS 상태 검사가 시작되었습니다. CTSS가 활성 상태입니다. 모든 노드에서 시계 시간 오프셋 검사가 계속 진행됩니다. 시계 시간 오프셋 검사를 성공했습니다. Oracle Cluster Time Synchronization Service 검사를 성공했습니다. VIP 구성을 검사하는 중입니다. VIP 서브넷 구성을 검사하는 중입니다. VIP 서브넷 구성 검사를 성공했습니다. VIP 연결 가능성을 검사하는 중 VIP 연결 가능성 검사를 성공했습니다. 클러스터 서비스 설정에 대한 사후 확인을 성공했습니다. The plug-in Oracle Cluster Verification Utility has successfully been performed ------------------------------------------------------ The action configuration has successfully completed ###################################################
7. Grid 설치 결과 확인
crsctl stat res -t
[root@rac2 ~]# crsctl stat res -t -------------------------------------------------------------------------------- NAME TARGET STATE SERVER STATE_DETAILS -------------------------------------------------------------------------------- Local Resources -------------------------------------------------------------------------------- ora.DATA.dg ONLINE ONLINE rac1 ONLINE ONLINE rac2 ora.LISTENER.lsnr ONLINE ONLINE rac1 ONLINE ONLINE rac2 ora.asm ONLINE ONLINE rac1 Started ONLINE ONLINE rac2 Started ora.gsd OFFLINE OFFLINE rac1 OFFLINE OFFLINE rac2 ora.net1.network ONLINE ONLINE rac1 ONLINE ONLINE rac2 ora.ons ONLINE ONLINE rac1 ONLINE ONLINE rac2 -------------------------------------------------------------------------------- Cluster Resources -------------------------------------------------------------------------------- ora.LISTENER_SCAN1.lsnr 1 ONLINE ONLINE rac1 ora.cvu 1 ONLINE ONLINE rac1 ora.oc4j 1 ONLINE ONLINE rac1 ora.rac1.vip 1 ONLINE ONLINE rac1 ora.rac2.vip 1 ONLINE ONLINE rac2 ora.scan1.vip 1 ONLINE ONLINE rac1
8. 리스너 추가
srvctl add listener -listener LISTENER
{}
VII. Raw Device 적용
1. OCR 영역 이관
ocrconfig -add /dev/raw/raw1 ocrconfig -add /dev/raw/raw2 ocrconfig -delete +DATA ocrcheck
[root@rac1 ~]# ocrcheck Status of Oracle Cluster Registry is as follows : Version : 3 Total space (kbytes) : 262120 Used space (kbytes) : 2592 Available space (kbytes) : 259528 ID : 1638877609 Device/File Name : +DATA Device/File integrity check succeeded Device/File not configured Device/File not configured Device/File not configured Device/File not configured Cluster registry integrity check succeeded Logical corruption check succeeded [root@rac1 ~]# ocrconfig -add /dev/raw/raw1 [root@rac1 ~]# ocrconfig -add /dev/raw/raw2 [root@rac1 ~]# ocrconfig -delete +DATA [root@rac1 ~]# ocrcheck Status of Oracle Cluster Registry is as follows : Version : 3 Total space (kbytes) : 262120 Used space (kbytes) : 2592 Available space (kbytes) : 259528 ID : 1638877609 Device/File Name : /dev/raw/raw1 Device/File integrity check succeeded Device/File Name : /dev/raw/raw2 Device/File integrity check succeeded Device/File not configured Device/File not configured Device/File not configured Cluster registry integrity check succeeded Logical corruption check succeeded
[root@rac2 ~]# ocrcheck Status of Oracle Cluster Registry is as follows : Version : 3 Total space (kbytes) : 262120 Used space (kbytes) : 2592 Available space (kbytes) : 259528 ID : 1638877609 Device/File Name : /dev/raw/raw1 Device/File integrity check succeeded Device/File Name : /dev/raw/raw2 Device/File integrity check succeeded Device/File not configured Device/File not configured Device/File not configured Cluster registry integrity check succeeded Logical corruption check succeeded
2. Vote 영역 이관
crsctl replace votedisk /dev/raw/raw3 crsctl add css votedisk /dev/raw/raw4 crsctl add css votedisk /dev/raw/raw5 crsctl query css votedisk
[root@rac1 ~]# crsctl query css votedisk ## STATE File Universal Id File Name Disk group -- ----- ----------------- --------- --------- 1. ONLINE 7d91b543779a4fdebfc8895c7fda9c05 (/dev/raw/raw6) [DATA] Located 1 voting disk(s). [root@rac1 ~]# crsctl replace votedisk /dev/raw/raw3 Now formatting voting disk: /dev/raw/raw3. CRS-4256: Updating the profile Successful addition of voting disk 6012122d0b004f6dbf3b539e7e5efc8b. Successful deletion of voting disk 7d91b543779a4fdebfc8895c7fda9c05. CRS-4256: Updating the profile CRS-4266: Voting file(s) successfully replaced [root@rac1 ~]# crsctl add css votedisk /dev/raw/raw4 Now formatting voting disk: /dev/raw/raw4. CRS-4603: Successful addition of voting disk /dev/raw/raw4. [root@rac1 ~]# crsctl add css votedisk /dev/raw/raw5 Now formatting voting disk: /dev/raw/raw5. CRS-4603: Successful addition of voting disk /dev/raw/raw5. [root@rac1 ~]# crsctl query css votedisk ## STATE File Universal Id File Name Disk group -- ----- ----------------- --------- --------- 1. ONLINE 6012122d0b004f6dbf3b539e7e5efc8b (/dev/raw/raw3) [] 2. ONLINE 5f9279ef3b094fcabf100009ee30dd50 (/dev/raw/raw4) [] 3. ONLINE 6f3d260d7afd4fd0bfa50ba5d83a347e (/dev/raw/raw5) [] Located 3 voting disk(s).
[root@rac2 ~]# crsctl query css votedisk ## STATE File Universal Id File Name Disk group -- ----- ----------------- --------- --------- 1. ONLINE 6012122d0b004f6dbf3b539e7e5efc8b (/dev/raw/raw3) [] 2. ONLINE 5f9279ef3b094fcabf100009ee30dd50 (/dev/raw/raw4) [] 3. ONLINE 6f3d260d7afd4fd0bfa50ba5d83a347e (/dev/raw/raw5) [] Located 3 voting disk(s).
3. ASM 삭제 및 ASM 할당 디스크 초기화
crsctl stat res -t srvctl stop diskgroup -g data srvctl stop asm srvctl remove diskgroup -g data srvctl disable asm srvctl remove asm
[grid@+ASM1 ~]$ crsctl stat res -t -------------------------------------------------------------------------------- NAME TARGET STATE SERVER STATE_DETAILS -------------------------------------------------------------------------------- Local Resources -------------------------------------------------------------------------------- ora.DATA.dg ONLINE ONLINE oraw1 ONLINE ONLINE oraw2 ora.LISTENER.lsnr ONLINE ONLINE oraw1 ONLINE ONLINE oraw2 ora.asm ONLINE ONLINE oraw1 Started ONLINE ONLINE oraw2 Started ora.gsd OFFLINE OFFLINE oraw1 OFFLINE OFFLINE oraw2 ora.net1.network ONLINE ONLINE oraw1 ONLINE ONLINE oraw2 ora.ons ONLINE ONLINE oraw1 ONLINE ONLINE oraw2 -------------------------------------------------------------------------------- Cluster Resources -------------------------------------------------------------------------------- ora.LISTENER_SCAN1.lsnr 1 ONLINE ONLINE oraw1 ora.cvu 1 ONLINE ONLINE oraw1 ora.oc4j 1 ONLINE ONLINE oraw1 ora.oraw1.vip 1 ONLINE ONLINE oraw1 ora.oraw2.vip 1 ONLINE ONLINE oraw2 ora.scan1.vip 1 ONLINE ONLINE oraw1 [grid@+ASM1 ~]$ srvctl stop diskgroup -g data [grid@+ASM1 ~]$ srvctl stop asm [grid@+ASM1 ~]$ srvctl remove diskgroup -g data [grid@+ASM1 ~]$ srvctl disable asm [grid@+ASM1 ~]$ srvctl remove asm [grid@+ASM1 ~]$ crsctl stat res -t -------------------------------------------------------------------------------- NAME TARGET STATE SERVER STATE_DETAILS -------------------------------------------------------------------------------- Local Resources -------------------------------------------------------------------------------- ora.LISTENER.lsnr ONLINE ONLINE oraw1 ONLINE ONLINE oraw2 ora.gsd OFFLINE OFFLINE oraw1 OFFLINE OFFLINE oraw2 ora.net1.network ONLINE ONLINE oraw1 ONLINE ONLINE oraw2 ora.ons ONLINE ONLINE oraw1 ONLINE ONLINE oraw2 -------------------------------------------------------------------------------- Cluster Resources -------------------------------------------------------------------------------- ora.LISTENER_SCAN1.lsnr 1 ONLINE ONLINE oraw1 ora.cvu 1 ONLINE ONLINE oraw1 ora.oc4j 1 ONLINE ONLINE oraw1 ora.oraw1.vip 1 ONLINE ONLINE oraw1 ora.oraw2.vip 1 ONLINE ONLINE oraw2 ora.scan1.vip 1 ONLINE ONLINE oraw1
dd if=/dev/zero of=/dev/raw/raw6 bs=1024k count=1024
[root@rac1 ~]# dd if=/dev/zero of=/dev/raw/raw6 bs=1024k count=1024 1024+0 records in 1024+0 records out 1073741824 bytes (1.1 GB) copied, 11.2279 s, 95.6 MB/s
{}
VIII. DBMS 설치
1. Database 설치 사전 작업
cd <설치 파일 압축해제 경로>/database/sshsetup ./sshUserSetup.sh -user oracle -hosts "rac1 rac2" -noPromptPassphrase -advanced
[oracle@racdb1 ~]$ cd /media/sf_oracle/database/sshsetup [oracle@racdb1 sshsetup]$ ./sshUserSetup.sh -user oracle -hosts "rac1 rac2" -noPromptPassphrase -advanced The output of this script is also logged into /tmp/sshUserSetup_2019-04-05-21-20-37.log Hosts are rac1 rac2 user is oracle Platform:- Linux Checking if the remote hosts are reachable PING rac1 (10.0.1.101) 56(84) bytes of data. 64 bytes from rac1 (10.0.1.101): icmp_seq=1 ttl=64 time=0.032 ms 64 bytes from rac1 (10.0.1.101): icmp_seq=2 ttl=64 time=0.040 ms 64 bytes from rac1 (10.0.1.101): icmp_seq=3 ttl=64 time=0.043 ms 64 bytes from rac1 (10.0.1.101): icmp_seq=4 ttl=64 time=0.049 ms 64 bytes from rac1 (10.0.1.101): icmp_seq=5 ttl=64 time=0.064 ms --- rac1 ping statistics --- 5 packets transmitted, 5 received, 0% packet loss, time 4001ms rtt min/avg/max/mdev = 0.032/0.045/0.064/0.013 ms PING rac2 (10.0.1.102) 56(84) bytes of data. 64 bytes from rac2 (10.0.1.102): icmp_seq=1 ttl=64 time=0.352 ms 64 bytes from rac2 (10.0.1.102): icmp_seq=2 ttl=64 time=0.507 ms 64 bytes from rac2 (10.0.1.102): icmp_seq=3 ttl=64 time=0.485 ms 64 bytes from rac2 (10.0.1.102): icmp_seq=4 ttl=64 time=0.436 ms 64 bytes from rac2 (10.0.1.102): icmp_seq=5 ttl=64 time=0.490 ms --- rac2 ping statistics --- 5 packets transmitted, 5 received, 0% packet loss, time 4000ms rtt min/avg/max/mdev = 0.352/0.454/0.507/0.056 ms Remote host reachability check succeeded. The following hosts are reachable: rac1 rac2. The following hosts are not reachable: . All hosts are reachable. Proceeding further... firsthost rac1 numhosts 2 The script will setup SSH connectivity from the host rac1 to all the remote hosts. After the script is executed, the user can use SSH to run commands on the remote hosts or copy files between this host rac1 and the remote hosts without being prompted for passwords or confirmations. NOTE 1: As part of the setup procedure, this script will use ssh and scp to copy files between the local host and the remote hosts. Since the script does not store passwords, you may be prompted for the passwords during the execution of the script whenever ssh or scp is invoked. NOTE 2: AS PER SSH REQUIREMENTS, THIS SCRIPT WILL SECURE THE USER HOME DIRECTORY AND THE .ssh DIRECTORY BY REVOKING GROUP AND WORLD WRITE PRIVILEDGES TO THESE directories. Do you want to continue and let the script make the above mentioned changes (yes/no)? yes The user chose yes User chose to skip passphrase related questions. Creating .ssh directory on local host, if not present already Creating authorized_keys file on local host Changing permissions on authorized_keys to 644 on local host Creating known_hosts file on local host Changing permissions on known_hosts to 644 on local host Creating config file on local host If a config file exists already at /home/oracle/.ssh/config, it would be backed up to /home/oracle/.ssh/config.backup. Removing old private/public keys on local host Running SSH keygen on local host with empty passphrase Generating public/private rsa key pair. Your identification has been saved in /home/oracle/.ssh/id_rsa. Your public key has been saved in /home/oracle/.ssh/id_rsa.pub. The key fingerprint is: 94:86:59:e1:8a:63:88:6b:57:86:3c:6c:1b:7f:8f:d6 oracle@rac1 The key's randomart image is: +--[ RSA 1024]----+ | o. | | = . | | o = | | .o... + | |. .B+o. S | | ...B. | |.. o . .. | |. . ..oE | | .. . | +-----------------+ Creating .ssh directory and setting permissions on remote host rac1 THE SCRIPT WOULD ALSO BE REVOKING WRITE PERMISSIONS FOR group AND others ON THE HOME DIRECTORY FOR oracle. THIS IS AN SSH REQUIREMENT. The script would create ~oracle/.ssh/config file on remote host rac1. If a config file exists already at ~oracle/.ssh/config, it would be backed up to ~oracle/.ssh/config.backup. The user may be prompted for a password here since the script would be running SSH on host rac1. Warning: Permanently added 'rac1,10.0.1.101' (RSA) to the list of known hosts. oracle@rac1's password: Done with creating .ssh directory and setting permissions on remote host rac1. Creating .ssh directory and setting permissions on remote host rac2 THE SCRIPT WOULD ALSO BE REVOKING WRITE PERMISSIONS FOR group AND others ON THE HOME DIRECTORY FOR oracle. THIS IS AN SSH REQUIREMENT. The script would create ~oracle/.ssh/config file on remote host rac2. If a config file exists already at ~oracle/.ssh/config, it would be backed up to ~oracle/.ssh/config.backup. The user may be prompted for a password here since the script would be running SSH on host rac2. Warning: Permanently added 'rac2,10.0.1.102' (RSA) to the list of known hosts. oracle@rac2's password: Done with creating .ssh directory and setting permissions on remote host rac2. Copying local host public key to the remote host rac1 The user may be prompted for a password or passphrase here since the script would be using SCP for host rac1. oracle@rac1's password: Done copying local host public key to the remote host rac1 Copying local host public key to the remote host rac2 The user may be prompted for a password or passphrase here since the script would be using SCP for host rac2. oracle@rac2's password: Done copying local host public key to the remote host rac2 Creating keys on remote host rac1 if they do not exist already. This is required to setup SSH on host rac1. Creating keys on remote host rac2 if they do not exist already. This is required to setup SSH on host rac2. Generating public/private rsa key pair. Your identification has been saved in .ssh/id_rsa. Your public key has been saved in .ssh/id_rsa.pub. The key fingerprint is: 6a:9e:49:dc:cc:2b:cc:09:db:69:34:7e:55:04:c2:c2 oracle@rac2 The key's randomart image is: +--[ RSA 1024]----+ | . .. .. | | E .. . | | . . | | . | | S . | | ..o= . | | O=++. | | .+Xo.. | | .+o. | +-----------------+ Updating authorized_keys file on remote host rac1 Updating known_hosts file on remote host rac1 Updating authorized_keys file on remote host rac2 Updating known_hosts file on remote host rac2 cat: /home/oracle/.ssh/known_hosts.tmp: 그런 파일이나 디렉터리가 없습니다 cat: /home/oracle/.ssh/authorized_keys.tmp: 그런 파일이나 디렉터리가 없습니다 SSH setup is complete. ------------------------------------------------------------------------ Verifying SSH setup =================== The script will now run the date command on the remote nodes using ssh to verify if ssh is setup correctly. IF THE SETUP IS CORRECTLY SETUP, THERE SHOULD BE NO OUTPUT OTHER THAN THE DATE AND SSH SHOULD NOT ASK FOR PASSWORDS. If you see any output other than date or are prompted for the password, ssh is not setup correctly and you will need to resolve the issue and set up ssh again. The possible causes for failure could be: 1. The server settings in /etc/ssh/sshd_config file do not allow ssh for user oracle. 2. The server may have disabled public key based authentication. 3. The client public key on the server may be outdated. 4. ~oracle or ~oracle/.ssh on the remote host may not be owned by oracle. 5. User may not have passed -shared option for shared remote users or may be passing the -shared option for non-shared remote users. 6. If there is output in addition to the date, but no password is asked, it may be a security alert shown as part of company policy. Append the additional text to the <OMS HOME>/sysman/prov/resources/ignoreMessages.txt file. ------------------------------------------------------------------------ --rac1:-- Running /usr/bin/ssh -x -l oracle rac1 date to verify SSH connectivity has been setup from local host to rac1. IF YOU SEE ANY OTHER OUTPUT BESIDES THE OUTPUT OF THE DATE COMMAND OR IF YOU ARE PROMPTED FOR A PASSWORD HERE, IT MEANS SSH SETUP HAS NOT BEEN SUCCESSFUL. Please note that being prompted for a passphrase may be OK but being prompted for a password is ERROR. 2019. 04. 05. (금) 21:20:59 KST ------------------------------------------------------------------------ --rac2:-- Running /usr/bin/ssh -x -l oracle rac2 date to verify SSH connectivity has been setup from local host to rac2. IF YOU SEE ANY OTHER OUTPUT BESIDES THE OUTPUT OF THE DATE COMMAND OR IF YOU ARE PROMPTED FOR A PASSWORD HERE, IT MEANS SSH SETUP HAS NOT BEEN SUCCESSFUL. Please note that being prompted for a passphrase may be OK but being prompted for a password is ERROR. 2019. 04. 05. (금) 21:20:59 KST ------------------------------------------------------------------------ ------------------------------------------------------------------------ Verifying SSH connectivity has been setup from rac1 to rac1 IF YOU SEE ANY OTHER OUTPUT BESIDES THE OUTPUT OF THE DATE COMMAND OR IF YOU ARE PROMPTED FOR A PASSWORD HERE, IT MEANS SSH SETUP HAS NOT BEEN SUCCESSFUL. bash: -c: line 0: unexpected EOF while looking for matching `"' bash: -c: line 1: syntax error: unexpected end of file ------------------------------------------------------------------------ ------------------------------------------------------------------------ Verifying SSH connectivity has been setup from rac1 to rac2 IF YOU SEE ANY OTHER OUTPUT BESIDES THE OUTPUT OF THE DATE COMMAND OR IF YOU ARE PROMPTED FOR A PASSWORD HERE, IT MEANS SSH SETUP HAS NOT BEEN SUCCESSFUL. bash: -c: line 0: unexpected EOF while looking for matching `"' bash: -c: line 1: syntax error: unexpected end of file ------------------------------------------------------------------------ -Verification from complete- SSH verification complete.
ssh rac1 date ssh rac2 date ssh rac1-priv date ssh rac2-priv date
oracle@racdb1 ~]$ ssh rac1 date 2019. 04. 05. (금) 21:21:42 KST [oracle@racdb1 ~]$ ssh rac2 date 2019. 04. 05. (금) 21:21:46 KST [oracle@racdb1 ~]$ ssh rac1-priv date The authenticity of host 'rac1-priv (10.0.5.101)' can't be established. RSA key fingerprint is 12:cf:8a:65:85:4c:2d:9d:bd:b8:92:3f:49:6c:2d:a9. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'rac1-priv,10.0.5.101' (RSA) to the list of known hosts. 2019. 04. 05. (금) 21:21:52 KST [oracle@racdb1 ~]$ ssh rac2-priv date The authenticity of host 'rac2-priv (10.0.5.102)' can't be established. RSA key fingerprint is 12:cf:8a:65:85:4c:2d:9d:bd:b8:92:3f:49:6c:2d:a9. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'rac2-priv,10.0.5.102' (RSA) to the list of known hosts. 2019. 04. 05. (금) 21:21:57 KST
[oracle@racdb2 ~]$ ssh rac1 date 2019. 04. 05. (금) 21:22:37 KST [oracle@racdb2 ~]$ ssh rac2 date 2019. 04. 05. (금) 21:22:40 KST [oracle@racdb2 ~]$ ssh rac1-priv date The authenticity of host 'rac1-priv (10.0.5.101)' can't be established. RSA key fingerprint is 12:cf:8a:65:85:4c:2d:9d:bd:b8:92:3f:49:6c:2d:a9. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'rac1-priv,10.0.5.101' (RSA) to the list of known hosts. 2019. 04. 05. (금) 21:22:45 KST [oracle@racdb2 ~]$ ssh rac2-priv date The authenticity of host 'rac2-priv (10.0.5.102)' can't be established. RSA key fingerprint is 12:cf:8a:65:85:4c:2d:9d:bd:b8:92:3f:49:6c:2d:a9. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'rac2-priv,10.0.5.102' (RSA) to the list of known hosts. 2019. 04. 05. (금) 21:22:51 KST
chmod 775 /u01/app/oracle # cd $ORACLE_BASE/diag/kfod/<호스트명>/kfod # chmod 775 *
[root@rac1 ~]# chmod 775 /u01/app/oracle
[root@rac2 ~]# chmod 775 /u01/app/oracle
2. Database 설치 response 파일 설정
cp <설치 파일 압축해제 경로>/database/response/db_install.rsp ~/. vi ~/db_install.rsp
oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v11_2_0 oracle.install.option=INSTALL_DB_SWONLY ORACLE_HOSTNAME=[HOST_NAME1] UNIX_GROUP_NAME=oinstall INVENTORY_LOCATION=[ORACLE_INVENTORY] SELECTED_LANGUAGES=en,ko ORACLE_HOME=[DB_HOME] ORACLE_BASE=[ORACLE_BASE] oracle.install.db.InstallEdition=EE oracle.install.db.EEOptionsSelection=false oracle.install.db.optionalComponents=oracle.rdbms.partitioning:11.2.0.4.0,oracle.oraolap:11.2.0.4.0,oracle.rdbms.dm:11.2.0.4.0,oracle.rdbms.dv:11.2.0.4.0,oracle.rdbms.lbac:11.2.0.4.0,oracle.rdbms.rat:11.2.0.4.0 oracle.install.db.DBA_GROUP=dba oracle.install.db.OPER_GROUP=oper oracle.install.db.CLUSTER_NODES=[HOST_NAME1],[HOST_NAME2] oracle.install.db.isRACOneInstall=false SECURITY_UPDATES_VIA_MYORACLESUPPORT=false DECLINE_SECURITY_UPDATES=true
oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v11_2_0 oracle.install.option=INSTALL_DB_SWONLY ORACLE_HOSTNAME=rac1 UNIX_GROUP_NAME=oinstall INVENTORY_LOCATION=/u01/app/oraInventory SELECTED_LANGUAGES=en,ko ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1 ORACLE_BASE=/u01/app/oracle oracle.install.db.InstallEdition=EE oracle.install.db.EEOptionsSelection=false oracle.install.db.optionalComponents=oracle.rdbms.partitioning:11.2.0.4.0,oracle.oraolap:11.2.0.4.0,oracle.rdbms.dm:11.2.0.4.0,oracle.rdbms.dv:11.2.0.4.0,oracle.rdbms.lbac:11.2.0.4.0,oracle.rdbms.rat:11.2.0.4.0 oracle.install.db.DBA_GROUP=dba oracle.install.db.OPER_GROUP=oper oracle.install.db.CLUSTER_NODES=rac1,rac2 oracle.install.db.isRACOneInstall=false SECURITY_UPDATES_VIA_MYORACLESUPPORT=false DECLINE_SECURITY_UPDATES=true
3. Database 설치 수행
cd <설치 파일 압축해제 경로>/database ./runInstaller -silent -ignorePrereq -ignoreSysPreReqs -responseFile ~/db_install.rsp
[oracle@racdb1 database]$ ./runInstaller -silent -ignorePrereq -ignoreSysPreReqs -responseFile ~/db_install.rsp Oracle Universal Installer 시작 중... 임시 공간 확인 중: 120MB 이상이어야 합니다.. 실제 17496MB 성공 스왑 공간 확인 중: 150MB 이상이어야 합니다.. 실제 4095MB 성공 다음에서 Oracle Universal Installer의 시작을 준비하는 중 /tmp/OraInstall2019-04-05_09-43-18PM. 기다리십시오.[oracle@racdb1 database]$ 다음 위치에서 이 설치 세션의 로그를 찾을 수 있습니다. /u01/app/oraInventory/logs/installActions2019-04-05_09-43-18PM.log Oracle Database 11g의 설치을(를) 성공했습니다. 자세한 내용은 '/u01/app/oraInventory/logs/silentInstall2019-04-05_09-43-18PM.log'을(를) 확인하십시오. 루트 사용자로 다음 스크립트를 실행합니다. 1. /u01/app/oracle/product/11.2.0/db_1/root.sh 다음 노드에서 /u01/app/oracle/product/11.2.0/db_1/root.sh을(를) 실행하십시오. [rac1, rac2] Successfully Setup Software.
4. root 유저 스크립트 수행
/u01/app/oracle/product/11.2.0/db_1/root.sh
[root@rac1 ~]# /u01/app/oracle/product/11.2.0/db_1/root.sh Check /u01/app/oracle/product/11.2.0/db_1/install/root_rac1_2019-04-05_21-57-37.log for the output of root script
Performing root user operation for Oracle 11g The following environment variables are set as: ORACLE_OWNER= oracle ORACLE_HOME= /u01/app/oracle/product/11.2.0/db_1 Copying dbhome to /usr/local/bin ... Copying oraenv to /usr/local/bin ... Copying coraenv to /usr/local/bin ... Entries will be added to the /etc/oratab file as needed by Database Configuration Assistant when a database is created Finished running generic part of root script. Now product-specific root actions will be performed. Finished product-specific root actions. Finished product-specific root actions.
[root@rac2 ~]# /u01/app/oracle/product/11.2.0/db_1/root.sh Check /u01/app/oracle/product/11.2.0/db_1/install/root_rac2_2019-04-05_21-57-45.log for the output of root script
Performing root user operation for Oracle 11g The following environment variables are set as: ORACLE_OWNER= oracle ORACLE_HOME= /u01/app/oracle/product/11.2.0/db_1 Copying dbhome to /usr/local/bin ... Copying oraenv to /usr/local/bin ... Copying coraenv to /usr/local/bin ... Entries will be added to the /etc/oratab file as needed by Database Configuration Assistant when a database is created Finished running generic part of root script. Now product-specific root actions will be performed. Finished product-specific root actions. Finished product-specific root actions.
{}
IX. RAC Database 생성
1. Database 생성
A) 작업 스크립트 준비
mkdir -p $ORACLE_BASE/admin/[DB_NAME]/scripts cd $ORACLE_BASE/admin/[DB_NAME]/scripts
[oracle@racdb1 ~]$ mkdir -p $ORACLE_BASE/admin/racdb/scripts [oracle@racdb1 ~]$ cd $ORACLE_BASE/admin/racdb/scripts
스크립트 생성 디렉토리를 $ORACLE_BASE 경로 아래에 생성합니다.
작업할 스크립트를 모두 이곳에 저장합니다.
#!/bin/sh OLD_UMASK=`umask` umask 0027 mkdir -p [ORACLE_BASE]/admin/[DB_NAME]/adump mkdir -p [ORACLE_BASE]/admin/[DB_NAME]/dpdump mkdir -p [ORACLE_BASE]/admin/[DB_NAME]/hdump mkdir -p [ORACLE_BASE]/admin/[DB_NAME]/pfile mkdir -p [ORACLE_BASE]/cfgtoollogs/dbca/[DB_NAME] ssh oracle@[HOST_NAME2] "mkdir -p [ORACLE_BASE]/admin/[DB_NAME]/adump" ssh oracle@[HOST_NAME2] "mkdir -p [ORACLE_BASE]/admin/[DB_NAME]/dpdump" ssh oracle@[HOST_NAME2] "mkdir -p [ORACLE_BASE]/admin/[DB_NAME]/hdump" ssh oracle@[HOST_NAME2] "mkdir -p [ORACLE_BASE]/admin/[DB_NAME]/pfile" ssh oracle@[HOST_NAME2] "mkdir -p [ORACLE_BASE]/cfgtoollogs/dbca/[DB_NAME]" umask ${OLD_UMASK} ORACLE_SID=[ORACLE_SID1]; export ORACLE_SID PATH=$ORACLE_HOME/bin:$PATH; export PATH echo You should Add this entry in the /etc/oratab: [ORACLE_SID]:[DB_HOME]:N [DB_HOME]/bin/sqlplus /nolog @[ORACLE_BASE]/admin/[DB_NAME]/scripts/CreateRACDB.sql
#!/bin/sh OLD_UMASK=`umask` umask 0027 mkdir -p /u01/app/oracle/admin/racdb/adump mkdir -p /u01/app/oracle/admin/racdb/dpdump mkdir -p /u01/app/oracle/admin/racdb/hdump mkdir -p /u01/app/oracle/admin/racdb/pfile mkdir -p /u01/app/oracle/cfgtoollogs/dbca/racdb ssh oracle@rac2 "mkdir -p /u01/app/oracle/admin/racdb/adump" ssh oracle@rac2 "mkdir -p /u01/app/oracle/admin/racdb/dpdump" ssh oracle@rac2 "mkdir -p /u01/app/oracle/admin/racdb/hdump" ssh oracle@rac2 "mkdir -p /u01/app/oracle/admin/racdb/pfile" ssh oracle@rac2 "mkdir -p /u01/app/oracle/cfgtoollogs/dbca/racdb": umask ${OLD_UMASK} ORACLE_SID=racdb1; export ORACLE_SID PATH=$ORACLE_HOME/bin:$PATH; export PATH echo You should Add this entry in the /etc/oratab: racdb:/u01/app/oracle/product/11.2.0/db_1:N /u01/app/oracle/product/11.2.0/db_1/bin/sqlplus /nolog @/u01/app/oracle/admin/racdb/scripts/CreateRACDB.sql
데이터베이스 생성을 위해 필요한 디렉토리를 만들고 전체 작업을 수행할 메인 스크립트를 생성합니다.
괄호 [] 안에 표시된 변수 부분은 실제 설치할 환경에 해당되는 내용으로 수정하여 저장하도록 합니다.
[ORACLE_BASE] : 오라클 소프트웨어 설치 베이스 경로
[DB_NAME] : 데이터베이스 명
[HOST_NAME2] : 2번 노드의 서버 명
[ORACLE_SID1] : 1번 인스턴스 명
[ORACLE_SID] : 각 노드의 인스턴스 명
[DB_HOME] : 데이터베이스 소프트웨어 설치 경로
set verify off ACCEPT sysPassword CHAR PROMPT 'Enter new password for SYS: ' HIDE ACCEPT systemPassword CHAR PROMPT 'Enter new password for SYSTEM: ' HIDE host [DB_HOME]/bin/orapwd file=[DB_HOME]/dbs/orapw[ORACLE_SID1] force=y host ssh oracle@[HOST_NAME2] "[DB_HOME]/bin/orapwd file=[DB_HOME]/dbs/orapw[ORACLE_SID2] force=y" host [GRID_HOME]/bin/setasmgidwrap o=[DB_HOME]/bin/oracle host [DB_HOME]/bin/srvctl add database -d [DB_NAME] -o [DB_HOME] -p /dev/raw/raw20 -n [DB_NAME] host [DB_HOME]/bin/srvctl add instance -d [DB_NAME] -i [ORACLE_SID1] -n [HOST_NAME1] host [DB_HOME]/bin/srvctl add instance -d [DB_NAME] -i [ORACLE_SID2] -n [HOST_NAME2] host [DB_HOME]/bin/srvctl disable database -d [DB_NAME] @[ORACLE_BASE]/admin/[DB_NAME]/scripts/CreateDB.sql @[ORACLE_BASE]/admin/[DB_NAME]/scripts/CreateDBFiles.sql @[ORACLE_BASE]/admin/[DB_NAME]/scripts/CreateDBCatalog.sql @[ORACLE_BASE]/admin/[DB_NAME]/scripts/CreateJVM.sql @[ORACLE_BASE]/admin/[DB_NAME]/scripts/CreateClustDBViews.sql @[ORACLE_BASE]/admin/[DB_NAME]/scripts/CreateOracleText.sql @[ORACLE_BASE]/admin/[DB_NAME]/scripts/CreateXDB.sql @[ORACLE_BASE]/admin/[DB_NAME]/scripts/CreateORDSchema.sql @[ORACLE_BASE]/admin/[DB_NAME]/scripts/CreateMultiMedia.sql @[ORACLE_BASE]/admin/[DB_NAME]/scripts/CreateOLAP.sql @[ORACLE_BASE]/admin/[DB_NAME]/scripts/CreateSpatial.sql @[ORACLE_BASE]/admin/[DB_NAME]/scripts/CreateEMRepos.sql @[ORACLE_BASE]/admin/[DB_NAME]/scripts/CreateAPEX.sql @[ORACLE_BASE]/admin/[DB_NAME]/scripts/CreateOWB.sql host echo "SPFILE='/dev/raw/raw20'" > [DB_HOME]/dbs/init[ORACLE_SID1].ora @[ORACLE_BASE]/admin/[DB_NAME]/scripts/lockAccount.sql @[ORACLE_BASE]/admin/[DB_NAME]/scripts/postDBCreation.sql
set verify off ACCEPT sysPassword CHAR PROMPT 'Enter new password for SYS: ' HIDE ACCEPT systemPassword CHAR PROMPT 'Enter new password for SYSTEM: ' HIDE host /u01/app/oracle/product/11.2.0/db_1/bin/orapwd file=/u01/app/oracle/product/11.2.0/db_1/dbs/orapwracdb1 force=y host ssh oracle@rac2 "/u01/app/oracle/product/11.2.0/db_1/bin/orapwd file=/u01/app/oracle/product/11.2.0/db_1/dbs/orapwracdb2 force=y" host /u01/app/11.2.0/grid/bin/setasmgidwrap o=/u01/app/oracle/product/11.2.0/db_1/bin/oracle host /u01/app/oracle/product/11.2.0/db_1/bin/srvctl add database -d racdb -o /u01/app/oracle/product/11.2.0/db_1 -p /dev/raw/raw20 -n racdb host /u01/app/oracle/product/11.2.0/db_1/bin/srvctl add instance -d racdb -i racdb1 -n rac1 host /u01/app/oracle/product/11.2.0/db_1/bin/srvctl add instance -d racdb -i racdb2 -n rac2 host /u01/app/oracle/product/11.2.0/db_1/bin/srvctl disable database -d racdb @/u01/app/oracle/admin/racdb/scripts/CreateDB.sql @/u01/app/oracle/admin/racdb/scripts/CreateDBFiles.sql @/u01/app/oracle/admin/racdb/scripts/CreateDBCatalog.sql @/u01/app/oracle/admin/racdb/scripts/CreateJVM.sql @/u01/app/oracle/admin/racdb/scripts/CreateClustDBViews.sql @/u01/app/oracle/admin/racdb/scripts/CreateOracleText.sql @/u01/app/oracle/admin/racdb/scripts/CreateXDB.sql --@/u01/app/oracle/admin/racdb/scripts/CreateORDSchema.sql --@/u01/app/oracle/admin/racdb/scripts/CreateMultiMedia.sql --@/u01/app/oracle/admin/racdb/scripts/CreateOLAP.sql --@/u01/app/oracle/admin/racdb/scripts/CreateSpatial.sql --@/u01/app/oracle/admin/racdb/scripts/CreateEMRepos.sql --@/u01/app/oracle/admin/racdb/scripts/CreateAPEX.sql --@/u01/app/oracle/admin/racdb/scripts/CreateOWB.sql host echo "SPFILE='/dev/raw/raw20'" > /u01/app/oracle/product/11.2.0/db_1/dbs/initracdb1.ora @/u01/app/oracle/admin/racdb/scripts/lockAccount.sql @/u01/app/oracle/admin/racdb/scripts/postDBCreation.sql
서비스에 등록하고 각각의 SQL 스크립트를 수행할 스크립트를 생성합니다.
괄호 [] 안에 표시된 변수 부분은 실제 설치할 환경에 해당되는 내용으로 수정하여 저장하도록 합니다.
[DB_HOME]
[ORACLE_SID1]
[GRID_HOME]
[DB_NAME]
[ORACLE_SID1]
[HOST_NAME1]
[ORACLE_SID2]
[HOST_NAME2]
[ORACLE_BASE]
SET VERIFY OFF connect "SYS"/"&&sysPassword" as SYSDBA set echo on spool [ORACLE_BASE]/admin/[DB_NAME]/scripts/CreateDB.log append startup nomount pfile="[ORACLE_BASE]/admin/[DB_NAME]/scripts/init.ora"; CREATE DATABASE "[DB_NAME]" MAXINSTANCES 32 MAXLOGHISTORY 1 MAXLOGFILES 192 MAXLOGMEMBERS 3 MAXDATAFILES 1024 DATAFILE '/dev/raw/raw6' SIZE 699M AUTOEXTEND OFF EXTENT MANAGEMENT LOCAL SYSAUX DATAFILE '/dev/raw/raw7' SIZE 699M AUTOEXTEND OFF SMALLFILE DEFAULT TEMPORARY TABLESPACE TEMP TEMPFILE '/dev/raw/raw9' SIZE 699M AUTOEXTEND OFF SMALLFILE UNDO TABLESPACE "UNDOTBS1" DATAFILE '/dev/raw/raw10' SIZE 699M AUTOEXTEND OFF CHARACTER SET KO16MSWIN949 NATIONAL CHARACTER SET AL16UTF16 LOGFILE GROUP 1 ('/dev/raw/raw14') SIZE 199M, GROUP 2 ('/dev/raw/raw15') SIZE 199M, GROUP 3 ('/dev/raw/raw16') SIZE 199M USER SYS IDENTIFIED BY "&&sysPassword" USER SYSTEM IDENTIFIED BY "&&systemPassword"; spool off
SET VERIFY OFF connect "SYS"/"&&sysPassword" as SYSDBA set echo on spool /u01/app/oracle/admin/racdb/scripts/CreateDB.log append startup nomount pfile="/u01/app/oracle/admin/racdb/scripts/init.ora"; CREATE DATABASE "racdb" MAXINSTANCES 32 MAXLOGHISTORY 1 MAXLOGFILES 192 MAXLOGMEMBERS 3 MAXDATAFILES 1024 DATAFILE '/dev/raw/raw6' SIZE 699M AUTOEXTEND OFF EXTENT MANAGEMENT LOCAL SYSAUX DATAFILE '/dev/raw/raw7' SIZE 699M AUTOEXTEND OFF SMALLFILE DEFAULT TEMPORARY TABLESPACE TEMP TEMPFILE '/dev/raw/raw9' SIZE 699M AUTOEXTEND OFF SMALLFILE UNDO TABLESPACE "UNDOTBS1" DATAFILE '/dev/raw/raw10' SIZE 699M AUTOEXTEND OFF CHARACTER SET KO16MSWIN949 NATIONAL CHARACTER SET AL16UTF16 LOGFILE GROUP 1 ('/dev/raw/raw14') SIZE 199M, GROUP 2 ('/dev/raw/raw15') SIZE 199M, GROUP 3 ('/dev/raw/raw16') SIZE 199M USER SYS IDENTIFIED BY "&&sysPassword" USER SYSTEM IDENTIFIED BY "&&systemPassword"; spool off
SET VERIFY OFF connect "SYS"/"&&sysPassword" as SYSDBA set echo on spool [ORACLE_BASE]/admin/[DB_NAME]/scripts/CreateDBFiles.log append CREATE SMALLFILE UNDO TABLESPACE "UNDOTBS2" DATAFILE '/dev/raw/raw11' SIZE 699M AUTOEXTEND OFF; CREATE SMALLFILE TABLESPACE "USERS" LOGGING DATAFILE '/dev/raw/raw8' SIZE 699M AUTOEXTEND OFF EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO; ALTER DATABASE DEFAULT TABLESPACE "USERS"; spool off
SET VERIFY OFF connect "SYS"/"&&sysPassword" as SYSDBA set echo on spool /u01/app/oracle/admin/racdb/scripts/CreateDBFiles.log append CREATE SMALLFILE UNDO TABLESPACE "UNDOTBS2" DATAFILE '/dev/raw/raw11' SIZE 699M AUTOEXTEND OFF; CREATE SMALLFILE TABLESPACE "USERS" LOGGING DATAFILE '/dev/raw/raw8' SIZE 699M AUTOEXTEND OFF EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO; ALTER DATABASE DEFAULT TABLESPACE "USERS"; spool off
SET VERIFY OFF connect "SYS"/"&&sysPassword" as SYSDBA set echo on spool [ORACLE_BASE]/admin/[DB_NAME]/scripts/CreateDBCatalog.log append @[DB_HOME]/rdbms/admin/catalog.sql; @[DB_HOME]/rdbms/admin/catblock.sql; @[DB_HOME]/rdbms/admin/catproc.sql; @[DB_HOME]/rdbms/admin/catoctk.sql; @[DB_HOME]/rdbms/admin/owminst.plb; connect "SYSTEM"/"&&systemPassword" set echo on @[DB_HOME]/sqlplus/admin/pupbld.sql; @[DB_HOME]/sqlplus/admin/help/hlpbld.sql helpus.sql; spool off
SET VERIFY OFF connect "SYS"/"&&sysPassword" as SYSDBA set echo on spool /u01/app/oracle/admin/racdb/scripts/CreateDBCatalog.log append @/u01/app/oracle/product/11.2.0/db_1/rdbms/admin/catalog.sql; @/u01/app/oracle/product/11.2.0/db_1/rdbms/admin/catblock.sql; @/u01/app/oracle/product/11.2.0/db_1/rdbms/admin/catproc.sql; @/u01/app/oracle/product/11.2.0/db_1/rdbms/admin/catoctk.sql; @/u01/app/oracle/product/11.2.0/db_1/rdbms/admin/owminst.plb; connect "SYSTEM"/"&&systemPassword" set echo on @/u01/app/oracle/product/11.2.0/db_1/sqlplus/admin/pupbld.sql; @/u01/app/oracle/product/11.2.0/db_1/sqlplus/admin/help/hlpbld.sql helpus.sql; spool off
SET VERIFY OFF connect "SYS"/"&&sysPassword" as SYSDBA set echo on spool [ORACLE_BASE]/admin/[DB_NAME]/scripts/CreateJVM.log append @[DB_HOME]/javavm/install/initjvm.sql; @[DB_HOME]/xdk/admin/initxml.sql; @[DB_HOME]/xdk/admin/xmlja.sql; @[DB_HOME]/rdbms/admin/catjava.sql; @[DB_HOME]/rdbms/admin/catxdbj.sql; spool off
SET VERIFY OFF connect "SYS"/"&&sysPassword" as SYSDBA set echo on spool /u01/app/oracle/admin/racdb/scripts/CreateJVM.log append @/u01/app/oracle/product/11.2.0/db_1/javavm/install/initjvm.sql; @/u01/app/oracle/product/11.2.0/db_1/xdk/admin/initxml.sql; @/u01/app/oracle/product/11.2.0/db_1/xdk/admin/xmlja.sql; @/u01/app/oracle/product/11.2.0/db_1/rdbms/admin/catjava.sql; @/u01/app/oracle/product/11.2.0/db_1/rdbms/admin/catxdbj.sql; spool off
SET VERIFY OFF connect "SYS"/"&&sysPassword" as SYSDBA set echo on spool [ORACLE_BASE]/admin/[DB_NAME]/scripts/CreateClustDBViews.log append @[DB_HOME]/rdbms/admin/catclust.sql; spool off
SET VERIFY OFF connect "SYS"/"&&sysPassword" as SYSDBA set echo on spool /u01/app/oracle/admin/racdb/scripts/CreateClustDBViews.log append @/u01/app/oracle/product/11.2.0/db_1/rdbms/admin/catclust.sql; spool off
SET VERIFY OFF connect "SYS"/"&&sysPassword" as SYSDBA set echo on spool [ORACLE_BASE]/admin/[DB_NAME]/scripts/CreateOracleText.log append @[DB_HOME]/ctx/admin/catctx [PASSWORD] SYSAUX TEMP NOLOCK; connect "CTXSYS"/"[PASSWORD]" @[DB_HOME]/ctx/admin/defaults/dr0defin.sql "KOREAN"; spool off
SET VERIFY OFF connect "SYS"/"&&sysPassword" as SYSDBA set echo on spool /u01/app/oracle/admin/racdb/scripts/CreateOracleText.log append @/u01/app/oracle/product/11.2.0/db_1/ctx/admin/catctx change_on_install SYSAUX TEMP NOLOCK; connect "CTXSYS"/"change_on_install" @/u01/app/oracle/product/11.2.0/db_1/ctx/admin/defaults/dr0defin.sql "KOREAN"; spool off
SET VERIFY OFF connect "SYS"/"&&sysPassword" as SYSDBA set echo on spool [ORACLE_BASE]/admin/[DB_NAME]/scripts/CreateXDB.log append @[DB_HOME]/rdbms/admin/catqm.sql [PASSWORD] SYSAUX TEMP YES; connect "SYS"/"&&sysPassword" as SYSDBA @[DB_HOME]/rdbms/admin/catxdbj.sql; @[DB_HOME]/rdbms/admin/catrul.sql; spool off
SET VERIFY OFF connect "SYS"/"&&sysPassword" as SYSDBA set echo on spool /u01/app/oracle/admin/racdb/scripts/CreateXDB.log append @/u01/app/oracle/product/11.2.0/db_1/rdbms/admin/catqm.sql change_on_install SYSAUX TEMP YES; connect "SYS"/"&&sysPassword" as SYSDBA @/u01/app/oracle/product/11.2.0/db_1/rdbms/admin/catxdbj.sql; @/u01/app/oracle/product/11.2.0/db_1/rdbms/admin/catrul.sql; spool off
SET VERIFY OFF connect "SYS"/"&&sysPassword" as SYSDBA set echo on spool [ORACLE_BASE]/admin/[DB_NAME]/scripts/CreateORDSchema.log append @[DB_HOME]/ord/admin/ordinst.sql SYSAUX SYSAUX; spool off
SET VERIFY OFF connect "SYS"/"&&sysPassword" as SYSDBA set echo on spool /u01/app/oracle/admin/racdb/scripts/CreateORDSchema.log append @/u01/app/oracle/product/11.2.0/db_1/ord/admin/ordinst.sql SYSAUX SYSAUX; spool off
SET VERIFY OFF connect "SYS"/"&&sysPassword" as SYSDBA set echo on spool [ORACLE_BASE]/admin/[DB_NAME]/scripts/CreateMultiMedia.log append @[DB_HOME]/ord/im/admin/iminst.sql; spool off
SET VERIFY OFF connect "SYS"/"&&sysPassword" as SYSDBA set echo on spool /u01/app/oracle/admin/racdb/scripts/CreateMultiMedia.log append @/u01/app/oracle/product/11.2.0/db_1/ord/im/admin/iminst.sql; spool off
SET VERIFY OFF set echo on spool [ORACLE_BASE]/admin/[DB_NAME]/scripts/CreateOLAP.log append connect "SYS"/"&&sysPassword" as SYSDBA @[DB_HOME]/olap/admin/olap.sql SYSAUX TEMP; spool off
SET VERIFY OFF set echo on spool /u01/app/oracle/admin/racdb/scripts/CreateOLAP.log append connect "SYS"/"&&sysPassword" as SYSDBA @/u01/app/oracle/product/11.2.0/db_1/olap/admin/olap.sql SYSAUX TEMP; spool off
SET VERIFY OFF connect "SYS"/"&&sysPassword" as SYSDBA set echo on spool [ORACLE_BASE]/admin/[DB_NAME]/scripts/CreateSpatial.log append @[DB_HOME]/md/admin/mdinst.sql; spool off
SET VERIFY OFF connect "SYS"/"&&sysPassword" as SYSDBA set echo on spool /u01/app/oracle/admin/racdb/scripts/CreateSpatial.log append @/u01/app/oracle/product/11.2.0/db_1/md/admin/mdinst.sql; spool off
SET VERIFY OFF connect "SYS"/"&&sysPassword" as SYSDBA set echo off spool [ORACLE_BASE]/admin/[DB_NAME]/scripts/CreateEMRepos.log append @[DB_HOME]/sysman/admin/emdrep/sql/emreposcre [DB_HOME] SYSMAN &&sysPassword TEMP ON; WHENEVER SQLERROR CONTINUE; spool off
SET VERIFY OFF connect "SYS"/"&&sysPassword" as SYSDBA set echo off spool /u01/app/oracle/admin/racdb/scripts/CreateEMRepos.log append @/u01/app/oracle/product/11.2.0/db_1/sysman/admin/emdrep/sql/emreposcre /u01/app/oracle/product/11.2.0/db_1 SYSMAN &&sysPassword TEMP ON; WHENEVER SQLERROR CONTINUE; spool off
SET VERIFY OFF connect "SYS"/"&&sysPassword" as SYSDBA set echo on spool [ORACLE_BASE]/admin/[DB_NAME]/scripts/CreateAPEX.log append @[DB_HOME]/apex/catapx.sql [PASSWORD] SYSAUX SYSAUX TEMP /i/ NONE; spool off
SET VERIFY OFF connect "SYS"/"&&sysPassword" as SYSDBA set echo on spool /u01/app/oracle/admin/racdb/scripts/CreateAPEX.log append @/u01/app/oracle/product/11.2.0/db_1/apex/catapx.sql change_on_install SYSAUX SYSAUX TEMP /i/ NONE; spool off
SET VERIFY OFF connect "SYS"/"&&sysPassword" as SYSDBA set echo on spool [ORACLE_BASE]/admin/[DB_NAME]/scripts/CreateOWB.log append @[DB_HOME]/owb/UnifiedRepos/cat_owb.sql SYSAUX TEMP; spool off
SET VERIFY OFF connect "SYS"/"&&sysPassword" as SYSDBA set echo on spool /u01/app/oracle/admin/racdb/scripts/CreateOWB.log append @/u01/app/oracle/product/11.2.0/db_1/owb/UnifiedRepos/cat_owb.sql SYSAUX TEMP; spool off
SET VERIFY OFF set echo on spool [ORACLE_BASE]/admin/[DB_NAME]/scripts/lockAccount.log append BEGIN FOR item IN ( SELECT USERNAME FROM DBA_USERS WHERE ACCOUNT_STATUS IN ('OPEN', 'LOCKED', 'EXPIRED') AND USERNAME NOT IN ('SYS','SYSTEM') ) LOOP dbms_output.put_line('Locking and Expiring: ' || item.USERNAME); execute immediate 'alter user ' || sys.dbms_assert.enquote_name( sys.dbms_assert.schema_name( item.USERNAME),false) || ' password expire account lock' ; END LOOP; END; / spool off
SET VERIFY OFF set echo on spool /u01/app/oracle/admin/racdb/scripts/lockAccount.log append BEGIN FOR item IN ( SELECT USERNAME FROM DBA_USERS WHERE ACCOUNT_STATUS IN ('OPEN', 'LOCKED', 'EXPIRED') AND USERNAME NOT IN ('SYS','SYSTEM') ) LOOP dbms_output.put_line('Locking and Expiring: ' || item.USERNAME); execute immediate 'alter user ' || sys.dbms_assert.enquote_name( sys.dbms_assert.schema_name( item.USERNAME),false) || ' password expire account lock' ; END LOOP; END; / spool off
SET VERIFY OFF connect "SYS"/"&&sysPassword" as SYSDBA set echo on spool [ORACLE_BASE]/admin/[DB_NAME]/scripts/postDBCreation.log append execute DBMS_AUTO_TASK_ADMIN.disable(); @[DB_HOME]/rdbms/admin/catbundle.sql psu apply; select 'utl_recomp_begin: ' || to_char(sysdate, 'HH:MI:SS') from dual; execute utl_recomp.recomp_serial(); select 'utl_recomp_end: ' || to_char(sysdate, 'HH:MI:SS') from dual; select group# from v$log where group# =3; select group# from v$log where group# =4; ALTER DATABASE ADD LOGFILE THREAD 2 GROUP 4 ('/dev/raw/raw17') SIZE 199M, GROUP 5 ('/dev/raw/raw18') SIZE 199M, GROUP 6 ('/dev/raw/raw19') SIZE 199M; ALTER DATABASE ENABLE PUBLIC THREAD 2; host echo cluster_database=true >>[ORACLE_BASE]/admin/[DB_NAME]/scripts/init.ora; host echo remote_listener=[SCAN_NAME]:[LISTENER_PORT]>>[ORACLE_BASE]/admin/[DB_NAME]/scripts/init.ora; connect "SYS"/"&&sysPassword" as SYSDBA set echo on create spfile='/dev/raw/raw20' FROM pfile='[ORACLE_BASE]/admin/[DB_NAME]/scripts/init.ora'; shutdown immediate; host [DB_HOME]/bin/srvctl enable database -d [DB_NAME]; host [DB_HOME]/bin/srvctl start database -d [DB_NAME]; connect "SYS"/"&&sysPassword" as SYSDBA set echo on @[DB_HOME]/rdbms/admin/utlrp.sql; spool off exit;
SET VERIFY OFF connect "SYS"/"&&sysPassword" as SYSDBA set echo on spool /u01/app/oracle/admin/racdb/scripts/postDBCreation.log append execute DBMS_AUTO_TASK_ADMIN.disable(); @/u01/app/oracle/product/11.2.0/db_1/rdbms/admin/catbundle.sql psu apply; select 'utl_recomp_begin: ' || to_char(sysdate, 'HH:MI:SS') from dual; execute utl_recomp.recomp_serial(); select 'utl_recomp_end: ' || to_char(sysdate, 'HH:MI:SS') from dual; select group# from v$log where group# =3; select group# from v$log where group# =4; ALTER DATABASE ADD LOGFILE THREAD 2 GROUP 4 ('/dev/raw/raw17') SIZE 199M, GROUP 5 ('/dev/raw/raw18') SIZE 199M, GROUP 6 ('/dev/raw/raw19') SIZE 199M; ALTER DATABASE ENABLE PUBLIC THREAD 2; host echo cluster_database=true >>/u01/app/oracle/admin/racdb/scripts/init.ora; host echo remote_listener=rac-scan:1521>>/u01/app/oracle/admin/racdb/scripts/init.ora; connect "SYS"/"&&sysPassword" as SYSDBA set echo on create spfile='/dev/raw/raw20' FROM pfile='/u01/app/oracle/admin/racdb/scripts/init.ora'; shutdown immediate; host /u01/app/oracle/product/11.2.0/db_1/bin/srvctl enable database -d racdb; host /u01/app/oracle/product/11.2.0/db_1/bin/srvctl start database -d racdb; connect "SYS"/"&&sysPassword" as SYSDBA set echo on @/u01/app/oracle/product/11.2.0/db_1/rdbms/admin/utlrp.sql; spool off exit;
db_block_size=8192 #cluster_database=true #remote_listener=[SCAN_NAME]:[LISTENER_PORT] open_cursors=300 db_domain="" db_name="[DB_NAME]" control_files=('/dev/raw/raw12','/dev/raw/raw13') compatible=11.2.0.0.0 diagnostic_dest=[ORACLE_BASE] memory_target=834666496 processes=150 audit_file_dest="[ORACLE_BASE]/admin/[DB_NAME]/adump" audit_trail=db remote_login_passwordfile=exclusive [ORACLE_SID1].instance_number=1 [ORACLE_SID2].instance_number=2 [ORACLE_SID1].thread=1 [ORACLE_SID2].thread=2 [ORACLE_SID1].undo_tablespace=UNDOTBS1 [ORACLE_SID2].undo_tablespace=UNDOTBS2 db_recovery_file_dest_size=3G db_recovery_file_dest='/FRA'
############################################################################## # Copyright (c) 1991, 2001, 2002 by Oracle Corporation ############################################################################## ########################################### # Cache and I/O ########################################### db_block_size=8192 ########################################### # Cluster Database ########################################### #cluster_database=true #remote_listener=rac-scan:1521 ########################################### # Cursors and Library Cache ########################################### open_cursors=300 ########################################### # Database Identification ########################################### db_domain="" db_name="racdb" ########################################### # File Configuration ########################################### control_files=('/dev/raw/raw12','/dev/raw/raw13') ########################################### # Miscellaneous ########################################### compatible=11.2.0.0.0 diagnostic_dest=/u01/app/oracle sga_target=3g pga_aggregate_target=1g ########################################### # Processes and Sessions ########################################### processes=150 ########################################### # Security and Auditing ########################################### audit_file_dest="/u01/app/oracle/admin/racdb/adump" audit_trail=db remote_login_passwordfile=exclusive racdb1.instance_number=1 racdb2.instance_number=2 racdb1.thread=1 racdb2.thread=2 racdb1.undo_tablespace=UNDOTBS1 racdb2.undo_tablespace=UNDOTBS2
chmod 774 racDB.sh ls -ltra | grep racDB.sh
[racdb1:/u01/app/oracle/admin/racdb/scripts]> ls -ltra | grep racDB.sh -rwxr-x---. 1 oracle oinstall 891 4월 14 10:39 racDB.sh [racdb1:/u01/app/oracle/admin/racdb/scripts]> chmod 774 racDB.sh [racdb1:/u01/app/oracle/admin/racdb/scripts]> ls -ltra | grep racDB.sh -rwxrwxr--. 1 oracle oinstall 891 4월 14 10:39 racDB.sh
chmod 770 [ORACLE_BASE]/cfgtoollogs
[root@rac1 oracle]# chmod 770 /u01/app/oracle/cfgtoollogs
B) 데이터베이스 생성
cd $ORACLE_BASE/admin/[DB_NAME]/scripts sh racDB.sh
[oracle@racdb1 ~]$ cd $ORACLE_BASE/admin/racdb/scripts [racdb1:/u01/app/oracle/admin/racdb/scripts]> sh racDB.sh You should Add this entry in the /etc/oratab: racdb:/u01/app/oracle/product/11.2.0/db_1:N SQL*Plus: Release 11.2.0.4.0 Production on Tue Apr 14 15:26:19 2020 Copyright (c) 1982, 2013, Oracle. All rights reserved. Enter new password for SYS: Enter new password for SYSTEM: Enter password for SYS: Enter password for SYS: oracle Unable to find error file. Connected to an idle instance. SQL> spool /u01/app/oracle/admin/racdb/scripts/CreateDB.log append SQL> startup nomount pfile="/u01/app/oracle/admin/racdb/scripts/init.ora"; ORACLE instance started. Total System Global Area 3206836224 bytes Fixed Size 2257520 bytes Variable Size 654314896 bytes Database Buffers 2533359616 bytes Redo Buffers 16904192 bytes SQL> CREATE DATABASE "racdb" 2 MAXINSTANCES 32 3 MAXLOGHISTORY 1 4 MAXLOGFILES 192 5 MAXLOGMEMBERS 3 6 MAXDATAFILES 1024 7 DATAFILE '/dev/raw/raw6' SIZE 1000M AUTOEXTEND OFF EXTENT MANAGEMENT LOCAL 8 SYSAUX DATAFILE '/dev/raw/raw7' SIZE 1000M AUTOEXTEND OFF 9 SMALLFILE DEFAULT TEMPORARY TABLESPACE TEMP TEMPFILE '/dev/raw/raw9' SIZE 699M AUTOEXTEND OFF 10 SMALLFILE UNDO TABLESPACE "UNDOTBS1" DATAFILE '/dev/raw/raw10' SIZE 1000M AUTOEXTEND OFF 11 CHARACTER SET KO16MSWIN949 12 NATIONAL CHARACTER SET AL16UTF16 13 LOGFILE GROUP 1 ('/dev/raw/raw14') SIZE 199M, 14 GROUP 2 ('/dev/raw/raw15') SIZE 199M, 15 GROUP 3 ('/dev/raw/raw16') SIZE 199M 16 USER SYS IDENTIFIED BY "&&sysPassword" USER SYSTEM IDENTIFIED BY "&&systemPassword"; Database created. .... << 생략 >> .... SQL> SQL> Rem ===================================================================== SQL> Rem Run component validation procedure SQL> Rem ===================================================================== SQL> SQL> EXECUTE dbms_registry_sys.validate_components; PL/SQL procedure successfully completed. SQL> SET serveroutput off SQL> SQL> SQL> Rem =========================================================================== SQL> Rem END utlrp.sql SQL> Rem =========================================================================== SQL> spool off not spooling currently SQL> exit; Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, Real Application Clusters, OLAP, Data Mining and Real Application Testing options
[ORACLE_SID]:[DB_HOME]:N
racdb1:/u01/app/oracle/product/11.2.0/db_1:N
racdb2:/u01/app/oracle/product/11.2.0/db_1:N
{}
{}