In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Red hat 6.5for RAC 11g document WORD download: https://down.51cto.com/data/2465319 requirements: IP address requirements: business IP 5:
192.168.30.201 rac-a
192.168.30.202 rac-b
10.10.10.10 rac-a-pri
10.10.10.11 rac-b-pri
192.168.30.203 rac-a-vip
192.168.30.204 rac-b-vip
192.168.30.206 scanip
Heartbeat IP2:
10.10.10.10 RAC-1-pri
10.10.10.11 RAC-2-pri
Disk requirements ASM disk description
ASM disk requires 3 shared disks, test environment ISCSI real-world FC mapping
DATA_DG is used to store ORACLE database. Note: oracle software is installed locally on the host computer.
GRID_DG is used to store GRID softwareNote: execute software on A machine and copy it to B machine automatically
FLASH_DG is used to store archive journals Note: archives must be placed on a shared disk
Note: the following machine An is RAC-1 and machine B is RAC-2
Configuration process 1. Modify and set the network card IP
# #
# modify and set the Nic IP #
# #
Both An and B machines need to execute
Network card configuration file location
/ etc/sysconfig/network-scripts
2. Add A B Host resolution
# #
# add Host parsing #
# #
Both An and B machines need to execute
[root@RAC-1 ~] # vi / etc/hosts
192.168.30.201 RAC-A
192.168.30.202 RAC-B
10.10.10.10 RAC-A-pri
10.10.10.11 RAC-B-pri
192.168.30.203 RAC-A-vip
192.168.30.204 RAC-B-vip
192.168.30.200 scanip
3. Turn off the firewall
# #
# turn off the firewall #
# #
A node execution
Service iptables stop
Chkconfig iptables off
Service iptables status
B node execution
Service iptables stop
Chkconfig iptables off
Service iptables status
Note: use the following code if you encounter the following status
Systemctl stop iptables.service
Systemctl status iptables.service
4. Close SEliux
# #
# turn off SEliux #
# #
Both An and B need to be implemented.
Vi / etc/selinux/config
#
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing-SELinux security policy is enforced.
# permissive-SELinux prints warnings instead of enforcing.
# disabled-No SELinux policy is loaded.
SELINUX=disabled # (change enable to disabled) #
# SELINUXTYPE= can take one of these two values:
# targeted-Targeted processes are protected
# mls-Multi Level Security protection.
SELINUXTYPE=targeted
#
5. Mount the image
# #
# Mount the installation disk #
# #
[root@ola ~] # umount / dev/sr0
[root@ola ~] # mount / dev/cdrom / mnt
Or mount the image file
Mount rhel-server-7.3-x86_64-dvd.iso / mnt
6. Configure yum source and install dependency packages
# #
# Edit YumSource #
# #
Cd / etc/yum.repos.d/
Vi public-yum-ol6.repo
The contents are as follows:
# #
[dvd]
Name=mydvd
Baseurl= file:///mnt
Enable=1
Gpgcheck=0
# #
Test the yum source
Yum clean all
Yum update
Yum repolist
Yum install-y compat-libstdc++* compat-libstdc++* gcc-* gcc-c* glibc-* glibc-devel-* glibc-devel-* ksh-* libgcc-* libgcc-* libstdc++-docs-* libstdc++-devel* libstdc* libstdc++* libaio-* elfutils-* make sysstat compat-* perl unzip* openssh*
Note: the following code can not be executed and has been integrated into the above code.
Yum install-y libstdc*
Yum install-y libstdc++*
Yum install-y libaio-* #
Yum install-y elfutils-* #
Yum install-y make sysstat
Yum install-y compat-* #
Yum install-y perl
Yum install unixODBC* #
Install cvuqdisk-1.0.9-1.rpm package dependencies
Yum search smartctl
Yum install-y smartmontools
7. Newly added group
# #
# add new group #
# #
Both An and B need to be implemented.
Groupadd-g 501 oinstall
Groupadd-g 502 dba
Groupadd-g 503 oper
Groupadd-g 504 asmadmin
Groupadd-g 505 asmoper
Groupadd-g 506 asmdba
# # #
Useradd-g oinstall-G dba,asmdba,oper oracle
Useradd-g oinstall-G asmadmin,asmdba,asmoper,oper,dba grid
8. Create the required directory
# #
# create the required directory #
# #
Mkdir-p / u01/app/oracle/product/11.2.0/db1
Mkdir-p / u01/app/grid/product/11.2.0/crs
Mkdir-p / u01/app/oraInventory
Mkdir-p / u01/app/11.2.0/grid
# #
# folder weighting #
# #
Chown-R grid:oinstall / u01/app/oraInventory
Chown-R grid:oinstall / u01/app/grid
Chown-R oracle:oinstall / u01/app/oracle
Chmod-R 775 / u01/app/oracle
Chmod-R 775 / u01/app/
Chown-R grid:oinstall / u01/app/11.2.0/grid/
Chmod-R 775 / u01/app/11.2.0/grid/
9. Set the account password
# #
# set account password #
# #
[root@ola ~] # passwd oracle
[root@ola ~] # passwd grid
10. Change the environment variable of grid oracle
# #
# change the environment variable of grid oracle #
1. Log in to grid user A configuration
#
# A machine configuration #
#
Vi .bash _ profile
PATH=$PATH:$HOME/bin
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
ORACLE_BASE=/u01/app/grid; export ORACLE_BASE
ORACLE_HOME=/u01/app/11.2.0/grid; export ORACLE_HOME
ORACLE_SID=+ASM1; 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
NLS_DATE_FORMAT= "yyyy-mm-dd HH24:MI:SS"; export NLS_DATE_FORMAT
NLS_LANG=AMERICAN_AMERICA.ZHS16GBK;export NLS_LANG
Export PATH
If [$USER = "oracle"]; then
If [$SHELL = "/ bin/ksh"]; then
Ulimit-p 16384
Ulimit-n 65536
Else
Ulimit-u 16384-n 65536
Fi
Umask 022
Fi
B machine configuration
#
# B machine configuration #
#
Vi .bash _ profile
PATH=$PATH:$HOME/bin
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
ORACLE_BASE=/u01/app/grid; export ORACLE_BASE
ORACLE_HOME=/u01/app/11.2.0/grid; export ORACLE_HOME
ORACLE_SID=+ASM2; 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
NLS_DATE_FORMAT= "yyyy-mm-dd HH24:MI:SS"; export NLS_DATE_FORMAT
NLS_LANG=AMERICAN_AMERICA.ZHS16GBK;export NLS_LANG
Export PATH
If [$USER = "oracle"]; then
If [$SHELL = "/ bin/ksh"]; then
Ulimit-p 16384
Ulimit-n 65536
Else
Ulimit-u 16384-n 65536
Fi
Umask 022
Fi
# # #
1. Log in to oracle user A configuration
#
# A machine configuration #
#
Vi .bash _ profile
# #
PATH=$PATH:$HOME/bin
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db1; export ORACLE_HOME
ORACLE_SID=orcl1; 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
NLS_DATE_FORMAT= "yyyy-mm-dd HH24:MI:SS"; export NLS_DATE_FORMAT
NLS_LANG=AMERICAN_AMERICA.ZHS16GBK;export NLS_LANG
Export PATH
If [$USER = "oracle"]; then
If [$SHELL = "/ bin/ksh"]; then
Ulimit-p 16384
Ulimit-n 65536
Else
Ulimit-u 16384-n 65536
Fi
Umask 022
Fi
B machine configuration
#
# B machine configuration #
#
Su-oracle
Vi .bash _ profile
PATH=$PATH:$HOME/bin
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db1; export ORACLE_HOME
ORACLE_SID=orcl2; 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
NLS_DATE_FORMAT= "yyyy-mm-dd HH24:MI:SS"; export NLS_DATE_FORMAT
NLS_LANG=AMERICAN_AMERICA.ZHS16GBK;export NLS_LANG
Export PATH
If [$USER = "oracle"]; then
If [$SHELL = "/ bin/ksh"]; then
Ulimit-p 16384
Ulimit-n 65536
Else
Ulimit-u 16384-n 65536
Fi
Umask 022
Fi
Complete the environment variable changes for grid and oracle
Make the environment variable effective
$source .bash _ profile
Change system variabl
# change system variable #
#
Under the root user view
Both An and B are executed.
Vi / etc/sysctl.conf
# Controls the maximum shared segment size, in bytes
# kernel.shmmax = 68719476736
# Controls the maximum number of shared memory segments, in pages
# kernel.shmall = 4294967296
Fs.aio-max-nr = 1048576
Fs.file-max = 6815744
Kernel.shmall = 8388608
Kernel.shmmax = 19327352832
Kernel.shmmni = 4096
Kernel.sem = 250 32000 100 128
Net.ipv4.ip_local_port_range = 9000 65500
Net.core.rmem_default = 262144
Net.core.rmem_max = 4194304
Net.core.wmem_default = 262144
Net.core.wmem_max = 1048586
Vm.min_free_kbytes = 102400
Vi / etc/security/limits.conf
Oracle soft nproc 2047
Oracle hard nproc 16384
Oracle soft nofile 1024
Oracle hard nofile 65536
Oracle hard stack 10240
Grid soft nproc 2047
Grid hard nproc 16384
Grid soft nofile 1024
Grid hard nofile 65536
Grid hard stack 10240
Vi / etc/pam.d/login
Session required pam_limits.so
11. Optionally add ISCSI disk
Note: most of the real-world environments belong to FC mapping, and this operation is not required.
#
# optional add ISCSI disk #
Install the ISCSI service
Yum install-y iscsi*
Start the service
[root@orcl1 ~] # service iscsi start
Set up boot boot
[root@orcl1 ~] # chkconfig-- list | grep iscsi
Iscsi 0:off 1:off 2:off 3:on 4:on 5:on 6:off
Iscsid 0:off 1:off 2:off 3:on 4:on 5:on 6:off
Discover the ISCSI server:
[root@orcl1] # iscsiadm-m discovery-t sendtargets-p 192.168.30.210 [Zhou Shuxuan 1]: 3260
Starting iscsid: [OK]
^ Ciscsiadm: caught SIGINT, exiting...
[root@orcl1] # iscsiadm-m discovery-t sendtargets-p 192.168.30.210
192.168.30.210 3260 iqn.2005-10.org.freenas.ctl:data
192.168.30.210 3260 iqn.2005-10.org.freenas.ctl:flash
192.168.30.210 3260 iqn.2005-10.org.freenas.ctl:grid
Mount disk
[root@orcl1] # iscsiadm-m node-T iqn.2005-10.org.freenas.ctl:data-p 192.168.30.205purl 3260-l
Logging in to [iface: default, target: iqn.2005-10.org.freenas.ctl:data, portal: 192.168.30.210] (multiple)
Login to [iface: default, target: iqn.2005-10.org.freenas.ctl:data, portal: 192.168.30.210 Magne3260] successful.
[root@orcl1] # iscsiadm-m node-T iqn.2005-10.org.freenas.ctl:flash-p 192.168.30.210 purl 3260-l
Logging in to [iface: default, target: iqn.2005-10.org.freenas.ctl:flash, portal: 192.168.30.210] (multiple)
Login to [iface: default, target: iqn.2005-10.org.freenas.ctl:flash, portal: 192.168.30.210 Magne3260] successful.
[root@orcl1] # iscsiadm-m node-T iqn.2005-10.org.freenas.ctl:grid-p 192.168.30.210 purl 3260-l
Logging in to [iface: default, target: iqn.2005-10.org.freenas.ctl:grid, portal: 192.168.30.210] (multiple)
Login to [iface: default, target: iqn.2005-10.org.freenas.ctl:grid, portal: 192.168.30.210 Magne3260] successful.
12. SSH key change
# #
# SSH key change #
# #
Oracle users need to execute both sets.
Su-oracle
Mkdir / .ssh
Chmod 700. ssh
Cd / .ssh
Ssh-keygen-t rsa
Execute scp to RAC-B individually (one by one)
Ssh rac-a cat / home/oracle/.ssh/id_rsa.pub > > authorized_keys
Ssh rac-b cat / home/oracle/.ssh/id_rsa.pub > > authorized_keys
Chmod 600 ~ / .ssh/authorized_keys
Scp authorized_keys rac-b:/home/oracle/.ssh/
Test:
RAC-A# ssh RAC-B
Enter directly without a password
Execute under grid user
# #
# execute under grid user #
# #
Both stations need to be implemented.
Su-grid
Mkdir / .ssh
Chmod 700. ssh
Cd / .ssh
Ssh-keygen-t rsa
Execute scp to RAC-B individually (one by one)
Ssh rac-a cat / home/grid/.ssh/id_rsa.pub > > authorized_keys
Ssh rac-b cat / home/grid/.ssh/id_rsa.pub > > authorized_keys
Chmod 600 ~ / .ssh/authorized_keys
Scp authorized_keys rac-b:/home/grid/.ssh/
Root view (may not be executed)
Echo "options=--whitelisted-- replace-whitespace" > > / etc/scsi_id.config
13. Make ASM disk
# #
# make ASM disk #
# #
Su-root
Enter the dev directory
Cd / dev
Ls
Check to see if there are sdb, sdc, sdd disks again
Execute the following RAC-A to execute SCP to RAC-B
For i in b c d
> do
> echo "KERNEL==\" sd*\ ", BUS==\" scsi\ ", PROGRAM==\" / sbin/scsi_id-- whitelisted-- replace-whitespace-- device=/dev/\ $name\ ", RESULT==\" `/ sbin/scsi_id-- whitelisted-- replace-whitespace-- device=/dev/sd$ i` ", NAME=\" asm-disk$i\ ", OWNER=\" grid\ ", GROUP=\" asmadmin\ ", MODE=\" 0660\ "> > / etc/udev/rules.d/99-oracle-asmdevices.rules
> done
SCP to RAC-B machine
Scp / etc/udev/rules.d/99-oracle-asmdevices.rules rac-b:/etc/udev/rules.d/
Make ASM disk (RAC-A, B execution)
/ sbin/start_udev
Cd / dev/
Ls
Brw-rw---- 1 oracle oinstall 8, 16 Feb 26 23:54 asm-diskb datadg
Brw-rw---- 1 oracle oinstall 8, 32 Feb 26 23:54 asm-diskc
Brw-rw---- 1 oracle oinstall 8, 48 Feb 26 23:54 asm-diskd
14. Upload grid oracle12C files
# # #
# upload grid oracle12C file #
# # File list # #
# # p13390677_112040_Linux-x86-64_1of7##oracle12C##
# # p13390677_112040_Linux-x86-64_2of7##oracle12C##
# # p13390677_112040_Linux-x86-64_3of7## grid # #
# # #
Note: the file only needs to be uploaded to RAC-A, and the software installation will be automatically installed on the RAC-B machine.
15. Test the configuration consistency of the machines at both ends and enter the extracted GRID directory to check and extract the files.
Tar-xvf Oracle_linux_11.2.0.4_grid.tar
Note: since the oracle and grid environment variables are configured to take effect above, restart the machine here for two days.
Reboot
Test the configuration consistency of the machines at both ends
# # #
# Test the configuration consistency of the machines on both ends #
# # #
Su-grid
Cd / soft/grid
. / runcluvfy.sh stage-pre crsinst-n RAC-A,RAC-2-fixup-verbose
16. Configure ASM disk installation ASM dependency package
Yum install-y libaio-0.3.105 (i386)
Yum install-y compat-libstdc++-*
Yum install-y libaio-devel-*
Yum install-y libgcc-*
Yum install-y libstdc++-*
Yum install-y unixODBC-*
Yum install-y unixODBC-devel-*
Yum install-y pdksh-*
Install cluster management
# #
# install cluster management #
Set the ASM disk password when installing cluster management
# #
# ASM password #
# #
Password of asm disk; Admin123
Install the ASM disk Management Pack
# #
# install ASM disk management package #
# #
File location:
Cd / soft/grid/rpm
Rpm-ivh cvuqdisk-1.0.9-1.rpm
Transfer to RAC-B installation
Install softwar
# # #
# install software #
# # #
Su-grid
Export LANG=C
Export DISPLAY= local IP address: 0.0
. / runInstaller
If the following figure appears, just install java.
Yum install-y java*
Set mail notification to skip
Choose to configure oracle cluster
Select Advanced installation Settings (Note: advanced installation must be selected, otherwise the software cannot be installed on ASM disk)
Set language
Configure cluster name, scanip cluster IP
Configure add RAC Node
Note: both RAC-An and RAC-B nodes need to click SSH Connectiv and then click Setup.
If Next clicks to report the following error, parse the HOSTS and set the host name in the software to lowercase.
Set network card properties
Set installation path and select ASM disk
Select ASM disk
If ru cannot retrieve it, click the Change Discovery Path button and set the path to / dev/*.
Select parameters
Set ASM disk password
Set IPMI Intelligent Management Skip
Set the ASM disk management group to keep the default
Set installation location
Set the inventory directory to keep the default
Find missing dependency packages
Check the box I know and then install
Execute script r
After the installation is complete, it is prompted to run two scripts on the RAC-A machine, and then run on the RAC-B machine after the full execution, otherwise the ASM establishment fails.
Execute under root view
/ u01/app/11.2.0.0/oraInventory/orainstRoot.sh
/ u01/app/11.2.0.0/oracle/product/db_1/root.sh
Remove nod
Note: if there is a problem with cluster creation, or if you remove the node, use the following code to remove the node.
Cd / u01/app/11.2.0.0/oracle/product/db_1/crs/install
. / rootcrs.pl-deconfig-force-verbose
Note: this error can be ignored as a cluster verification failure
Click yes to complete the installation
17. Check which node ASM is running on
# #
# check which node ASM is running on #
# #
Env | grep ASM
Ps-ef | grep ASM
Grid 1713 1 0 22:34? 00:00:00 asm_pmon_+ASM1
Grid 1715 1 0 22:34? 00:00:00 asm_psp0_+ASM1
Grid 1717 1 1 22:34? 00:00:02 asm_vktm_+ASM1
Node 2
Asmca disk Management
# #
# Asmca disk Management #
# #
Installation check
Use grid users:
$crsctl start crs
$crsctl check crs
$crsctl start cluster
$crsctl start cluster
$crs_stat-t
View cluster services
$crs_stat-t
Start and stop:
. / crsctl stop cluster
. / crsctl stop crs
Create an ASM disk
[grid@RAC-A grid] $export LANG=CN
[grid@RAC-A grid] $export DISPLAY=192.168.30.12:0.0
[grid@RAC-A grid] $asmca
Create ASM disk Flash, Data
# #
# create ASM disk Flash, Data #
Create Flash, Date disk
Click Create, go to the disk setup page, enter the disk name, and select the disk.
Flash creation completed (storing archives)
Create a Data ASM disk
ASM disk configuration complete
18. Install oracle
# #
# install oracle #
# #
Install oracle database software
Decompression package
Tar-xvf Oracle_linux_11.2.0.4_database.tar
Switch to Oracle user
Su-oracle
Cd / soft/database
. / runInstaller
Remove email notification
Skip upgrad
Choose to install only database software
Select the server version
To add a node, click on the SSH connection to enter the oacle password Note: the SSH service will copy the file to RAC-B
Select Advanced installation
Select Enterprise Edition Database
Select the directory where the software is installed
Set up system group
Prerequisite check
Choose to ignore all
Click next and click YES
Click install to install the software
Wait for the installation to complete
RAC-A, RAC-B execute script
/ u01/app/oracle/product/11.2.0/db1/root.sh
Software installation completed
19. Build a database
#
# build a database #
Su-oracle
Export LANG=CN
Export DISPLAY=192.168.30.12:0.0
Dbca
Establish RAC database
Set up a database
Select General Service
1. Fill in test for the database name and click select all
two。 Remove configure enterprise manager and do not remove it if necessary
3. Sys/system user password settings are the same
4. [grid@node1] $id oracle
Uid=1200 (oracle) gid=1000 (oinstall) groups=1000 (oinstall), 1100 (dba)
[grid@node1 ~] $su-
Password:
[root@node1] # usermod-a-G asmdba oracle
[root@node1 ~] # id oracle
Uid=1200 (oracle) gid=1000 (oinstall) groups=1000 (oinstall), 1100 (dba), 1302 (asmdba)
Both nodes
Click cancel to re-dbca
5. Remove special fast recovery area. If you need this function, you don't have to remove it.
6. Remove all check boxes
7. Select the ZHS16GBK-GBK 16-bit simplified chinese character set
8. Start installing the database
9. After the installation is complete, check to see if the installation is successful
Check whether oracle is in the asmadmin permission group
[root@orcl2 ~] # id oracle
Uid=500 (oracle) gid=501 (oinstall) groups=501 (oinstall), 502,503 (oper), 504 (asmadmin), 506 (asmdba)
If you don't have asmadmin permission, you need to join.
[root@orcl2] # usermod-G asmadmin-an oracle
Dbca
Ssh racl1 date
Ssh racl1-priv date
Ssh racl2 date
Ssh racl2-priv date
Chown-R oracle:oinstall / soft/database/
Chmod-R 775 / soft/
Sql > show user; to view the current user
Sql > show parameter instance_name; to view the current database instance
[Zhou Shuxuan 1] ISCSI server IP address
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.