Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Openfiler+vmware+oracle 11g rac build

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

1. Environmental planning 1. IP address planning

IP address

Hostnam

Use

Instance name

192.168.12.54

Oracle-rac01-db01

Public ip (Node 1)

192.168.12.57

Oracle-rac02-db02

Public ip (Node 2)

192.168.12.70

Rac01-db01-vip

Vip (Node 1)

Racdb1 asm1

192.168.12.71

Rac02-db02-vip

Vip (Node 2)

Racdb2 asm1

192.168.12.72

SCANIP

Scan ip

Racdb

172.168.12.54

Rac01-db01-priv

Private ip (Node 1)

172.168.12.57

Rac02-db02-priv

Private ip (Node 2)

172.168.12.76

Ip-san

Storage ip

# Public ip

192.168.12.54 oracle-rac01-db01

192.168.12.57 oracle-rac02-db02

# vip

192.168.12.70 rac01-db01-vip

192.168.12.71 rac02-db02-vip

# private-vip

172.168.12.54 rac01-db01-priv

172.168.12.57 rac02-db02-priv

# Scan ip

192.168.12.72 SCANIP

2. Operating system version CentOS release 6.7II, operating system build 1, local yum server build a, install createrepo package b, modify configuration file (modify permissions after uploading files to server) 2, configuration time synchronization (no configuration is needed) 3, rpm check a, check

Rpm-Q cloog-ppl compat-libcap1compat-libstdc++-33 cpp gcc gcc-c++ glibc-devel glibc-headers kernel-headersksh libXmu libXt libXv libXxf86dga libXxf86misc libXxf86vm libaio-devel libdmxlibstdc++-devel mpfr make ppl xorg-x11-utils xorg-x11-xauth

B, installation

Yum install cloog-ppl compat-libcap1compat-libstdc++-33 cpp gcc gcc-c++ glibc-devel glibc-headers kernel-headersksh libXmu libXt libXv libXxf86dga libXxf86misc libXxf86vm libaio-devel libdmxlibstdc++-devel mpfr make ppl xorg-x11-utils xorg-x11-xauth

4. Firewall and selinux shutdown a, selinux shutdown

Root@ora ~] # vi / etc/sysconfig/selinux

SELINUX=disabled

[root@ora ~] # / usr/sbin/getenforce

Disabled

B. Firewall is off.

[root@rac1 ~] # service iptables stop

[root@rac1] # chkconfig-- level 123456 iptables off

5. Linux connection vnc settings 1. Server-side settings

A. Make sure that Linux has installed vnc-server

B. The server needs to enable vnc users (note that each user should run vncpasswd)

[root@bogon ~] # vncpasswd

[root@bogon ~] # vi / etc/sysconfig/vncservers---- (set password in advance, otherwise an error will be reported)

VNCSERVERS= "1:root 2:test"

VNCSERVERARGS [3] = "- geometry 800x600-nolisten tcp-localhost"

If you enable more users, you can directly space and continue to add users in the same format

For example, VNCSERVERS= "1:root 2:test 3:user"

C. Modify the user file ~ / .vnc / xstartup and comment out the last line:

# twm& changed to gnome-session &

d. Restart the vnc service

Servicevncserver restart

e. Set VNCServer to start automatically

1)。 Edit the / etc/sysconfig/vncservers configuration file:

Uncomment the line on VNCSERVERS, for example: VNCSERVERS= "1:root"

Where 1 represents the desktop number and root indicates the startup user

If you want to start multiple VNCServer, separate them with a space, for example:

VNCSERVERS= "1:root2:oracle 3:grid"

F. Start the vncserver service automatically

a)。 Execute the following command to view the status of the vncserver service:

Chkconfig--list vncserver

b)。 Modify vncserver service to start automatically:

Chkconfig--level 345 vncserver on

II. Client connection

Ip: Port number (5900 + desktop number, password sets password for vncpasswd)

Vncserver-kill: 2

Third, database cluster installation and configuration 1. New operating system related users

Description

OS group name

Assigned to this group of OS users

Oracle permission

Oracle inventory and software owner

Oinstall

Grid 、 oracle

Oracle automatic Storage Management Group

Asmadmin

Grid

SYSASM

ASM Database administrators Group

Asmdba

Grid 、 oracle

SYSDBA of ASM

ASM operator Group

Asmoper

Grid

SYSOPER of ASM

Database administrator

Dba

Grid,oracle

SYSDBA

Database operator

Oper

Oracle

SYSOPER

Create a new group

/ usr/sbin/groupadd-g 501 oinstall

/ usr/sbin/groupadd-g 502 dba

/ usr/sbin/groupadd-g 503 oper

/ usr/sbin/groupadd-g 504 asmadmin

/ usr/sbin/groupadd-g 505 asmoper

/ usr/sbin/groupadd-g 506 asmdba

New user

/ usr/sbin/useradd-g oinstall-G dba,asmdba,operoracle

/ usr/sbin/useradd-g oinstall-G asmadmin,asmdba,asmoper,oper,dba grid

Create a directory

Mkdir-p / u01/app/grid

Mkdir-p / u01/11.2.0/grid

Mkdir-p / u01/app/oracle

Mkdir-p / u01/app/oracle/product/11.2.0/db_1

Chown grid:oinstall / U01-R

Chown-R oracle:oinstall / u01/app/oracle

Chmod 775 / u01 /-R

1. Use udev binding method. See the document for the configuration file.

File path / etc/udev/rule.d/99-oracle-asmdevices.rules

/ sbin/scsi_id-- whitelisted--replace-whitespace-- device=/dev/sdb- drive letter name gets uuid

[root@rac01 rules.d] # / sbin/scsi_id--whitelisted-- replace-whitespace-- device=/dev/sdb

14f504e46494c450031556d7232542d4b416e362d4e624553

Binding format

KERNEL== "sd*", BUS== "scsi", PROGRAM== "/ sbin/scsi_id-whitelisted--replace-whitespace-device=/dev/$name", RESULT== "14f504e46494c45004272785573692d476441622d66676939", NAME= "asm-diskdata1", OWNER= "grid", GROUP= "asmadmin", MODE= "0660"

[root@rac01 rules.d] # ll / dev/sd*- View device

[root@rac01 ~] # ll / dev/sd*

Brw-rw----. 1 root disk 8, 0 May 30 08:13/dev/sda

Brw-rw----. 1 root disk 8, 1 May 30 08:13/dev/sda1

Brw-rw----. 1 root disk 8, 2 May 30 08:13/dev/sda2

Brw-rw----. 1 root disk 8, 3 May 30 08:13/dev/sda3

[root@rac01 rules.d] # ll / dev/asm*- View bindings

Brw-rw----. 1 grid asmadmin 8, 48 May 3008:13 / dev/asm-diskdata1

Brw-rw----. 1 grid asmadmin 8, 80 May 30 08:13/dev/asm-diskdata3

Brw-rw----. 1 grid asmadmin 8, 96 May 3008:13 / dev/asm-diskdata4

Brw-rw----. 1 grid asmadmin 8, 64 May 3008:13 / dev/asm-diskdatar2

Brw-rw----. 1 grid asmadmin 8, 32 May 3008:13 / dev/asm-fl

Brw-rw----. 1 grid asmadmin 8, 16 May 3008:13 / dev/asm-ocr

Scp root@192.168.12.54:/etc/udev/rule.d/99-oracle-asmdevices.rules

/ etc/udev/rule.d/99-oracle-asmdevices.rules

Modify environment variabl

Root

Vi / etc/profile

# ORACLE SETTING

If [$USER = "oracle"] | | [$USER = "grid"]; then

If [$SHELL = "/ bin/ksh"]; then

Ulimit-p 16384

Ulimit-n 65536

Else

Ulimit-u 16384-n 65536

Fi

Umask 022

Fi

[root@rac02~] # source / etc/profile

2. Configure user environment variables

Modify grid user login script

Vi .bash _ profile

# ORACLE_HOSTNAME=gzdb01

# export ORACLE_HOSTNAME

ORACLE_BASE=/u01/app/grid

Export ORACLE_BASE

ORACLE_HOME=/u01/11.2.0/grid

Export ORACLE_HOME

ORACLE_SID=+ASM1; #

Export ORACLE_SID

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

Modify oracle user login script

# ORACLE_HOSTNAME=gzdb01

# export ORACLE_HOSTNAME

ORACLE_UNQNAME=racdb

Export ORACLE_UNQNAME

ORACLE_BASE=/u01/app/oracle

Export ORACLE_BASE

ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1

Export ORACLE_HOME

ORACLE_SID=racdb2; #

Export ORACLE_SID

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

3. Modify operating system parameters

Modify kernel parameters

Vi / etc/sysctl.conf

# ORACLE SETTING

Fs.aio-max-nr = 1048576

Fs.file-max = 6815744

Kernel.shmall = 8388608

Kernel.shmmax = 536870912

Kernel.shmmax = 1073741824

Kernel.shmmni = 4096

Kernel.sem = 250 32000 100 128

Net.ipv4.ip_local_port_range = 900065500

Net.core.rmem_default = 262144

Net.core.rmem_max = 4194304

Net.core.wmem_default = 262144

Net.core.wmem_max = 1048586

After you have modified the kernel parameters, be sure to run the following command so that the changes take effect immediately, otherwise the check may fail when checking the availability of CRS.

# / sbin/sysctl-p

Configure shell limit

Vi / etc/security/limits.conf

Add the following

# ORACLE SETTING

Grid soft nproc 2047

Grid hard nproc 16384

Grid soft nofile 1024

Grid hard nofile 65536

Oracle soft nproc 2047

Oracle hard nproc 16384

Oracle soft nofile 1024

Oracle hard nofile 65536

Vi / etc/pam.d/login

Add the following

# ORACLE SETTING

Session required pam_limits.so

4. Configure SSH five passwords to log in

Execute as oracle and grid users on both machines

[oracle@node1] $mkdir ~ / .ssh

[oracle@node1] $chmod 700 ~ / .ssh

[oracle@node1] $ssh-keygen-t rsa

[oracle@node1] $ssh-keygen-t dsa

Execute with oracle on node one.

[oracle@node1~] $cat ~ / .ssh/id_rsa.pub > > ~ / .ssh/authorized_keys

[oracle@node1~] $cat ~ / .ssh/id_dsa.pub > > ~ / .ssh/authorized_keys

[oracle@node1~] $ssh oracle-rac02-db02 cat ~ / .ssh/id_rsa.pub > > ~ / .ssh/authorized_keys

[oracle@node1~] $ssh oracle-rac02-db02 cat ~ / .ssh/id_dsa.pub > > ~ / .ssh/authorized_keys

[oracle@node1] $scp ~ / .ssh/authorized_keys IAP-GZ-RACDB06:~/.ssh/authorized_keys

Check if a password is required to log in (execute as oracle respectively)

[oracle@node1~] $ssh IAP-GZ-RACDB05 date

[oracle@node1~] $ssh IAP-GZ-RACDB06 date

[oracle@node1~] $ssh RAC05-priv date

[oracle@node1~] $ssh RAC06-priv date

Switch to node2 execution (execute as oracle respectively)

[oracle@node2~] $ssh node1 date

[oracle@node2~] $ssh node2 date

[oracle@node2~] $ssh node1-priv date

5. Use udev binding to configure storage and partition (you can bind after partition) 6. Environment verification

1. IP configuration (please do not capitalize the machine name)

[root@iap-gz-rac05~] # cat / etc/hosts

2. Memory space size

[root@iap-gz-rac05~] # free-m

3. Operating system users, oracle and grid environment variables

4. Password-free login authentication (oracle and grid users)

Ssh iap-gz-rac05 date

Ssh iap-gz-rac06 date

Ssh rac05-priv date

Ssh rac06-priv date

5. Other (grid users)

. / runcluvfy.shstage-pre crsinst-n IAP-GZ-RACDB05, IAP-GZ-RACDB06-verbose

4. Installation 1. Gird software installation (20 steps in total)

Note that scan-name should be consistent with / etc/hosts. Adding rac-cluter-scan to / etc/hosts is not native IP but a virtual IP.

Add another node and pay attention to editing vip

[root@rac02 U01] # ls-ltr

Drwxr-xr-x. 3 rootoinstall 4096 May 30 07:59 11.2.0

Drwxrwxr-x. 5 grid oinstall 4096 May 3009:41 app

2. Create asm disk after installation. 3. Install database software (10 steps in total)

Fifth, daily management and maintenance operation

View cluster services

[grid@iap-gz-rac05~] $crsctl check cluster

[grid@ iap-gz-rac05] $crsctl stat resource-t

Start and stop service

(1) stop the OracleClusterware system on the local server:

[root@rac01 ~] # / u01/app/11.2.0/grid/bin/crsctl stop cluster

(1) stop the OracleClusterware system on the local server:

[root@rac01~] # / u01/app/11.2.0/grid/bin/crsctl start cluster

Note: after running the "crsctl stop cluster" command, if any of the resources managed by Oracle Clusterware are still running, the entire command fails. Use the-f option to unconditionally stop all resources and stop the Oracle Clusterware system.

Also note that the Oracle Clusterware system can be stopped on all servers in the cluster by specifying the-all option. Stop the oracle clusterware system on rac01 and rac02 as follows:

[root@rac02] # / u01/app/11.2.0/grid/bin/crsctl stop cluster-all

Start the oralce clusterware system on the local server:

[root@rac01 ~] # / u01/app/11.2.0/grid/bin/crsctl start cluster

Note: you can start the Oracle Clusterware system on all servers in the cluster by specifying the-all option.

[root@rac02] # / u01/app/11.2.0/grid/bin/crsctl start cluster-all

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report