1. Trang chủ
  2. » Công Nghệ Thông Tin

IT training oracle10g real RH4 vmware centos

114 31 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 114
Dung lượng 10,83 MB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

Setijo Agus setijo@gmail.com Page 30 of 1142.Setup VMWare... Type XXXXX-XXXXX-XXXXX-XXXXX or 'Enter' to cancel: 43M3M 92TPJ-YDG4U-2A317-Starting VMware services: Virtual machine monito

Trang 2

Setijo Agus (setijo@gmail.com) Page 2 of 114

Trang 4

Setijo Agus (setijo@gmail.com) Page 4 of 114

Trang 6

Setijo Agus (setijo@gmail.com) Page 6 of 114

Trang 7

ORACLE 10G RAC ON LINUX USING VMWARE SERVER

1 Setup Computer Host

2 Setup Vmware Software

3 Setup Vmware Machine

4 Setup O/S Vmware Machine

5 Setup CRS

6 Setup Database

7 Create Database dengan DBCA

8 TAF

Trang 8

Setijo Agus (setijo@gmail.com) Page 8 of 114

1.Setup

Computer

Host

Trang 9

1 Setup komputer Host

a Hardware yang dibutuhkan

Trang 10

Setijo Agus (setijo@gmail.com) Page 10 of 114

Trang 12

Setijo Agus (setijo@gmail.com) Page 12 of 114

Trang 14

Setijo Agus (setijo@gmail.com) Page 14 of 114

Trang 16

Setijo Agus (setijo@gmail.com) Page 16 of 114

Trang 18

Setijo Agus (setijo@gmail.com) Page 18 of 114

Trang 20

Setijo Agus (setijo@gmail.com) Page 20 of 114

Trang 22

Setijo Agus (setijo@gmail.com) Page 22 of 114

Trang 24

Setijo Agus (setijo@gmail.com) Page 24 of 114

Trang 26

Setijo Agus (setijo@gmail.com) Page 26 of 114

Trang 28

Setijo Agus (setijo@gmail.com) Page 28 of 114

Trang 29

e Mematikan services Linux

[root@test ~]# chkconfig cups off

[root@test ~]# chkconfig cups-config-daemon off

[root@test ~]# chkconfig isdn off

[root@test ~]# chkconfig lm_sensors off

[root@test ~]# chkconfig pcmcia off

[root@test ~]# chkconfig sendmail off

[root@test ~]# chkconfig smartd off

Trang 30

Setijo Agus (setijo@gmail.com) Page 30 of 114

2.Setup

VMWare

Trang 31

Making sure services for VMware Server are stopped.

Stopping VMware services:

Virtual machine monitor [ OK ]

You must read and accept the End User License Agreement to continue Press enter to display it.

VMWARE MASTER END USER LICENSE AGREEMENT

NOTICE: BY DOWNLOADING AND INSTALLING,

COPYING OR OTHERWISE USING THE SOFTWARE, YOU

AGREE TO BE BOUND BY THE TERMS OF THIS EULA.

IF YOU DO NOT AGREE TO THE TERMS OF THIS EULA,

YOU MAY NOT DOWNLOAD, INSTALL, COPY OR USE THE

SOFTWARE, AND YOU MAY RETURN THE UNUSED

SOFTWARE TO THE VENDOR FROM WHICH YOU ACQUIRED

IT WITHIN THIRTY (30) DAYS AND REQUEST A

REFUND OF THE LICENSE FEE, IF ANY, ALREADY

PAID UPON SHOWING PROOF OF PAYMENT.

1 DEFINITIONS

1.1 "Designated Administrative Access" means

that access to the standard user

interfaces of a given instance of the

Software (designated in this section) that

you may grant to a designated third party

for which you have provided advance

written notice to VMware that you are

Do you accept? (yes/no) y

Thank you.

Configuring fallback GTK+ 2.4 libraries.

In which directory do you want to install the mime type icons?

Trying to find a suitable vmmon module for your running kernel.

The module bld-2.6.9-11.EL-i686smp-RHEL4 loads perfectly in the running kernel.

Do you want networking for your virtual machines? (yes/no/help) [yes]

Configuring a bridged network for vmnet0.

The following bridged networks have been defined:

vmnet0 is bridged to eth0

All your ethernet interfaces are already bridged.

Do you want to be able to use NAT networking in your virtual machines? (yes/no)

[yes]

Configuring a NAT network for vmnet8.

Trang 32

Setijo Agus (setijo@gmail.com) Page 32 of 114

Do you want this program to probe for an unused private subnet?

(yes/no/help)

[yes]

Probing for an unused private subnet (this can take some time)

The subnet 172.16.182.0/255.255.255.0 appears to be unused.

The following NAT networks have been defined:

vmnet8 is a NAT network on private subnet 172.16.182.0.

Do you wish to configure another NAT network? (yes/no) [no]

Do you want to be able to use host-only networking in your virtual

machines?

[yes] no

Trying to find a suitable vmnet module for your running kernel.

The module bld-2.6.9-11.EL-i686smp-RHEL4 loads perfectly in the running kernel.

Please specify a port for remote console connections to use [902]

Stopping xinetd: [ OK ]

Starting xinetd: [ OK ]

Configuring the VMware VmPerl Scripting API.

Building the VMware VmPerl Scripting API.

Using compiler "/usr/bin/gcc" Use environment variable CC to override Installing the VMware VmPerl Scripting API.

The installation of the VMware VmPerl Scripting API succeeded.

Generating SSL Server Certificate

In which directory do you want to keep your virtual machine files?

[/var/lib/vmware/Virtual Machines] /u01/VM

The path "/u01/VM" does not exist currently This program is going to create

it, including needed parent directories Is this what you want? [yes] Please enter your 20-character serial number.

Type XXXXX-XXXXX-XXXXX-XXXXX or 'Enter' to cancel: 43M3M

92TPJ-YDG4U-2A317-Starting VMware services:

Virtual machine monitor [ OK ]

Virtual ethernet [ OK ]

Bridged networking on /dev/vmnet0 [ OK ]

Host-only networking on /dev/vmnet8 (background) [ OK ]

NAT service on /dev/vmnet8 [ OK ]

The configuration of VMware Server 1.0.2 build-39867 for Linux for this running

kernel completed successfully.

Trang 33

VMWare

Machine

Trang 34

Setijo Agus (setijo@gmail.com) Page 34 of 114

3 Setup Vmware Machine

i Menyiapkan node1 dengan konfigurasi sbb :

2 ethernet Card virtual

1 Memory virtual 900 MB

1 harddisk virtual untuk O/S 10GB

Virtual device node : SCSI 0:1

1 harddisk virtual untuk CRS dengan format OCFS2 1GB

File name : /u01/VM/shared/ocfs2.vmdk

Virtual device node : SCSI 0:1

1 harddisk virtual untuk DATA dengan format ASM 40GB

File name : /u01/VM/shared/asm2.vmdk

Virtual device node : SCSI 0:2

j Membuat VMWARE machine å klik Application å System Tools åVmware Server Pada form connect to host pilih Local Host åakhiri dengan button Connect

Trang 35

k Klik button Create a new virtual machine ikuti wizard å "NewVirtual Machine Wizard" Klik button "Next" pada welcome page.

l Pilih "Custom" pada virtual machine dan klik "Next" button

Trang 36

Setijo Agus (setijo@gmail.com) Page 36 of 114

m Pilih "Linux" guest operating system option, dan set "Red HatEnterprise Linux 4", kemudian klik button "Next"

n Pilih nama "RAC1" dan lokasi default "/u01/VM/RAC1", klik button

"Next"

Trang 37

o Pilih number of processors dan klik button "Next" button.

p Jangan di check pilihan "Make this virtual machine private" danklik button "Next" button

Trang 38

Setijo Agus (setijo@gmail.com) Page 38 of 114

q Pilih memory untuk virtual machine 900MB

r Pilih "Use bridged networking", klik "Next"

Trang 39

s Pilih "LSI Logic" klik "Next".

t Pilih "Create a new virtual disk" klik "Next"

Trang 40

Setijo Agus (setijo@gmail.com) Page 40 of 114

u Pilih "SCSI" klik "Next"

v Disk size 10 GB klik "Next"

Trang 41

w Simpan dengan nama misalnya RAC1.vmdk, klik "Next".

x Dilayar akan terlihat proses pembuatan virtual harddisk

Trang 42

Setijo Agus (setijo@gmail.com) Page 42 of 114

y Dilayar akan terlihat hasil VMWARE machine

z Langkah selanjutnya adalah menambahkan ethernet pada VMWAREmachine sehingga menjadi 2 buah, yaitu dengan cara klik “Editvirtual machine settings” Pilih Ethernet Adapter, Klik Next

Trang 44

Setijo Agus (setijo@gmail.com) Page 44 of 114

aa Jika sukses dalam penambahan ethernet card, maka akan terlihatseperti gambar di bawah ini

bb Langkah selanjutnya adalah menambahkan virtual harddisk untuk CRS(Cluster Ready Services) Pilih Harddisk, Klik Next

Trang 45

cc Pilih "Create a new virtual disk" klik "Next".

dd Pilih "SCSI" klik "Next"

Trang 46

Setijo Agus (setijo@gmail.com) Page 46 of 114

ee Disk size 1 GB klik "Next"

ff Simpan dengan nama misalnya /u01/VM/shared/OCFS2.vmdk, klik

"Next"

Trang 47

gg Klik Advanced pilih Mode å independent å Persistent dan akhiriklik Finish

hh Dilayar akan terlihat proses pembuatan virtual harddisk

Trang 48

Setijo Agus (setijo@gmail.com) Page 48 of 114

ii Menambahkan virtual harddisk untuk datafile database sebesar 20

GB dengan format ASM, seperti virtual harddisk untuk CRS

jj Simpan dengan nama misalnya /u01/VM/shared/ASM.vmdk, klik "Next"

Trang 49

O/S VMWare

Machine

Trang 50

Setijo Agus (setijo@gmail.com) Page 50 of 114

4 Setup O/S Vmware Machine

kk Dari hasil setup Vmware akan didapatkan hasil seperti gambar dibawah ini

ll Untuk menjalankan machine Vmware, klik “Power on this virtualmachine”

Trang 52

Setijo Agus (setijo@gmail.com) Page 52 of 114

Trang 54

Setijo Agus (setijo@gmail.com) Page 54 of 114

Trang 56

Setijo Agus (setijo@gmail.com) Page 56 of 114

Trang 58

Setijo Agus (setijo@gmail.com) Page 58 of 114

Trang 60

Setijo Agus (setijo@gmail.com) Page 60 of 114

Trang 62

Setijo Agus (setijo@gmail.com) Page 62 of 114

Trang 64

Setijo Agus (setijo@gmail.com) Page 64 of 114

Trang 66

Setijo Agus (setijo@gmail.com) Page 66 of 114

Trang 68

Setijo Agus (setijo@gmail.com) Page 68 of 114

mm Network Setting

• IP Public (LAN) /eth0 : 172.20.151.1 / 255.255.0.0

• IP Public (LAN) /eth1 : 192.168.5.1 / 255.255.255.0

oo Setup hostname

[root@node1 ~]# mv /etc/hosts /etc/hosts.asli

[root@node1 ~]# cat >> /etc/hosts << EOF

pp Tuning kernel dan network serta restart

[root@node1 ~]# cat >> /etc/sysctl.conf << EOF

Trang 69

* soft nofile 1024

* hard nofile 65536

EOF

rr Configuring Hangcheck Kernel Module Parameters

[root@node1 ~]# echo "options hangcheck-timer hangcheck_tick=30 hangcheck_margin=180" >> /etc/modprobe.conf

[root@node1 ~]# echo "/sbin/modprobe hangcheck-timer" >>

/etc/rc.local

[root@node1 ~]# modprobe hangcheck-timer

[root@node1 ~]# grep Hangcheck /var/log/messages | tail -2

ss create user oracle

[root@node1 ~]# groupadd -g 700 dba

[root@node1 ~]# groupadd -g 701 oinstall

[root@node1 ~]# useradd -u 700 -g oinstall -G dba oracle

[root@node1 ~]# passwd oracle

tt Membuat Oracle Directories dimana menurut Oracle's OptimalFlexible Architecture (OFA), sebaiknya penempatan database filedipisahkan dengan database software, misalkan directory /u01untuk database software dan /u02 untuk database file

[root@node1 ~]# mkdir -p /u01/app/oracle

[root@node1 ~]# mkdir -p /u02/oradata/orcl

[root@node1 ~]# chown -R oracle.oinstall /u01

[root@node1 ~]# chown -R oracle.oinstall /u02

uu Configure RAC Nodes untuk Remote Access

[root@node1 ~]# touch /etc/hosts.equiv

[root@node1 ~]# chmod 600 /etc/hosts.equiv

[root@node1 ~]# chown root.root /etc/hosts.equiv

[root@node1 ~]# cat >> /etc/hosts.equiv << EOF

[root@node1 ~]# chkconfig rlogin on

[root@node1 ~]# service xinetd reload

xx Setup Oracle Environments

[root@node1 ~]# su - oracle

[oracle@node1 ~]$ vi ~oracle/.bash_profile

Trang 70

Setijo Agus (setijo@gmail.com) Page 70 of 114

TMP=/tmp; export TMP

TMPDIR=$TMP; export TMPDIR

ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE

ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1; export ORACLE_HOMEORACLE_SID=RAC1; export ORACLE_SID

ORACLE_TERM=xterm; export ORACLE_TERM

PATH=/usr/sbin:$PATH; export PATH

PATH=$ORACLE_HOME/bin:$PATH; export PATH

LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export

LD_LIBRARY_PATH

CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH

[oracle@node1 ~]$ exit

yy Membuat partisi harddisk untuk OCFS2 dan ASM

[root@node1 ~]# fdisk /dev/sdb

Command (m for help): n

First cylinder (1-130, default 1):

Using default value 1

Last cylinder or +size or +sizeM or +sizeK (1-130, default 130): Using default value 130

Command (m for help): w

The partition table has been altered!

Calling ioctl() to re-read partition table

Syncing disks

[root@node1 ~]# fdisk /dev/sdc

Command (m for help): n

First cylinder (1-2610, default 1):

Using default value 1

Last cylinder or +size or +sizeM or +sizeK (1-2610, default

2610):

Using default value 2610

Command (m for help): w

The partition table has been altered!

Calling ioctl() to re-read partition table

Trang 71

[root@node1 ~]# cp /media/cdrom/CentOS/RPMS/libaio-0* /root

[root@node1 ~]# cp /media/cdrom/CentOS/RPMS/openmotif21* /root [root@node1 ~]# eject

aaa Lakukan instalasi openmotif dan libaio

[root@node1 ~]# rpm -Uvh openmotif-2*

[root@node1 ~]# rpm -Uvh libaio-0*

[root@node1 ~]# rpm -Uvh openmotif21*

Trang 72

Setijo Agus (setijo@gmail.com) Page 72 of 114

a) Informasi tentang ocfs

b) pilih [Cluster] -> [Configure Nodes ]

c) pada "Node Configurtion", click [Add] button

Trang 73

d) Pada "Add Node", masukan Host name & IP address untuk nodepertama, IP Port default 7777 Ulangi untuk node – nodeberikutnya

e) Click [Apply] pada "Node Configuration" dialog

f) Click [Close] pada "Node Configuration" dialog

g) keluar aplikasi menggunakan [File] -> [Quit]

Trang 74

Setijo Agus (setijo@gmail.com) Page 74 of 114

ddd format ocfs2 (hanya di lakukan di salah satu node)

[root@node1 ~]# mkfs.ocfs2 -F -b 4K -C 32K -N 4 -L oradatafiles

/dev/sdb1

mkfs.ocfs2 1.2.2

Overwriting existing ocfs2 partition

WARNING: Cluster check disabled

Proceed (y/N): y

Filesystem label=oradatafiles

Block size=4096 (bits=12)

Cluster size=32768 (bits=15)

Volume size=1069252608 (32631 clusters) (261048 blocks)

2 cluster groups (tail covers 375 clusters, rest cover 32256clusters)

Journal size=16777216

Initial number of node slots: 4

Creating bitmaps: done

Initializing superblock: done

Writing system files: done

Writing superblock: done

Formatting Journals: done

Writing lost+found: done

mkfs.ocfs2 successful

eee mountpoint otomatis

[root@node1 ~]# vi /etc/fstab

/dev/sdb1 /u02/oradata/orcl ocfs2 _netdev,datavolume 0 0

fff konfigurasi agar ocfs run pada saat booting

[root@node1 ~]# /etc/init.d/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 to start on boot (Enter "none" to clear) [ocfs2]:

Specify heartbeat dead threshold (>=7) [7]:

Writing O2CB configuration: OK

O2CB cluster ocfs2 already online

ggg hak & security

[root@node1 ~]# mount /dev/sdb1 /u02/oradata/orcl/ -t ocfs2

[root@node1 ~]# chown oracle.oinstall /u02/oradata/orcl/

[root@node1 ~]# chmod 775 /u02/oradata/orcl

[root@node1 ~]# ls -ld /u02/oradata/orcl/

drwxrwxr-x 3 oracle oinstall 4096 Aug 29 11:31 /u02/oradata/orcl/

hhh Install Automatic Storage Management (ASMLib 2.0)

[root@node1 ~]# rpm -Uvh support-2.0.1-1.i386.rpm 2.6.9-22.EL-2.0.0-1.i686.rpm oracleasmlib-2.0.1-1.i386.rpm

Trang 75

iii Configure Automatic Storage Management (ASMLib 2.0)

[root@node1 ~]# /etc/init.d/oracleasm configure

Configuring the Oracle ASM library driver.

This will configure the on-boot properties of the Oracle ASM library driver The following questions will determine whether the driver is loaded on boot and what permissions it will have The current values will be shown in brackets ('[]') Hitting <ENTER> without typing an answer will keep that current value Ctrl-C will abort.

Default user to own the driver interface []: oracle

Default group to own the driver interface []: oinstall

Start Oracle ASM library driver on boot (y/n) [n]: y

Fix permissions of Oracle ASM disks on boot (y/n) [y]:

Writing Oracle ASM library driver configuration: [ OK ] Loading module "oracleasm": [ OK ] Mounting ASMlib driver filesystem: [ OK ] Scanning system for ASM disks: [ OK ]jjj Membuat ASM

[root@node1 ~]# /etc/init.d/oracleasm createdisk VOL1 /dev/sdc1

Marking disk "/dev/sdc1" as an ASM disk: [ OK ]kkk List ASM

[root@node1 ~]# /etc/init.d/oracleasm scandisks

Scanning system for ASM disks: [ OK ]

[root@node1 ~]# /etc/init.d/oracleasm listdisks

VOL1

lll Tuneup O/S

[root@node1 ~]# chkconfig cups off

[root@node1 ~]# chkconfig cups-config-daemon off

[root@node1 ~]# chkconfig isdn off

[root@node1 ~]# chkconfig lm_sensors off

[root@node1 ~]# chkconfig pcmcia off

[root@node1 ~]# chkconfig sendmail off

[root@node1 ~]# chkconfig smartd off

mmm Install Vmware Client : Login root pada RAC1 virtual machine,kemudian pilih "VM > Install VMware Tools " (option dari VMwareServer Console menu)

Ngày đăng: 05/11/2019, 14:05