• 검색 결과가 없습니다.

네트워크 설정 변경

5. 두 번째 가상 머신의 생성 및 설정

5.1 네트워크 설정 변경

1. rac1 에서 root 사용자로 로그인한 후, # shutdown -h now 실행.

2. 호스트 시스템에서 rac1 폴더의 모든 파일을 rac2 로 복사합니다.

C:\>copy C:\vm\rac\rac1 C:\vm\rac\rac2

3. VMware Server 콘솔에서 Ctrl-O 를 눌러 두 번째 가상 머신, C:\rac\rac2\Red Hat Enterprise Linux 4.vmx 를 엽니다.

4. VMware Server console:

o o 가상 머신의 이름을 rac1 에서 rac2 로 변경합니다. rac1 탭을 마우스 오른쪽 버튼으로 클릭하고 Settings를 선택합니다.

§ Options탭을 선택합니다.

1. Virtual machine name: Virtual machine name: rac2 입력.

Start this virtual machine를 클릭하여 (rac1 이 셧다운된 상태에서) rac2 를 시작함.

o rac2 – Virtaul Machine: Create a new identifier를 클릭함.

root 사용자로 로그인한 상태에서 system-config-network를 실행하여 네트워크 설정을 변경함.

5. IP Address: 각각의 이더넷 디바이스를 더블 클릭하고 아래 표를 참고하여 변경 작업을 수행합니다.

디바이스 IP 주소 서브넷 마스크 디폴트 게이트웨이 주소

eth0 192.168.10.172 255.255.255.0 192.168.10.1

eth1 10.10.10.72 255.255.255.0 <공란으로 비워 둠>

6. MAC Address: Hardware Device탭으로 이동하여 각 이더넷 디바이스의 새로운 MAC 어드레스를 조회합니다.

7. Hostname and DNS: 아래 표를 참고하여 DNS 탭의 항목을 변경하고 Ctrl-S 를 눌러 저장합니다.

Hostname Primary DNS Secondary DNS DNS search path

rac2.mycorpdomain.com DNS IP 주소를 입력하거나 공란으로 비워 둡니다.

DNS IP 주소를 입력하거나 공란으로 비워 둡니다.

디폴트 설정을 승인하거나 공란으로 비워 둡니다.

8. 마지막으로, 각 이더넷 디바이스를 활성화합니다.

/etc/hosts 파일 수정. /etc/hosts 파일에 아래 항목을 추가합니다.

127.0.0.1 localhost

VIPCA 는 Oracle Clusterware 소프트웨어 설치 과정에서 루프백 주소를 사용하려 시도함.

[root@rac2 ~]# vi /export/home/oracle/.profile ORACLE_SID 값을 devdb2로 변경

LANG=C

export PS1="`/bin/hostname -s`-> "

export EDITOR=vi

export ORACLE_SID=devdb2 -à 변경함

export ORACLE_BASE=/u01/app/oracle

export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1

export ORA_CRS_HOME=$ORACLE_BASE/product/10.2.0/crs_1

export LD_LIBRARY_PATH=$ORACLE_HOME/lib

export

PATH=$ORACLE_HOME/bin:$ORA_CRS_HOME/bin:/bin:/usr/bin:/usr/sbin:/usr/local/bin:/

usr/X11R6/bin

umask 022

SSH를 이용한 user equivalence의 설정. Cluster Ready Services(CRS) 및 RAC 설치 과 정에서, Oracle Universal Installer(OUI)는 oracle 사용자로 (패스워드를 별도로 입력하지 않고) 모든 RAC 노드에 소프트웨어를 복사할 수 있어야 합니다. Oracle 10g에서는 rsh 대 신 ssh를 이용하여 이 작업을 수행할 수 있습니다

oracle user 에서 작업 한다.

먼저 rac1에서 아래와 같이 작업합니다

Last login: Thu Jul 26 20:01:08 2007 [root@rac1 ~]# su - oracle

rac1-> mkdir ~/.ssh rac1-> chmod 700 ~/.ssh rac1-> ssh-keygen -t rsa

Generating public/private rsa key pair.

Enter file in which to save the key (/export/home/oracle/.ssh/id_rsa):

Enter passphrase (empty for no passphrase):

Enter same passphrase again:

Your identification has been saved in /export/home/oracle/.ssh/id_rsa.

Your public key has been saved in /export/home/oracle/.ssh/id_rsa.pub.

The key fingerprint is:

53:5f:37:26:91:d8:6d:43:8c:ba:da:39:03:ba:2a:ca oracle@rac1.mycorpdomain.com rac1-> ssh-keygen -t dsa

Generating public/private dsa key pair.

Enter file in which to save the key (/export/home/oracle/.ssh/id_dsa):

Enter passphrase (empty for no passphrase):

Enter same passphrase again:

Your identification has been saved in /export/home/oracle/.ssh/id_dsa.

Your public key has been saved in /export/home/oracle/.ssh/id_dsa.pub.

The key fingerprint is:

93:73:15:37:cf:06:b1:e6:ff:00:e5:4a:70:af:a2:d7 oracle@rac1.mycorpdomain.com

다음으로 rac2에서 아래와 같이 작업합니다

Last login: Thu Jul 26 20:13:53 2007 [root@rac2 ~]# su - oracle

rac2-> mkdir ~/.ssh rac2-> chmod 700 ~/.ssh rac2-> ssh-keygen -t rsa

Generating public/private rsa key pair.

Enter file in which to save the key (/export/home/oracle/.ssh/id_rsa):

Enter passphrase (empty for no passphrase):

Enter same passphrase again:

Your identification has been saved in /export/home/oracle/.ssh/id_rsa.

Your public key has been saved in /export/home/oracle/.ssh/id_rsa.pub.

The key fingerprint is:

fa:a4:7f:a6:8e:eb:53:51:3d:fa:29:31:8d:42:42:a1 oracle@rac2.mycorpdomain.com rac2-> ssh-keygen -t dsa

Generating public/private dsa key pair.

Enter file in which to save the key (/export/home/oracle/.ssh/id_dsa):

Enter passphrase (empty for no passphrase):

Enter same passphrase again:

Your identification has been saved in /export/home/oracle/.ssh/id_dsa.

Your public key has been saved in /export/home/oracle/.ssh/id_dsa.pub.

The key fingerprint is:

71:2f:2d:e3:1c:4d:cc:4c:00:cd:25:95:28:f8:c9:48 oracle@rac2.mycorpdomain.com

rac1에서 아래와 같이 작업합니다

rac1-> cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys rac1-> cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys

rac1-> ssh rac2 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys The authenticity of host 'rac2 (192.168.10.172)' can't be established.

RSA key fingerprint is be:e5:a9:27:2d:5b:e5:48:be:10:f4:16:b6:a4:1a:3d.

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added 'rac2,192.168.10.172' (RSA) to the list of known hosts.

oracle@rac2's password: oracle 엔터

rac1-> ssh rac2 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys oracle@rac2's password: oracle 엔터

rac1-> scp ~/.ssh/authorized_keys rac2:~/.ssh/authorized_keys oracle@rac2's password: oracle 엔터

authorized_keys 100% 1712 1.7KB/s 00:00

rac1->

사전 test 해 봅니다.

각 노드의 연결을 테스트합니다. 아래 명령을 두 번째 실행했을 때 패스워드를 묻는 프롬 프트가 뜨지 않음을 확인

실전>

rac1-> ssh rac1 date

The authenticity of host 'rac1 (192.168.10.171)' can't be established.

RSA key fingerprint is 50:f8:cb:b0:12:12:a2:7b:cb:54:4f:d4:d0:89:15:6d.

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added 'rac1,192.168.10.171' (RSA) to the list of known hosts.

Thu Aug 2 19:23:36 KST 2007

rac1-> ssh rac2 date

Thu Aug 2 19:24:13 KST 2007

rac1-> ssh rac1-priv date

The authenticity of host 'rac1-priv (10.10.10.71)' can't be established.

RSA key fingerprint is 50:f8:cb:b0:12:12:a2:7b:cb:54:4f:d4:d0:89:15:6d.

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added 'rac1-priv,10.10.10.71' (RSA) to the list of known hosts.

Thu Aug 2 19:25:05 KST 2007

rac1-> ssh rac2-priv date

The authenticity of host 'rac2-priv (10.10.10.72)' can't be established.

RSA key fingerprint is 50:f8:cb:b0:12:12:a2:7b:cb:54:4f:d4:d0:89:15:6d.

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added 'rac2-priv,10.10.10.72' (RSA) to the list of known hosts.

Thu Aug 2 19:24:31 KST 2007

rac1-> ssh rac1.mycorpdomain.com date

The authenticity of host 'rac1.mycorpdomain.com (192.168.10.171)' can't be established.

RSA key fingerprint is 50:f8:cb:b0:12:12:a2:7b:cb:54:4f:d4:d0:89:15:6d.

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added 'rac1.mycorpdomain.com' (RSA) to the list of known hosts.

Thu Aug 2 19:25:26 KST 2007

rac1-> ssh rac2.mycorpdomain.com date

The authenticity of host 'rac2.mycorpdomain.com (192.168.10.172)' can't be established.

RSA key fingerprint is 50:f8:cb:b0:12:12:a2:7b:cb:54:4f:d4:d0:89:15:6d.

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added 'rac2.mycorpdomain.com' (RSA) to the list of known hosts.

Thu Aug 2 19:24:48 KST 2007

rac1-> ssh rac1-priv.mycorpdomain.com date

The authenticity of host 'rac1-priv.mycorpdomain.com (10.10.10.71)' can't be established.

RSA key fingerprint is 50:f8:cb:b0:12:12:a2:7b:cb:54:4f:d4:d0:89:15:6d.

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added 'rac1-priv.mycorpdomain.com' (RSA) to the list of known hosts.

Thu Aug 2 19:25:42 KST 2007

rac1-> ssh rac2-priv.mycorpdomain.com date

The authenticity of host 'rac2-priv.mycorpdomain.com (10.10.10.72)' can't be established.

RSA key fingerprint is 50:f8:cb:b0:12:12:a2:7b:cb:54:4f:d4:d0:89:15:6d.

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added 'rac2-priv.mycorpdomain.com' (RSA) to the list of known hosts.

Thu Aug 2 19:25:01 KST 2007

rac1->

rac1-> 패스워드 묻는 문구 안나옴을 확인 합니다(정상 확인)

다시 실행(test) 해 본다.

rac1-> ssh rac1 date

Mon Aug 6 14:55:24 KST 2007 rac1-> ssh rac2 date

Mon Aug 6 14:55:19 KST 2007 rac1-> ssh rac1-priv date Mon Aug 6 14:55:35 KST 2007 rac1-> ssh rac2-priv date Mon Aug 6 14:55:30 KST 2007

rac1-> ssh rac1.mycorpdomain.com date Mon Aug 6 14:55:47 KST 2007

rac1-> ssh rac2.mycorpdomain.com date

Mon Aug 6 14:55:41 KST 2007

rac1-> ssh rac1-priv.mycorpdomain.com date Mon Aug 6 14:55:59 KST 2007

rac1-> ssh rac2-priv.mycorpdomain.com date Mon Aug 6 14:55:52 KST 2007

양쪽 load 에 설정 (rac1, rac2)

관련 문서