1. root로 접속 후 ip확인한다.
ifconfig
[root@rac1 ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0C:29:2F:2A:1B
inet addr:192.168.27.136 Bcast:192.168.27.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe2f:2a1b/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:213 errors:0 dropped:0 overruns:0 frame:0
TX packets:105 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:24927 (24.3 KiB) TX bytes:9698 (9.4 KiB)
Interrupt:5 Base address:0x2400
eth1 Link encap:Ethernet HWaddr 00:0C:29:2F:2A:25
inet addr:192.168.153.132 Bcast:192.168.153.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe2f:2a25/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:112 errors:0 dropped:0 overruns:0 frame:0
TX packets:9 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:11482 (11.2 KiB) TX bytes:490 (490.0 b)
Interrupt:9 Base address:0x2480
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:16436 Metric:1
RX packets:1550 errors:0 dropped:0 overruns:0 frame:0
TX packets:1550 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1787698 (1.7 MiB) TX bytes:1787698 (1.7 MiB)
게이트웨이 확인
[root@rac1 ~]# netstat -nr
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.153.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
192.168.27.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1
0.0.0.0 192.168.27.2 0.0.0.0 UG 0 0 0 eth0
리눅스 내에서 neat
각 ip설정 후 네트워크 적용을 위해서 다시 시작한다.
[root@rac1 ~]# /etc/init.d/network restart
인터페이스 eth0 (을)를 종료함: [ 확인 ]
인터페이스 eth1 (을)를 종료함: [ 확인 ]
loopback 인터페이스를 종료함: [ 확인 ]
네트워크 매개 변수를 설정하고 있습니다: [ 확인 ]
loopback 인터페이스 활성화중 입니다: [ 확인 ]
eth0 인터페이스 활성화중 입니다: [ 확인 ]
eth1 인터페이스 활성화중 입니다: [ 확인 ]
데이터 전송을 위한 ping 테스트
[root@rac1 ~]# ping 168.126.63.1
PING 168.126.63.1 (168.126.63.1) 56(84) bytes of data.
--- 168.126.63.1 ping statistics ---
14 packets transmitted, 0 received, 100% packet loss, time 12997ms
필요없는 서비스를 꺼준다.
[root@rac1 ~]# chkconfig --level 123456 xinetd off
[root@rac1 ~]# chkconfig --level 123456 sendmail off
[root@rac1 ~]# chkconfig --level 123456 cups off
[root@rac1 ~]# chkconfig --level 123456 cups-config-daemon off
[root@rac1 ~]# chkconfig --level 123456 smartd off
[root@rac1 ~]# chkconfig --level 123456 isdn off
[root@rac1 ~]# chkconfig --level 123456 pcmcia off
[root@rac1 ~]# chkconfig --level 123456 iptables off
호스트파일 수정
[root@rac1 ~]# vi /etv/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
#public
192.168.27.136 rac1
192.168.27.137 rac2
#private
192.168.153.132 rac1-priv
192.168.153.133 rac2-priv
#vip
192.168.27.33 rac1-vip
192.168.27.34 rac2-vip
퍼블릭 공용으로 관리자가 들어가서 작업시 사용하는 아이피
프라이빗 노드끼리만 통신하는 아이피
브이아이피 유저들이 들어와서 사용하는 아이피
커널값 수정
sysctl.conf 파일 맨 마지막에 커널 설정값을 추가해준다.
[root@rac1 ~]# vi /etc/sysctl.conf
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 4194304
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 262144
최대 프로세스와 파일개수 제한에 대한 설정파일
[root@rac1 ~]# vi /etc/security/limits.conf
# - maxsyslogins - max number of logins on the system
# - priority - the priority to run user process with
# - locks - max number of file locks the user can hold
# - sigpending - max number of pending signals
# - msgqueue - max memory used by POSIX message queues (bytes)
#
#<domain> <type> <item> <value>
#
#* soft core 0
#* hard rss 10000
#@student hard nproc 20
#@faculty soft nproc 20
#@faculty hard nproc 50
#ftp hard nproc 0
#@student - maxlogins 4
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
# End of file
참고 사이트 : http://lunatine.net/limits-conf-nofile-big-value-effect/
사용자 인증, 로그인 관련 파일
[root@rac1 ~]# vi /etc/pam.d/login
session required pam_limits.so
참고 사이트 : http://bban2.tistory.com/223
맨 아래줄에 추가
[root@rac1 ~]# vi /etc/modprobe.conf
options hangcheck-timer hangcheck_tick=30 hangcheck_margin=180
커널기반타이머를 사용하여 시스템 작업 스케줄러에 발생하는 딜레이를 정기적으로 점검하는 방식으로 시스템 상태 확인
[root@rac1 ~]# modprobe -v hangcheck-timer
insmod /lib/modules/2.6.9-34.EL/kernel/drivers/char/hangcheck-timer.ko hangcheck_tick=30 hangcheck_margin=180
맨 아래줄에 추가한다.
[root@rac1 ~]# vi /etc/rc.local
/sbin/modprobe hangcheck-timer
rdate -s 203.248.240.140
요구 rpm 확인 후 만약 없으면 설치를 해준다.
[root@rac1 ~]# rpm –qa binutils-2.15.92.0.2-21 \
> compat-db-4.1.25-9 \
> compat-gcc-32-3.2.3-47.3 \
> compat-gcc-32-c++-3.2.3-47.3 \
> compat-libstdc++-33-3.2.3-47.3 \
> compat-libgcc-296-2.96-132.7.2 \
> control-center-2.8.0-12.rhel4.5 \
> cpp-3.4.6-3 \
> gcc-3.4.6-3 \
> gcc-c++-3.4.6-3 \
> glibc-2.3.4-2.25 \
> glibc-common-2.3.4-2.25 \
> glibc-devel-2.3.4-2.25 \
> glibc-headers-2.3.4-2.25 \
> glibc-kernheaders-2.4-9.1.98.EL \
> gnome-libs-1.4.1.2.90-44.1 \
> libaio-0.3.105-2 \
> libstdc++-3.4.6-3 \
> libstdc++-devel-3.4.6-3 \
> make-3.80-6.EL4 \
> openmotif-2.2.3-10.RHEL4.5 \
> openmotif21-2.1.30-11.RHEL4.6 \
> pdksh-5.2.14-30.3 \
> setarch-1.6-1 \
> sysstat-5.0.5-11.rhel4 \
> xscreensaver-4.18-5.rhel4.11
노드 1 셋팅
그룹과 사용자를 추가해주고 비밀번호를 변경해준다.
[root@rac1 ~]# groupadd -g 5000 dba
[root@rac1 ~]# useradd -g dba oracle
[root@rac1 ~]# passwd oracle
Changing password for user oracle.
New UNIX password:
BAD PASSWORD: it is based on a dictionary word
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
마지막에 경로를 추가해준다.
[root@rac1 ~]# vi .bash_profile
PATH=$PATH:$HOME/bin:/home/oracle/product/10g/crs/bin
오라클계정으로 변경한다.
오라클계정의 bash_profile의 내용을 추가해준다.
[root@rac1 ~]# su - oracle
[oracle@rac1 ~]$ vi .bash_profile
export EDITOR=vi
export LD_ASSUME_KERNEL=2.4.19
export ORACLE_BASE=/home/oracle
export ORA_CRS_HOME=$ORACLE_BASE/product/10g/crs
export ORACLE_HOME=$ORACLE_BASE/product/10g/db
export ORACLE_SID=rac1
export LANG=ko_KR.eucKR
export ORACLE_TERM=xterm
export NLS_LANG=AMERICAN_AMERICA.KO16KSC5601
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib
export PATH=$PATH:$ORACLE_HOME/bin:/$ORA_CRS_HOME/bin
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
오라클계정에서 빠져나온다.
[oracle@rac1 ~]$ exit
logout
현재디스크를 확인한다.
맨 아래에 추가한 디스크의 장치명이 보인다.
3개 디스크를 각각 파티션해준다.
/dev/sdb, /dev/sdc, /dev/sdd
[root@rac1 ~]# fdisk -l
Disk /dev/sda: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 650 5116702+ 83 Linux
/dev/sda3 651 841 1534207+ 82 Linux swap
/dev/sda4 842 2610 14209492+ 5 Extended
/dev/sda5 842 968 1020096 83 Linux
/dev/sda6 969 2610 13189333+ 83 Linux
Disk /dev/sdb: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
Disk /dev/sdc: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
Disk /dev/sdd: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
초기에 추가한 디스크를 파티션해준다.
[root@rac1 ~]# fdisk /dev/sdb
The number of cylinders for this disk is set to 1305.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-1305, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-1305, default 1305):
Using default value 1305
Command (m for help): t
Selected partition 1
Hex code (type L to list codes): 8e
Changed system type of partition 1 to 8e (Linux LVM)
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
n : 새로생성
p : 파티션
1 : 주 파티션 번호
시작실린더번호 : 엔터(자동으로 잡아줌)
용량지정 : 엔터(남은용량 전부 할당)
t : 타입지정
8e : Linux LVM용으로 파티션을 생성
w : 새로 생성한 파티션 저장
w 전에 p를 입력하면 파티션 옵션을 준 것을 볼 수 있다. 그 다음에 w로 저장해도 됨
같은 방법으로
[root@rac1 ~]# fdisk /dev/sdc
[root@rac1 ~]# fdisk /dev/sdd
해준다.
안해도 되는 작업이지만 내가 파티션을 잘 줬는지 궁금하다면
아래에 장치명 뒤에 숫자 1이 있는 것을 볼 수 있다.
그러면 파티션이 잘 된 것이다.
[root@rac1 ~]# fdisk -l
Disk /dev/sda: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 650 5116702+ 83 Linux
/dev/sda3 651 841 1534207+ 82 Linux swap
/dev/sda4 842 2610 14209492+ 5 Extended
/dev/sda5 842 968 1020096 83 Linux
/dev/sda6 969 2610 13189333+ 83 Linux
Disk /dev/sdb: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 1305 10482381 8e Linux LVM
Disk /dev/sdc: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdc1 1 1305 10482381 8e Linux LVM
Disk /dev/sdd: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdd1 1 1305 10482381 8e Linux LVM
물리적 볼륨을 생성한다.
[root@rac1 ~]# pvcreate /dev/sdb1 /dev/sdc1 /dev/sdd1
Physical volume "/dev/sdb1" successfully created
Physical volume "/dev/sdc1" successfully created
Physical volume "/dev/sdd1" successfully created
물리적 볼륨 생성을 확인한다.
[root@rac1 ~]# pvdisplay
--- NEW Physical volume ---
PV Name /dev/sdb1
VG Name
PV Size 10.00 GB
Allocatable NO
PE Size (KByte) 0
Total PE 0
Free PE 0
Allocated PE 0
PV UUID IjWso0-vuHh-7hDc-3SkK-d3G1-D7Tz-v4o0Nc
--- NEW Physical volume ---
PV Name /dev/sdc1
VG Name
PV Size 10.00 GB
Allocatable NO
PE Size (KByte) 0
Total PE 0
Free PE 0
Allocated PE 0
PV UUID xhwaaF-1hWE-ATYR-o12h-G4PC-nSMi-CTcXC6
--- NEW Physical volume ---
PV Name /dev/sdd1
VG Name
PV Size 10.00 GB
Allocatable NO
PE Size (KByte) 0
Total PE 0
Free PE 0
Allocated PE 0
PV UUID tHxpOM-Mg7A-otnU-baBg-SXpq-YMBK-Kx4LSv
볼륨그룹을 생성한다.
세개의 물리적 볼륨을 합쳐서 rac 하나의 물리적 그룹 하나로 만든다.
[root@rac1 ~]# vgcreate rac /dev/sdb1 /dev/sdc1 /dev/sdd1
Volume group "rac" successfully created
볼륨그룹을 확인한다.
[root@rac1 ~]# vgdisplay
--- Volume group ---
VG Name rac
System ID
Format lvm2
Metadata Areas 3
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 3
Act PV 3
VG Size 29.99 GB
PE Size 4.00 MB
Total PE 7677
Alloc PE / Size 0 / 0
Free PE / Size 7677 / 29.99 GB
VG UUID S4eHQk-1KOa-DLM9-Bj6F-8DNX-5qf0-p3Oc7a
논리적 그룹을 생성한다.
볼륨그룹을 나누어 논리적 그룹으로 나누어준다.
나중에 oracle에서 사용될 파일들을 생성해주는 과정이다.
[root@rac1 ~]# lvcreate --name ocr --size 200 rac
Logical volume "ocr" created
[root@rac1 ~]# lvcreate --name vote --size 50 rac
Rounding up size to full physical extent 52.00 MB
Logical volume "vote" created
[root@rac1 ~]# lvcreate --name system --size 600 rac
Logical volume "system" created
[root@rac1 ~]# lvcreate --name sysaux --size 1200 rac
Logical volume "sysaux" created
[root@rac1 ~]# lvcreate --name spfile --size 50 rac
Rounding up size to full physical extent 52.00 MB
Logical volume "spfile" created
[root@rac1 ~]# lvcreate --name passwd --size 50 rac
Rounding up size to full physical extent 52.00 MB
Logical volume "passwd" created
[root@rac1 ~]# lvcreate --name control1 --size 200 rac
Logical volume "control1" created
[root@rac1 ~]# lvcreate --name control2 --size 200 rac
Logical volume "control2" created
[root@rac1 ~]# lvcreate --name control3 --size 200 rac
Logical volume "control3" created
[root@rac1 ~]# lvcreate --name redo1_1 --size 200 rac
Logical volume "redo1_1" created
[root@rac1 ~]# lvcreate --name redo1_2 --size 200 rac
Logical volume "redo1_2" created
[root@rac1 ~]# lvcreate --name redo2_1 --size 200 rac
Logical volume "redo2_1" created
[root@rac1 ~]# lvcreate --name redo2_2 --size 200 rac
Logical volume "redo2_2" created
[root@rac1 ~]# lvcreate --name temp --size 600 rac
Logical volume "temp" created
[root@rac1 ~]# lvcreate --name undo1 --size 600 rac
Logical volume "undo1" created
[root@rac1 ~]# lvcreate --name undo2 --size 600 rac
Logical volume "undo2" created
[root@rac1 ~]# lvcreate --name data --size 1000 rac
Logical volume "data" created
[root@rac1 ~]# lvcreate --name users --size 250 rac
Rounding up size to full physical extent 252.00 MB
Logical volume "users" created
[root@rac1 ~]# lvcreate --name example --size 200 rac
Logical volume "example" created
논리적 그룹으로 나누어 준 것을 lvscan으로 확인한다.
[root@rac1 ~]# lvscan
ACTIVE '/dev/rac/ocr' [200.00 MB] inherit
ACTIVE '/dev/rac/vote' [52.00 MB] inherit
ACTIVE '/dev/rac/system' [600.00 MB] inherit
ACTIVE '/dev/rac/sysaux' [1.17 GB] inherit
ACTIVE '/dev/rac/spfile' [52.00 MB] inherit
ACTIVE '/dev/rac/passwd' [52.00 MB] inherit
ACTIVE '/dev/rac/control1' [200.00 MB] inherit
ACTIVE '/dev/rac/control2' [200.00 MB] inherit
ACTIVE '/dev/rac/control3' [200.00 MB] inherit
ACTIVE '/dev/rac/redo1_1' [200.00 MB] inherit
ACTIVE '/dev/rac/redo1_2' [200.00 MB] inherit
ACTIVE '/dev/rac/redo2_1' [200.00 MB] inherit
ACTIVE '/dev/rac/redo2_2' [200.00 MB] inherit
ACTIVE '/dev/rac/temp' [600.00 MB] inherit
ACTIVE '/dev/rac/undo1' [600.00 MB] inherit
ACTIVE '/dev/rac/undo2' [600.00 MB] inherit
ACTIVE '/dev/rac/data' [1000.00 MB] inherit
ACTIVE '/dev/rac/users' [252.00 MB] inherit
ACTIVE '/dev/rac/example' [200.00 MB] inherit
논리적 그룹으로 나눈 것과 장치명을 파일에 입력해준다.
[root@rac1 ~]# vi /etc/sysconfig/rawdevices
/dev/raw/raw1 /dev/rac/ocr
/dev/raw/raw2 /dev/rac/vote
/dev/raw/raw3 /dev/rac/system
/dev/raw/raw4 /dev/rac/sysaux
/dev/raw/raw5 /dev/rac/spfile
/dev/raw/raw6 /dev/rac/passwd
/dev/raw/raw7 /dev/rac/control1
/dev/raw/raw8 /dev/rac/control2
/dev/raw/raw9 /dev/rac/control3
/dev/raw/raw10 /dev/rac/redo1_1
/dev/raw/raw11 /dev/rac/redo1_2
/dev/raw/raw12 /dev/rac/redo2_1
/dev/raw/raw13 /dev/rac/redo2_2
/dev/raw/raw14 /dev/rac/data
/dev/raw/raw15 /dev/rac/users
/dev/raw/raw16 /dev/rac/example
/dev/raw/raw17 /dev/rac/undo1
/dev/raw/raw18 /dev/rac/undo2
/dev/raw/raw19 /dev/rac/temp
rawdevices를 새로 시작해준다.
[root@rac1 ~]# /etc/init.d/rawdevices restart
Assigning devices:
/dev/raw/raw1 --> /dev/rac/ocr
/dev/raw/raw1: bound to major 253, minor 0
/dev/raw/raw2 --> /dev/rac/vote
/dev/raw/raw2: bound to major 253, minor 1
/dev/raw/raw3 --> /dev/rac/system
/dev/raw/raw3: bound to major 253, minor 2
/dev/raw/raw4 --> /dev/rac/sysaux
/dev/raw/raw4: bound to major 253, minor 3
/dev/raw/raw5 --> /dev/rac/spfile
/dev/raw/raw5: bound to major 253, minor 4
/dev/raw/raw6 --> /dev/rac/passwd
/dev/raw/raw6: bound to major 253, minor 5
/dev/raw/raw7 --> /dev/rac/control1
/dev/raw/raw7: bound to major 253, minor 6
/dev/raw/raw8 --> /dev/rac/control2
/dev/raw/raw8: bound to major 253, minor 7
/dev/raw/raw9 --> /dev/rac/control3
/dev/raw/raw9: bound to major 253, minor 8
/dev/raw/raw10 --> /dev/rac/redo1_1
/dev/raw/raw10: bound to major 253, minor 9
/dev/raw/raw11 --> /dev/rac/redo1_2
/dev/raw/raw11: bound to major 253, minor 10
/dev/raw/raw12 --> /dev/rac/redo2_1
/dev/raw/raw12: bound to major 253, minor 11
/dev/raw/raw13 --> /dev/rac/redo2_2
/dev/raw/raw13: bound to major 253, minor 12
/dev/raw/raw14 --> /dev/rac/data
/dev/raw/raw14: bound to major 253, minor 16
/dev/raw/raw15 --> /dev/rac/users
/dev/raw/raw15: bound to major 253, minor 17
/dev/raw/raw16 --> /dev/rac/example
/dev/raw/raw16: bound to major 253, minor 18
/dev/raw/raw17 --> /dev/rac/undo1
/dev/raw/raw17: bound to major 253, minor 14
/dev/raw/raw18 --> /dev/rac/undo2
/dev/raw/raw18: bound to major 253, minor 15
/dev/raw/raw19 --> /dev/rac/temp
/dev/raw/raw19: bound to major 253, minor 13
done
rawdevices 퍼미션 설정을 위해서 113번째 줄 내용을 변경해준다.
[root@rac1 ~]# vi /etc/udev/permissions.d/50-udev.permissions
# raw devices
ram*:root:disk:0660
#raw/*:root:disk:0660
위에 줄을 주석처리하고
raw/*:oracle:dba:0660
oracle:dba으로 수정해준다.
퍼미션을 설정한 후 적용하기 위해서 다시 rawdevices를 재실행해준다.
[root@rac1 ~]# /etc/init.d/rawdevices restart
Assigning devices:
/dev/raw/raw1 --> /dev/rac/ocr
/dev/raw/raw1: bound to major 253, minor 0
/dev/raw/raw2 --> /dev/rac/vote
/dev/raw/raw2: bound to major 253, minor 1
/dev/raw/raw3 --> /dev/rac/system
/dev/raw/raw3: bound to major 253, minor 2
/dev/raw/raw4 --> /dev/rac/sysaux
/dev/raw/raw4: bound to major 253, minor 3
/dev/raw/raw5 --> /dev/rac/spfile
/dev/raw/raw5: bound to major 253, minor 4
/dev/raw/raw6 --> /dev/rac/passwd
/dev/raw/raw6: bound to major 253, minor 5
/dev/raw/raw7 --> /dev/rac/control1
/dev/raw/raw7: bound to major 253, minor 6
/dev/raw/raw8 --> /dev/rac/control2
/dev/raw/raw8: bound to major 253, minor 7
/dev/raw/raw9 --> /dev/rac/control3
/dev/raw/raw9: bound to major 253, minor 8
/dev/raw/raw10 --> /dev/rac/redo1_1
/dev/raw/raw10: bound to major 253, minor 9
/dev/raw/raw11 --> /dev/rac/redo1_2
/dev/raw/raw11: bound to major 253, minor 10
/dev/raw/raw12 --> /dev/rac/redo2_1
/dev/raw/raw12: bound to major 253, minor 11
/dev/raw/raw13 --> /dev/rac/redo2_2
/dev/raw/raw13: bound to major 253, minor 12
/dev/raw/raw14 --> /dev/rac/data
/dev/raw/raw14: bound to major 253, minor 16
/dev/raw/raw15 --> /dev/rac/users
/dev/raw/raw15: bound to major 253, minor 17
/dev/raw/raw16 --> /dev/rac/example
/dev/raw/raw16: bound to major 253, minor 18
/dev/raw/raw17 --> /dev/rac/undo1
/dev/raw/raw17: bound to major 253, minor 14
/dev/raw/raw18 --> /dev/rac/undo2
/dev/raw/raw18: bound to major 253, minor 15
/dev/raw/raw19 --> /dev/rac/temp
/dev/raw/raw19: bound to major 253, minor 13
done
권한이 변경되었는지 확인을 해준다.
oracle dba로 변경되었다.
[root@rac1 ~]# ls -l /dev/raw
합계 0
crw-rw---- 1 oracle dba 162, 1 9월 19 16:26 raw1
crw-rw---- 1 oracle dba 162, 10 9월 19 16:26 raw10
crw-rw---- 1 oracle dba 162, 11 9월 19 16:26 raw11
crw-rw---- 1 oracle dba 162, 12 9월 19 16:26 raw12
crw-rw---- 1 oracle dba 162, 13 9월 19 16:26 raw13
crw-rw---- 1 oracle dba 162, 14 9월 19 16:26 raw14
crw-rw---- 1 oracle dba 162, 15 9월 19 16:26 raw15
crw-rw---- 1 oracle dba 162, 16 9월 19 16:26 raw16
crw-rw---- 1 oracle dba 162, 17 9월 19 16:26 raw17
crw-rw---- 1 oracle dba 162, 18 9월 19 16:26 raw18
crw-rw---- 1 oracle dba 162, 19 9월 19 16:26 raw19
crw-rw---- 1 oracle dba 162, 2 9월 19 16:26 raw2
crw-rw---- 1 oracle dba 162, 3 9월 19 16:26 raw3
crw-rw---- 1 oracle dba 162, 4 9월 19 16:26 raw4
crw-rw---- 1 oracle dba 162, 5 9월 19 16:26 raw5
crw-rw---- 1 oracle dba 162, 6 9월 19 16:26 raw6
crw-rw---- 1 oracle dba 162, 7 9월 19 16:26 raw7
crw-rw---- 1 oracle dba 162, 8 9월 19 16:26 raw8
crw-rw---- 1 oracle dba 162, 9 9월 19 16:26 raw9
노드1 세팅이 완료되었다.
노드1 리눅스를 init0으로 완전히 종료하고 난 다음
노드2를 세팅해준다.
rac2 폴더를 만든다.
rac1이 설치 된 폴더에 들어가서 ra1.vmdk, rac1.vmx를 복사한 후 붙여넣기를 해준다.
vmware의 상단메뉴 file-open 클릭해서 rac1.vmx 파일을 오픈한다.
devices 정보 위에 Edit virtual machine settings를 클릭한 후
options 탭을 클릭한다.
오른쪽에 있는 virtual machine name을 rac2로 고친다.
rac2 폴더 안에 있는 rac1.vmx 파일을 열어서 이름을 수정해준다.
displayName = "rac2"
(이건 위 작업을 했으면 변경되어 있을 것이다.
귀찮으면 그냥 vmx 파일을 열어서 1을 이 세 줄만 끝에 숫자를 2로 변경해주면 된다.)
nvram = "rac2.nvram"
extendedConfigFile = "rac2.vmxf"
1을 2로 변경해주고 저장해준다.
power on 그리고 rac2를 실행한다.
그럼 옮길 건지 I moved it 복사할 건지 i copied it 물어본다.
우리는 I copied it을 선택한다.
리눅스 화면 중 파란색 배경의 하드웨어 설정창이 뜨면 아무키나 누른다.
1 설정삭제
2 설정삭제
3 설정-동적 ip 자동할당 스페이스바(별표)로 확인
아래 화살표로 이동 확인
4 설정-동적 ip 자동할당 스페이스바(별표)로 확인
아래 화살표로 이동 확인
노드2에 root로 접속한다.
neat를 실행해서 네트워크 주소를 설정해준다.
노드1에서 해줬던 /etc/hosts에 있는 ip를 정보를 기준으로 변경해준다.
[root@rac1 ~]# neat
eth0 더블클릭 - 정적으로 설정된 ip주소 클릭
주소
서브넷마스크
기본게이트웨이주소 입력
eth1 더블클릭 - 정적으로 설정된 ip주소 클릭
주2
서브넷마스크 입력
상단의 탭 dns에서
호스트명 rac2로 변경
기본 dns : 168.126.63.1
[root@rac1 ~]# vi /home/oracle/.bash_profile
export ORACLE_SID=rac2 로 숫자를 변경해준다.
네트워크를 재시작 해준다.
[root@rac1 ~]# /etc/init.d/network restart
패킷을 보낼 수 있는지 확인한다.
[root@rac1 ~]# ping 168.126.63.1
ctrl + c 해서 보낸 것을 확인한다??
이거 안되도 상관이 없다.
/etc/hosts에 값을 모두 입력한 다음에 실행하면 정상적으로 되는듯하다.
이건 확인해볼 것 설치하는데 그리 중요하지 않은거같은데;;;
[root@rac1 ~]# vi /etc/sysconfig/network
HOSTNAME=rac2 로 변경을 해준다.
종료하고 노드1, 노드2 모두 oracle 계정으로 로그인함
어떤 건 노드1,2에 설치하든 상관없는데 스크립트 실행이라던가
특별히 노드1에서만 하는 작업이 있기때문에 신경써서 작업을 하자.
노드1, 노드2 공통작업
노드1
ssh-keygen -t rsa
ssh-keygen -t dsa
공통적으로 두 작업 다음에는 모두 엔터를 세번 입력하면 된다.
[oracle@rac1 ~]$ mkdir .ssh
[oracle@rac1 ~]$ chmod 700 .ssh
[oracle@rac1 ~]$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/oracle/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
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:
15:f8:26:ac:48:e3:4d:13:0a:eb:40:a3:99:03:8a:79 oracle@rac1
[oracle@rac1 ~]$ ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/home/oracle/.ssh/id_dsa): Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/oracle/.ssh/id_dsa.
Your public key has been saved in /home/oracle/.ssh/id_dsa.pub.
The key fingerprint is:
e0:81:3b:79:90:cb:3c:3b:36:ad:2c:4c:1f:8f:39:7c oracle@rac1
노드2
[oracle@rac2 ~]$ mkdir .ssh
[oracle@rac2 ~]$ chmod 700 .ssh
[oracle@rac2 ~]$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/oracle/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
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:
f8:8d:5a:ed:ce:51:fa:4a:15:11:4d:2c:13:71:40:bf oracle@rac2
[oracle@rac2 ~]$ ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/home/oracle/.ssh/id_dsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/oracle/.ssh/id_dsa.
Your public key has been saved in /home/oracle/.ssh/id_dsa.pub.
The key fingerprint is:
57:72:14:f3:42:a0:d1:76:c7:ce:2e:dc:dd:19:d3:03 oracle@rac2
주의!! 노드1 에서만 실행
질문이 나오면 yes를 입력하고 rac2의 oracle 비밀번호를 입력해주면 된다.
[oracle@rac1 ~]$ cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
[oracle@rac1 ~]$ cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
[oracle@rac1 ~]$ ssh rac2 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
The authenticity of host 'rac2 (192.168.27.137)' can't be established.
RSA key fingerprint is a0:af:a0:3f:ea:f8:5a:f7:87:81:6f:5b:4c:84:c6:88.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'rac2,192.168.27.137' (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:
authorized_keys 100% 1644 1.6KB/s 00:00
노드1, 노드2 모두 실행
ssh 디렉토리에 가서 권한을 부여한다.
나는 /home/oracle에 .ssh를 만들어줬다.
[oracle@rac1 ~]$ cd .ssh
[oracle@rac1 .ssh]$ ls
authorized_keys id_dsa id_dsa.pub id_rsa id_rsa.pub known_hosts
[oracle@rac1 .ssh]$ pwd
/home/oracle/.ssh
[oracle@rac1 .ssh]$ chmod 600 authorized_keys