In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Installation environment description and virtual machine regulation:
Installation environment
Host operating system: windows 10
Virtual machine VMware15: two CentOS-7.6
Oracle Database software: Oracle11gR2 (11.2.0.1.0)
Cluster software: Oracle grid infrastructure 11gR2 (11.2.0.1.0)
Shared storage: ASM
Oracle Portal https://www.oracle.com/technetwork/database/enterprise-edition/downloads/112010-linx8664soft-100572.html
Virtual machine planning
When installing a virtual machine, be sure to assign two network cards, one in Host Only mode for the communication between the two virtual machine nodes, and the other in NAT mode to connect to the external network. Here, the virtual machine automatically assigns IP (it is better to configure static in order to save trouble in the future). The memory and swap of each host is planned to be at least 2.5G. The hard disk plan is: boot 500m, other space allocation is managed by LVM, LVM is divided into 2.5G swap, the other is /. The hostname is set to rac1 and rac2 (note that the two virtual machines had better be on different hard drives, otherwise it will be very difficult, otherwise it will be extremely painful! Due to the use of shared storage ASM, and the need for shared space for registration disk (OCR) and voting disk (votingdisk) to build a cluster. VMware creates shared storage method:
Enter the VMware installation directory and issue the cmd command:
E:\ Program Files (x86)\ VMware\ VMware Workstationvmware-vdiskmanager.exe-c-s 1000Mb-a lsilogic-t 2 F:\ asm\ ocr.vmdkvmware-vdiskmanager.exe-c-s 1000Mb-a lsilogic-t 2 F:\ asm\ ocr2.vmdkvmware-vdiskmanager.exe-c-s 1000Mb-a lsilogic-t 2 F:\ asm\ votingdisk.vmdkvmware-vdiskmanager.exe-c-s 20000Mb-a lsilogic-t 2 F:\ asm\ data.vmdkvmware-vdiskmanager.exe-c-s 10000Mb-a lsilogic-t 2 F:\ asm\ backup.vmdk
Two 1G trays, a 1G voting disk, a 20G data disk and a 10G backup disk are created.
3. Add a disk to the virtual machine, select the virtual machine and then edit the configuration, add the disk and select the virtual disk you just added, approximately as follows (both execute)
Virtual machine operating system configuration (not specified that both are executed)
Turn off the firewall
View firewall status
# firewall-cmd-state
Stop firewall
# systemctl stop firewalld.service
Disable firewall boot
# systemctl disable firewalld.service creates the necessary users, groups, and directories And authorize # groupadd-g 1000 oinstall#groupadd-g 1020 asmadmin#groupadd-g 1021 asmdba#groupadd-g 1022 asmoper#groupadd-g 1031 dba#groupadd-g 1032 oper#useradd-u 1100-g oinstall-G asmadmin,asmdba,asmoper,oper,dba grid#useradd-u 1101-g oinstall-G dba,asmdba Oper oracle#mkdir-p / u01/app/11.2.0/grid#mkdir-p / u01/app/grid#mkdir / u01/app/oracle#chown-R grid:oinstall / u01#chown oracle:oinstall / u01/app/oracle#chmod-R 775 / u01 / system file setup
a. Modify the kernel configuration by adding the following information at the end of the file / etc/sysctl.conf
# vi / etc/sysctl.conf
Kernel.msgmnb = 65536
Kernel.msgmax = 65536
Kernel.shmmax = 68719476736
Kernel.shmall = 4294967296
Fs.aio-max-nr = 1048576
Fs.file-max = 6815744
Kernel.shmall = 2097152
Kernel.shmmax = 1306910720
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
Net.ipv4.tcp_wmem = 262144 262144 262144
Net.ipv4.tcp_rmem = 4194304 4194304 4194304
Make the configuration effective
# sysctl-p
b. Configure shell restrictions for oracle and grid users, and add the following at the end of the file / etc/security/limits.conf
# vi / etc/security/limits.conf
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
c. Configure login by adding the following at the end of the file / etc/pam.d/login
# vi / etc/pam.d/login
Session required pam_limits.so
d. Modify the operating system release name, comment the original contents of the file / etc/centos-release, and add redheat-7 (because oracle does not support centos7 installation)
e. Install dependent packages using installation media as the yum source
Configure the local source by yourself:
# mount / dev/sr0 / mnt/cdrom/
# vi / etc/yum.repos.d/dvd.repo
[dvd]
Name=dvd
Baseurl= file:///mnt/cdrom
Gpgcheck=0
Enabled=1
# yum clean all
# yum makecache
# yum install gcc gcc-c++ glibc glibc-devel ksh libgcc libstdc++ libstdc++-devel* make sysstat
4. Configure IP and hosts, hostname (the hostname here is set to rac1 and rac2,ip automatically allocated by the virtual machine when the system is installed, so only hosts is allocated), and add the following at the end of the file / etc/hosts
# vi / etc/hosts
192.168.149.129 rac1
192.168.149.201 rac1-vip
192.168.96.128 rac1-priv
192.168.149.130 rac2
192.168.149.202 rac2-vip
192.168.96.129 rac2-priv
192.168.149.100 scan-ip
5. Configure grid and oracle user environment variables
Oracle_sid needs to be modified according to different nodes.
# su-grid
$vi .bash _ profile
Export TMP=/tmp
Export TMPDIR=$TMP
Export ORACLE_SID=+ASM1 # RAC1 uses this configuration
Export ORACLE_SID=+ASM2 # RAC2 uses this configuration
Export ORACLE_BASE=/u01/app/grid
Export ORACLE_HOME=/u01/app/11.2.0/grid
Export PATH=/usr/sbin:$PATH
Export PATH=$ORACLE_HOME/bin:$PATH
Export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
Export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
Umask 022
It should be noted that ORACLE_UNQNAME is the database name (here you use orcl). When you create a database, specifying multiple nodes will create multiple instances. ORACLE_SID refers to the database instance name.
# su-oracle
$vi .bash _ profile
Export TMP=/tmp
Export TMPDIR=$TMP
Export ORACLE_SID=orcl1 # RAC1 uses this configuration
Export ORACLE_SID=orcl2 # RAC2 uses this configuration
Export ORACLE_UNQNAME=orcl
Export ORACLE_BASE=/u01/app/oracle
Export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
Export TNS_ADMIN=$ORACLE_HOME/network/admin
Export PATH=/usr/sbin:$PATH
Export PATH=$ORACLE_HOME/bin:$PATH
Export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
$source .bash _ profile makes the configuration file effective (all environment variables are appended on the last line, and source is required to make the configuration effective after saving)
7. Configure ssh mutual trust for oracle and grid users
# su-oracle$mkdir ~ / .ssh$chmod 755 .ssh $/ usr/bin/ssh-keygen-t rsa$/usr/bin/ssh-keygen-t dsa the following steps are performed only on node 1 Aggregate all key files into one total authentication file $ssh rac1 cat ~ / .ssh/id_rsa.pub > > authorized_keys$ssh rac2 cat ~ / .ssh/id_rsa.pub > > authorized_keys$ssh rac1 cat ~ / .ssh/id_dsa.pub > > authorized_keys$ssh rac2 cat ~ / .ssh/id_dsa.pub > > authorized_keys$ cd ~ / .ssh/$ scp authorized_keys rac2:~/.ssh/ copy the complete key to node 2 [oracle@rac2 .ssh] Chmod 600authorized_keys Note here is to log in to Node 2 to modify permissions below step 2 all nodes need to perform Otherwise, the subsequent installation will report an error, which is very important, and the result should be a time of $ssh rac1 date$ssh rac2 date$ssh rac1-priv date$ssh rac2-priv date
The mutual trust of grid can be handled by referring to oracle users.
8. Configure bare disk
(1) when fdisk-l looks at the disk through this command, you can see the disk information we added later, from sdb to sdf.
(2) Partition and format the disk. Because it is a shared disk, it only needs to be executed on one node.
Format on node 1, taking / dev/sdb as an example:
# fdisk / dev/sdb
The number of cylinders for this disk is set to 3824.
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-3824, default 1):
Using default value 1
Last cylinder or + size or + sizeM or + sizeK (1-3824, default 3824):
Command (m for help): W
The partition table has been altered!
Calling ioctl () to re-read partition table.
Syncing disks.
After formatting, you get the following partitions
# ls / dev/sd*
/ dev/sda / dev/sda2 / dev/sdb1 / dev/sdc1 / dev/sdd1 / dev/sde1 / dev/sdf1 / dev/sda1 / dev/sdb / dev/sdc / dev/sdd / dev/sde / dev/sdf
(3) add bare devices to the node, and note that both nodes need to execute
# vi / etc/udev/rules.d/99-oracle-asmdevices.rulesACTION== "add", KERNEL== "sdb1", RUN+= "/ bin/raw / dev/raw/raw1% N" ACTION== "add", KERNEL== "sdc1", RUN+= "/ bin/raw / dev/raw/raw2% N" ACTION== "add", KERNEL== "sdd1", RUN+= "/ bin/raw / dev/raw/raw3% N" ACTION== "add", KERNEL== "sde1", RUN+= "/ bin/raw / dev/raw/raw4% N" ACTION== "add", KERNEL== "sdf1" RUN+= "/ bin/raw / dev/raw/raw5% N" KERNEL== "raw [1]", MODE= "0660", OWNER= "grid", GROUP= "asmadmin" KERNEL== "raw [2]", MODE= "0660", OWNER= "grid", GROUP= "asmadmin" KERNEL== "raw [3]", MODE= "0660", OWNER= "grid", GROUP= "asmadmin" KERNEL== "raw [4]", MODE= "0660", OWNER= "grid", GROUP= "asmadmin" KERNEL== "raw [5]", MODE= "0660", OWNER= "grid", GROUP= "GROUP="
(4) start the bare device and execute it on both nodes
# start_udev
(5) View bare devices, both nodes need to view
# raw-qa
/ dev/raw/raw1: bound to major 8, minor 17
/ dev/raw/raw2: bound to major 8, minor 33
/ dev/raw/raw3: bound to major 8, minor 49
/ dev/raw/raw4: bound to major 8, minor 65
/ dev/raw/raw5: bound to major 8, minor 81
9. Mount the installation software folder
Here, the host windows system enables folder sharing, decompresses the compressed package and mounts it for the virtual machine. The username and password directory here is for reference only.
Mkdir-p / home/grid/db
Mount-t cifs-o username=share,password=123456 / / 192.168.248.1/DB / home/grid/db
Mkdir-p / home/oracle/db
Mount-t cifs-o username=share,password=123456 / / 192.168.248.1/DB / home/oracle/db
10. Install cvuqdisk for environmental check (dual machine)
# cd / home/grid/db/rpm#rpm-ivh cvuqdisk-1.0.7-1.rpm
11. Run cvu manually using the validator to verify the Oracle cluster requirements
# su-grid$cd / home/grid/db/$./runcluvfy.sh stage-pre crsinst-n rac1,rac2-fixup-verbose
Note: I have seen a lot of 32-bit (i386 or i686) software packages fail verification here. I directly ignore it and do not deal with it, so it does not affect the use of the system, so I can ignore it. In addition, the error reports of NTP and pdksh can also be ignored, and the glibc does not exist at the time of verification, so I can only repackage and download the package from the Internet.
Glibc-2.17-260.el7_6.4.i686.rpm, direct installation has dependencies
Error: Failed dependencies:
Libfreebl3.so is needed by glibc-2.17-260.el7_6.4.i686
Libfreebl3.so (N × × AWHASH_3.12.3) is needed by glibc-2.17-260.el7_6.4.i686
Baidu query needs to be packaged with nss-softokn-freebl-3.36.0-5.el7_5.i686.rpm, which directly reports an error:
Error: Failed dependencies:
Libc.so.6 is needed by nss-softokn-freebl-3.36.0-5.el7_5.i686
Libc.so.6 (GLIBC_2.0) is needed by nss-softokn-freebl-3.36.0-5.el7_5.i686
Libc.so.6 (GLIBC_2.1) is needed by nss-softokn-freebl-3.36.0-5.el7_5.i686
Libc.so.6 (GLIBC_2.1.3) is needed by nss-softokn-freebl-3.36.0-5.el7_5.i686
Libc.so.6 (GLIBC_2.3) is needed by nss-softokn-freebl-3.36.0-5.el7_5.i686
Libc.so.6 (GLIBC_2.3.4) is needed by nss-softokn-freebl-3.36.0-5.el7_5.i686
Libc.so.6 (GLIBC_2.4) is needed by nss-softokn-freebl-3.36.0-5.el7_5.i686
Libdl.so.2 is needed by nss-softokn-freebl-3.36.0-5.el7_5.i686
Libdl.so.2 (GLIBC_2.0) is needed by nss-softokn-freebl-3.36.0-5.el7_5.i686
Libdl.so.2 (GLIBC_2.1) is needed by nss-softokn-freebl-3.36.0-5.el7_5.i686
Solved by installing 2 packages together:
# rpm-ivh glibc-2.17-260.el7_6.4.i686.rpm nss-softokn-freebl-3.36.0-5.el7_5.i686.rpm
Preparing... # # [100%]
Updating / installing...
1:nss-softokn-freebl-3.36.0-5.el7_5## [50%]
2:glibc-2.17-260.el7_6.4 # # [100%]
To install Grid, you only need to execute it on one node, and the other node synchronizes automatically.
1. Installation proc
(1) enable installation (here Xmanager is used for remote installation for better availability. Refer to https://www.cnblogs.com/songyuejie/p/6372534.html for configuration)
# xhost + # su-grid$export DISPLAY=Windows host IP:0.0$ cd cd / home/grid/db/$./runInstaller
Graphical process
Skip updates-install Cluster
Custom installation
Install voice default English
Define the cluster name. SCAN Name is unchecked for the scan-ip,GNS defined in hosts.
There is only the first node rac1 in the interface. Click "Add" to add the second node rac2. The information can be filled in in rac1.
Select the network card, which is fine by default.
Configure ASM. Here, select the bare disk raw1,raw2,raw3 configured above. The redundancy mode is External, that is, no redundancy. Because it is not used, it is also possible to select only one device. The equipment here is used to make OCR registration disk and votingdisk voting disk.
To configure an ASM instance, you need to set a password for sys users with sysasm permissions and asmsnmp users with sysdba permissions. Set a unified password here and click OK.
Do not choose intelligent management
Check the grouping of permissions for ASM instances
Select the grid software installation path and base directory, which is fine by default here.
Select the grid installation inventory directory
There are errors detected by ntp and other scripts in the environment test, and choose to ignore all of them.
Installation summary, click install and start installation and automatically copy to rac2
Installation of grid is complete, prompting root users to execute scripts orainstRoot.sh and root.sh in turn (be sure to execute the script on other nodes only after rac1 has finished)
Rac1:
# / u01/app/oraInventory/orainstRoot.sh
Changing permissions of / u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.
Changing groupname of / u01/app/oraInventory to oinstall.
The execution of the script is complete.
# / u01/app/11.2.0/grid/root.sh
Performing root user operation for Oracle 11g
The following environment variables are set as:
ORACLE_OWNER= grid
ORACLE_HOME= / u01/app/11.2.0/grid
Enter the full pathname of the local bin directory: [/ usr/local/bin]: (enter)
Copying dbhome to / usr/local/bin...
Copying oraenv to / usr/local/bin...
Copying coraenv to / usr/local/bin...
Creating / etc/oratab file...
Entries will be added to the / etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Using configuration parameter file: / u01/app/11.2.0/grid/crs/install/crsconfig_params
Creating trace directory
User ignored Prerequisites during installation
OLR initialization-successful
Root wallet
Root wallet cert
Root cert export
Peer wallet
Profile reader wallet
Pa wallet
Peer wallet keys
Pa wallet keys
Peer cert request
Pa cert request
Peer cert
Pa cert
Peer root cert TP
Profile reader root cert TP
Pa root cert TP
Peer pa cert TP
Pa peer cert TP
Profile reader pa cert TP
Profile reader peer cert TP
Peer user cert
Pa user cert
Adding Clusterware entries to upstart
CRS-2672: Attempting to start 'ora.mdnsd' on' rac1'
CRS-2676: Start of 'ora.mdnsd' on' rac1' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on' rac1'
CRS-2676: Start of 'ora.gpnpd' on' rac1' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on' rac1'
CRS-2672: Attempting to start 'ora.gipcd' on' rac1'
CRS-2676: Start of 'ora.cssdmonitor' on' rac1' succeeded
CRS-2676: Start of 'ora.gipcd' on' rac1' succeeded
CRS-2672: Attempting to start 'ora.cssd' on' rac1'
CRS-2672: Attempting to start 'ora.diskmon' on' rac1'
CRS-2676: Start of 'ora.diskmon' on' rac1' succeeded
CRS-2676: Start of 'ora.cssd' on' rac1' succeeded
ASM created and started successfully.
Disk Group OCR created successfully.
Clscfg:-install mode specified
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp' root'..
Operation successful.
CRS-4256: Updating the profile
Successful addition of voting disk 496abcfc4e214fc9bf85cf755e0cc8e2.
Successfully replaced voting disk group with + OCR.
CRS-4256: Updating the profile
CRS-4266: Voting file (s) successfully replaced
STATE File Universal Id File Name Disk group
ONLINE 496abcfc4e214fc9bf85cf755e0cc8e2 (/ dev/raw/raw1) [OCR]
Located 1 voting disk (s).
CRS-2672: Attempting to start 'ora.asm' on' rac1'
CRS-2676: Start of 'ora.asm' on' rac1' succeeded
CRS-2672: Attempting to start 'ora.OCR.dg' on' rac1'
CRS-2676: Start of 'ora.OCR.dg' on' rac1' succeeded
Configure Oracle Grid Infrastructure for a Cluster... Succeeded
Run 2 scripts in rac2 in the same way. Click the ok button in the image above and then perform the next step, ignoring the error report to complete the installation.
two。 Resource check after installing grid
# su-grid$ crsctl check crs
CRS-4638: Oracle High Availability Services is online
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online12345
Check Clusterware resources
$crs_stat-t-v
Name Type R/RA F/FT Target State Host
Ora....ER.lsnr ora....er.type 0/5 0/ ONLINE ONLINE rac1
Ora....N1.lsnr ora....er.type 0/5 0/0 ONLINE ONLINE rac1
Ora.OCR.dg ora....up.type 0/5 0/ ONLINE ONLINE rac1
Ora.asm ora.asm.type 0/5 0/ ONLINE ONLINE rac1
Ora.cvu ora.cvu.type 0/5 0/0 ONLINE ONLINE rac1
Ora.gsd ora.gsd.type 0/5 0/ OFFLINE OFFLINE
Ora....network ora....rk.type 0/5 0/ ONLINE ONLINE rac1
Ora.oc4j ora.oc4j.type 0/1 0/2 ONLINE ONLINE rac1
Ora.ons ora.ons.type 0/3 0/ ONLINE ONLINE rac1
Ora....SM1.asm application 0/5 0/0 ONLINE ONLINE rac1
Ora....C1.lsnr application 0/5 0/0 ONLINE ONLINE rac1
Ora.rac1.gsd application 0/5 0/0 OFFLINE OFFLINE
Ora.rac1.ons application 0/3 0/0 ONLINE ONLINE rac1
Ora.rac1.vip ora....t1.type 0/0 0/0 ONLINE ONLINE rac1
Ora....SM2.asm application 0/5 0/0 ONLINE ONLINE rac2
Ora....C2.lsnr application 0/5 0/0 ONLINE ONLINE rac2
Ora.rac2.gsd application 0/5 0/0 OFFLINE OFFLINE
Ora.rac2.ons application 0/3 0/0 ONLINE ONLINE rac2
Ora.rac2.vip ora....t1.type 0/0 0/0 ONLINE ONLINE rac2
Ora.scan1.vip ora....ip.type 0/0 0/0 ONLINE ONLINE rac1
Check cluster nodes
$olsnodes-nrac1 1rac2 2
Check the Oracle TNS listener process on both nodes
$ps-ef | grep lsnr | grep-v 'grep' | grep-v' ocfs' | awk'{print$9} 'LISTENER_SCAN1LISTENER
Confirm the Oracle ASM function for the Oracle Clusterware file:
"if the OCR and voting disk files are installed on Oracle ASM, as the owner of the Grid Infrastructure installation, use the following command syntax to confirm that the installed Oracle ASM is currently running:"
$srvctl status asm-aASM is running on rac2,rac1ASM is enabled.
3. Create ASM disk groups for data and fast recovery (only performed in rac1)
# su-grid $asmca
Here you can see that the OCR disk configured when grid is installed already exists
Click create, add data disk, and use bare disk raw4
Also create a FRA disk, using a bare disk raw5
The case of ASM disk groups
An example of ASM
Install the Oracle database software (RAC)
1. Installation process (can only be performed in rac1, graphical settings refer to asm)
# su-oracle
$cd db/database
$. / runInstaller
Enter the graphical interface, skip the update option, and then choose to install only the database software
Select the Oracel Real Application Clusters database installation button (default) and click the select all button to make sure all nodes are checked.
Default English installation
Choose to install Enterprise Edition softwar
Select the path to install Oracle software, where ORACLE_BASE,ORACLE_HOME is previously configured. Default is fine.
Oracle permission is granted to user groups, which is available by default
Pre-check before installation, ignoring all check exception items
Displays a summary of the installation of RAC
Start the installation and automatically copy to other nodes
Exception solution for the installation process:
/ u01/app/oracle/product/11.2.0/dbhome_1/sysman/lib//libnmectl.a (nmectlt.o): In function nmectlt_genSudoProps':nmectlt.c: (.text + 0x76): undefined reference toB_DestroyKeyObject'
Nmectlt.c: (.text + 0x7f): undefined reference toB_DestroyKeyObject' nmectlt.c: (.text + 0x88): undefined reference toB_DestroyKeyObject'
Nmectlt.c: (.text + 0x91): undefined reference to `BackDestroyKeyObject`
INFO: collect2: error: ld returned 1 exit status
INFO: / u01/app/oracle/product/11.2.0/dbhome_1/sysman/lib/ins_emagent.mk:176: recipe for target'/ u01 apprenticeship oracleUniverse product11.2.0Companydbhomeowners 1andsysmanUniplemdctl'failed
Make [1]: Leaving directory'/ u01 apprenticeship oracleUniverse product11.2.0 Universe dbhomeowners 1 Greater sysman LIBT'
INFO: / u01/app/oracle/product/11.2.0/dbhome_1/sysman/lib/ins_emagent.mk:52: recipe for target 'emdctl' failed
INFO: make [1]: [/ u01/app/oracle/product/11.2.0/dbhome_1/sysman/lib/emdctl] Error 1
INFO: make: [emdctl] Error 2
INFO: End output from spawned process.
INFO:--
INFO: Exception thrown from action: make
Exception Name: MakefileException
Exception String: Error in invoking target 'agent nmhs' of makefile' / u01 apprenticespact oracleUniverse product11.2.0 apprenticeships dbhomeowners 1OnOnSysmanOnSIMANGENSIMANGEN. See'/ u01/app/oraInventory/logs/installActions2017-05-02. 12-37-15PM.log' for details.
Exception Severity: 1
Scheme:
Modify the compilation parameters of "emdctl", edit the "/ u01/app/oracle/product/11.2.0/dbhome_1/sysman/lib/ins_emagent.mk" file, and set the
171 # =
172 # emdctl
173 # =
one hundred and seventy four
175USD (SYSMANBIN) emdctl:
$176B (MK_EMAGENT_NMECTL)
Change to
171 # =
172 # emdctl
173 # =
one hundred and seventy four
175USD (SYSMANBIN) emdctl:
176USD (MK_EMAGENT_NMECTL)-lnnz11
Then click retry
NFO: Exception thrown from action: make
Exception Name: MakefileException
Exception String: Error in invoking target 'irman ioracle' of makefile' / u01 apprenticespact oracle.product11.2.0According to dbAction1According to rdbms. See'/ u01/app/oraInventory/logs/installActions2019-04-30mm 03-12-13PM. Log 'for details.
The solution is as follows:
Cd $ORACLE_HOME/rdbms/admin
/ usr/bin/make-f $ORACLE_HOME/rdbms/lib/ins_rdbms.mk irman
Then click retry
After installation, execute the script with the root user on each node
# / u01/app/oracle/product/11.2.0/db_1/root.sh
Performing root user operation for Oracle 11g
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= / u01/app/oracle/product/11.2.0/db_1
Enter the full pathname of the local bin directory: [/ usr/local/bin]: (enter)
The contents of "dbhome" have not changed. No need to overwrite.
The contents of "oraenv" have not changed. No need to overwrite.
The contents of "coraenv" have not changed. No need to overwrite.
Entries will be added to the / etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Finished product-specific root actions.
Error in the execution process:
CRS-4124: Oracle High Availability Services startup failed.
CRS-4000: Command Start failed, or completed with errors.
Ohasd failed to start: Inappropriate ioctl for device
Ohasd failed to start at / u01/app/11.2.0/grid/crs/install/rootcrs.pl line 443.
This is the classic problem of 11.0.2.1, a bug, the solution is also very simple, open 2 windows a run root.sh in the execution of the root.sh command appears Adding daemon to inittab in the other window repeatedly execute / bin/dd if=/var/tmp/.oracle/npohasd of=/dev/null bs=1024 count=1
Until / bin/dd: opening` / var/tmp/.oracle/npohasd': No such file or directory does not appear
Don't forget to delete the configuration before re-executing root.sh: / u01/app/11.2.0/grid/crs/install/roothas.pl-deconfig-force-verbose
Reference:
Http://blog.csdn.net/tianlesoftware/article/details/8207629
Complete the database software installation here
two。 Create a cluster database
Create a RAC database with oracle user execution dbca on node rac1 (before drawing settings reference)
# su-oracle
$dbca
If you see the deployment RAC installation here, the RAC may not be started, and the grid user checks the RAC resources.
$crsctl check crs
CRS-4639: Could not contact Oracle High Availability Services
$crs_stat-t-v
CRS-0184: Cannot communicate with the CRS daemon.
Seeing that there is no starting point, you can manually pull the service under the root user.
# / etc/init.d/init.ohasd run > / dev/null 2 > & 1 lsdg-check the current mount status
Asmcmd > mount DATA mounts a disk named data)
Set the ASM password to oracle_4U
("ORA-01031: insufficient privileges" will be reported here.
Delete the file / u01/app/11.2.0/grid/dbs/orapw+ASM first, and then generate a new file with the password of oracle_4U
[grid@node1 bin] $orapwd file=/u01/app/11.2.0/grid/dbs/orapw+ASM password=oracle_4U
[grid@node1 dbs] $scp orapw+ASM Node2:/u01/app/11.2.0/grid/dbs/-- copy to another node
[grid@node1 bin] $sqlplus / as sysasm
SQL > create user asmsnmp identified by oracle_4U
SQL > grant sysdba to asmsnmp
Then click retry)
Specify the data flashback area, select the previously created FRA disk group, and do not open archiving
Component selection, default
Select character set AL32UTF8
Select default data store information
To start creating the database, check the script that generates the database
Summary information of the database
Start installation
Possible problems during installation: ORA-12547: TNS:lost contact
Check whether the file size of $ORACLE_HOME/bin/oracle and $ORACLE_HOME/rdbms/lib/config.o is 0
If the size is 0, you need to recompile the oracle software:
[oracle@normal backup] $relink all
Writing relink log to: / u01/app/oracle/product/11.2.0/db_1/install/relink.log
Complete the database instance installation
RAC maintenance
1. Check the service status (gsd is to be compatible with 9iJI 10G and do not start again after 10G, ignore offline)
# su-grid
$crs_stat-t
Name Type Target State Host
Ora.DATA.dg ora....up.type ONLINE ONLINE rac1
Ora.FRA.dg ora....up.type ONLINE ONLINE rac1
Ora....ER.lsnr ora....er.type ONLINE ONLINE rac1
Ora....N1.lsnr ora....er.type ONLINE ONLINE rac1
Ora.OCR.dg ora....up.type ONLINE ONLINE rac1
Ora.asm ora.asm.type ONLINE ONLINE rac1
Ora.cvu ora.cvu.type ONLINE ONLINE rac1
Ora.gsd ora.gsd.type OFFLINE OFFLINE
Ora....network ora....rk.type ONLINE ONLINE rac1
Ora.oc4j ora.oc4j.type ONLINE ONLINE rac1
Ora.ons ora.ons.type ONLINE ONLINE rac1
Ora.orcl.db ora....se.type ONLINE ONLINE rac1
Ora....SM1.asm application ONLINE ONLINE rac1
Ora....C1.lsnr application ONLINE ONLINE rac1
Ora.rac1.gsd application OFFLINE OFFLINE
Ora.rac1.ons application ONLINE ONLINE rac1
Ora.rac1.vip ora....t1.type ONLINE ONLINE rac1
Ora....SM2.asm application ONLINE ONLINE rac2
Ora....C2.lsnr application ONLINE ONLINE rac2
Ora.rac2.gsd application OFFLINE OFFLINE
Ora.rac2.ons application ONLINE ONLINE rac2
Ora.rac2.vip ora....t1.type ONLINE ONLINE rac2
Ora.scan1.vip ora....ip.type ONLINE ONLINE rac1
two。 Check cluster status
$srvctl status database-d orcl Instance orcl1 is running on node rac1 Instance orcl2 is running on node rac2
3. Check CRS status
Local
$crsctl check crsCRS-4638: Oracle High Availability Services is onlineCRS-4537: Cluster Ready Services is onlineCRS-4529: Cluster Synchronization Services is onlineCRS-4533: Event Manager is online
Cluster
$crsctl check clusterCRS-4537: Cluster Ready Services is onlineCRS-4529: Cluster Synchronization Services is onlineCRS-4533: Event Manager is online
4. View the configuration information of nodes in the cluster
$olsnodesrac1rac2 $olsnodes-nrac1 1rac2 2$ olsnodes-n-I-s-trac1 1 rac1-vip Active Unpinnedrac2 2 rac2-vip Active Unpinned
5. View the voting disk information of Clusterware
. $crsctl query css votediskSTATE File Universal Id File Name Disk group 1. ONLINE 496abcfc4e214fc9bf85cf755e0cc8e2 (/ dev/raw/raw1) [OCR] Located 1 voting disk (s)
6. View cluster SCAN VIP information (see example)
$srvctl config scanSCAN name: scan-ip, Network: 1/192.168.248.0/255.255.255.0/eth0SCAN VIP name: scan1, IP: / scan-ip/192.168.248.110$ srvctl config scan_listenerSCAN Listener LISTENER_SCAN1 exists. Port: TCP:1521
7. Start and stop cluster database
Database startup and shutdown of the whole cluster
Access to grid users
$srvctl stop database-d orcl$ srvctl status database-d orcl$ srvctl start database-d orcl closes all nodes, enters root user shuts down all nodes # / u01/app/11.2.0/grid/bin/crsctl stop crs
Only the current node is actually closed
Exception in the startup process (reducing memory to restart the virtual machine due to insufficient memory):
Error report: ORA-00845: MEMORY_TARGET not supported on this system
$srvctl start database-d orcl
PRCR-1079: Failed to start resource ora.orcl.db
ORA-00845: MEMORY_TARGET not supported on this system
CRS-2674: Start of 'ora.orcl.db' on' rac1' failed
CRS-2632: There are no more servers to try to place resource 'ora.orcl.db' on that would satisfy its placement policy
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux-x86_64 Error: 2: No such file or directory
Process ID: 0
Session ID: 0 Serial number: 0
ORA-00845: MEMORY_TARGET not supported on this system
CRS-2674: Start of 'ora.orcl.db' on' rac2' failed
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux-x86_64 Error: 2: No such file or directory
Process ID: 0
Session ID: 0 Serial number: 0
Solution:
Increase / dev/shm to make it larger than the system parameters, because the system parameters cannot be obtained after downtime, you can set a total memory size here:
# cat / etc/fstab | grep tmpfs
Tmpfs / dev/shm tmpfs defaults,size=4G 0 0
# mount-o remount,size=4G / dev/shm
# df-h | grep shm
Tmpfs 4.0G 0 4.0G 0% / dev/shm
Then restart, and then go to the database to modify the memory
$sqlplus / as sysdba
SQL > show parameter target;, where / dev/shm must be greater than MEMORY_TARGET. The following two values need to be modified, and the database needs to be restarted.
Sql > alter system set memory_max_target=12288M scope=spfile
Sql > alter system set memory_target=12288M scope=spfile
EM management (oracle users, which can be executed by one of the nodes, access address https:// node IP:1158/em username and password using the system set above, etc.)
$emctl status dbconsole$ emctl start dbconsole$ emctl stop dbconsole
Local sqlplus connection
Install oracle client version and modify tsnames.ora
D:\ develop\ app\ orcl\ product\ 11.2.0\ client_1\ network\ admin\ tsnames.ora
Add
ORCL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.248.110) (PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
) 12345678910
The HOST here says scan-ip.
Sqlplus sys/oracle@RAC_ORCL as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Thursday April 14 14:37:30 2016
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connect to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0-64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP
Data Mining and Real Application Testing options
SQL > select instance_name, status from v$instance
INSTANCE_NAME STATUS
Orcl1 OPEN
When the second command line window connection is opened, it is found that the instance is named orcl2. You can see that the addition of scan-ip can play the role of load balancing.
If there is an error when connecting: ORA-12545
Solution:
a. You can add dual-computer vip to the native hosts file
b. Or modify the listening configuration of the database
SQL > show parameter local
NAME TYPE VALUE
Local_listener string (ADDRESS= (PROTOCOL=TCP) (HOST=scan-vip) (PORT=1521))
Parallel_force_local boolean FALSE
Modify local_listener hostname to VIP-IP address
SQL > alter system set local_listener=' (ADDRESS= (PROTOCOL=TCP) (HOST= 192.168.149.202) (PORT=1521)) 'sid='orcl2'
System altered.
SQL > alter system set local_listener=' (ADDRESS= (PROTOCOL=TCP) (HOST= 192.168.149.201) (PORT=1521)) 'sid='orcl1'
System altered.
Disaster recovery drill (simulating stand-alone operation)
Reference documentation
Https://blog.csdn.net/yujiajia111/article/details/82998601
Reference documentation for this article:
Https://blog.csdn.net/u014595668/article/details/51160783
Https://www.cnblogs.com/lijiaman/p/7673795.html
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.