I. Software and Hardware configuration check 1. Check memory
#/Usr/contrib/bin/machinfo
CPU info:
4 Intel (r) itanium 2 9100 series Processors (1.59 GHz, 18 MB)
532 Mt/s bus, CPU version A1
8 logical processors (2 per socket) memory: 32737 MB (31.97 GB) firmware info:
Firmware revision: 04.11
Fp swa driver revision: 1.18
IPMI is supported on this system.
BMC firmware revision: 5.24 platform info:
Model: "IA64 HP Server rx6600"
Machine ID number: 85468ec4-4ed7-11de-b9fa-eb58278042cf
Machine serial number: sgh4917n5pos info:
Nodename: rx6600b
Release: HP-UX B .11.31
Version: U (unlimited-User License)
MACHINE: IA64
ID number: 2235993796
Vmunix _ release_version:
@ (#) $ Revision: vmunix: B .11.31 _ LR flavor = perf 2. Check the swap space
#/Usr/sbin/swapinfo-
KB kb PCT start/KB
Type avail used free used limit reserve pri name
Dev 8388608 0 8388608 0% 0-1/dev/vg00/lvol2
Reserve-579384-579384
Memory 31886172 4310692 27575480 for systems with less than 2 GB physical memory, set it to 2 times the physical memory. Corresponding to a system larger than 2 GB memory, set to the same size as physical memory. 3. Check temporary space
# BDF/tmp
Filesystem Kbytes used avail % used mounted on
/Dev/vg00/lvol4 2097152 548944 1536784 26%/tmp ensure at least 400 m, 1g recommended
If M is not available, you can set Oracle user environment variables to increase temporary space.
$ Oracle user executes VI ~ /. Profile, add
Export temp =/directory
Export tmpdir =/directory
You can expand the file system online. 4. Create an Oracle installation directory, including CRS (installed on shared storage)
# Lvcreate-L 15g-N lv_ora/dev/vg00
# Newfs-F vxfs/dev/vg00/rlv_ora
# Mkdir/Oracle
# Add automatic mounting for VI/etc/fstab
# Mount/oracle5: Check whether asynchronous I/O of raw devices is enabled
# Swlist | grep-I-e extsw-e gold-e qpk
Qpkbase B .11.31.0903.334a base quality pack bundle for HP-UX 11i V3, March 2009 # ll/dev/async (enabled by default)
CrW-RW-1 Bin 101 0x000000 Jun 9/dev/async not enabled
# Create/dev/async character device
/Sbin/mknod/dev/async C 101 0x0
Chown ORACLE: DBA/dev/async
Chmod 660/dev/async
# Use Sam to configure async driver in the kernel
=> Kernel configuration
=> Kernel
=> The driver is called 'asyncdsk'
Generate new kernel (generate new kernel)
Restart
# Shutdown-r-y 0
# Using Sam to set HP-UX Kernel Parameters
Max_async_ports = the processes value specified in the init. ora parameter + number of Oracle background processes
Aio_max_ops = 20486 by default. Check whether the system time is synchronized.
# Date
Check the date and time of each node and synchronize the node as much as possible. If not, use date mmddhhmiyy, for example, 0909102107 /09/09. You can set date for synchronization. 7. Check whether the specified connection exists.
CD/usr/lib
Ls libx *. SL
# Create an instance if it does not exist
CD/usr/libln-s libx11.3 libx11.sl
Ln-s libxie.2 libxie. SL
Ln-s libxext.3 libxext. SL
Ln-s libxhp11.3 libxhp11.sl
Ln-s libxi.3 libxi. SL
Ln-s libxm.4 libxm. SL
Ln-s libxp.2 libxp. SL
Ln-s libxt.3 libxt. SL
Ln-s libxtst.2 libxtst. SLLS-Al libx *. sl8. View Network Interfaces
# View Interfaces
# Lanscan
Hardware station crd hdw net-interface nm Mac HP-DLPI dlpi
Path address in # state nameppa ID type support mjr #
0/4/2/0 0x001a4b09924c 0 up lan0 snap0 1 ether Yes 119
0/4/2/1 0x001a4b09924d 1 up lan1 snap1 2 ether Yes 119
Linkagg0 0x000000000000 900 down lan900 snap900 4 ether Yes 119
Linkagg1 0x000000000000 901 down lan901 snap901 5 ether Yes 119
Linkagg2 0x000000000000 902 down lan902 snap902 6 ether Yes 119
Linkagg3 0x000000000000 903 down lan903 snap903 7 ether Yes 119
Linkagg4 0x000000000000 904 down lan904 snap904 8 ether Yes 119
# Display the IP address and status of each interface (ensure that the interfaces used on each node have the same name)
# Netstat-in
Name MTU network address ipkts ierrs opkts oerrs Coll
Lo0 32808 127.0.0.0 127.0.0.1 58845 0 58845 0
Lan1 1500 192.168.1.0 192.168.1.3 91391 0 178583 0 0
Lan0 1500 10.160.8.0 10.160.8.12 6760363 0 640706 0 0 # display the current configuration of the specified Interface
# Ifconfig lanx
Make sure that an interface such as lan0 is used for external connection and lan1 is used for internal heartbeat line. The vip ip address and external interface must be in a CIDR Block 9. edit/etc/hosts.
# Vi/etc/hosts
192.168.1.2 rx6600a-priv
192.168.1.3 rx6600b-priv10.160.8.11 rx6600a
Rx6600a-vip 10.160.8.12 rx6600b10.160.8.15
10.160.8.16 rx6600b-vip
127.0.0.1 localhost loopback // Note: There must be 127.0.0.1 entries in hosts, and only corresponding to localhost and not hostname. If 127.0.0.1 is not set, the database cannot be started normally. # Vi. rhosts
Rx6600a Root
Rx6600b Root
Rx6600a-priv Root
Rx6600b-priv Root
Rx6600a-vip Root
Rx6600b-vip root # Su-Oracle
# Vi. rhosts
Rx6600a Oracle
Rx6600b Oracle
Rx6600a-priv (Oracle)
Rx6600b-priv (Oracle)
Rx6600a-vip (Oracle)
Rx6600b-vip Oracle 10, view specific patches and pack for HP-UX
/Usr/sbin/swlist-l bundle | grep xxxname
/Usr/sbin/swlist-l patch
/Usr/sbin/swlist-l patch <patch_number>
/Usr/sbin/swlist-l product | grep serviceguard
Phss_000058 1.0 serviceguard erac a.11.18.00
Phss_39484 1.0 serviceguard a.11.18.00
SG-NMAPI a.11.18.00 SG-NMAPI serviceguard extension for rac sd Product
SG-Rac-tool a.11.18.00 serviceguard extension for RAC toolkit SD Product
Sgmanagerpi B .01.01 HP serviceguard Manager
Sgwbemproviders a.02.00.00 HP serviceguard WBEM providers SD Product
Serviceguard a.11.18.00 serviceguard SD product note: the default installation process of HP-UX 11.31 can meet the installation requirements of Oracle 10.2.0.1. 2. Install MC/SG1 and MC/SG
# Mount/dev/CDROM
# Swinstall-S/CDROM
2. Create a lock Disk
# Ioscan-m dsf // view disk
# Pvcreate-F/dev/Disk/disk27
# Mkdir/dev/vglock
# Mknod/dev/vglock/group C 64 0x010000 (note that the Group cannot be repeated here)
# Vgcreate/dev/vglock/dev/Disk/disk27 (add disk23 to the volume group)
# Strings/etc/lvmtab
/Dev/vg00
/Dev/Disk/disk1_p2
/Dev/vglock
/Dev/Disk/disk27
/Dev/vgcrs
/Dev/Disk/disk33
/Dev/vgdata2
/Dev/Disk/disk28
/Dev/Disk/disk34
/Dev/vgdata1
/Dev/Disk/disk25
/Dev/Disk/disk26
# Vgchange-a n/dev/vglock
# Vgexport-s-p-v-M/tmp/vglock. MAP/dev/vglock
# RCP/tmp/vglock. Map rx6600b:/tmp/
# Vgimport-S-M/tmp/vglock. map3. Create concurrent VG and related file systems or LV raw
# Ioscan-M DSF
# Pvcreate-F/dev/RDISK/disk12
# Mkdir/dev/vg03
# Mknod/dev/vg03/group C 64 0 0x030000
# Vgcreate vg03/dev/Disk/disk12
# Lvcreate-l 1000-N mylv vg03 create a file system
# Newfs-F vxfs/dev/vg03/mylv
# Create a mount directory using mkdir/oradata
# Mount/dev/vg03/mylv/oradata mount file system
Automatically mount the file system upon startup
# Vi/etc/fstab
For the VG to be shared:
# Vgchange-a n vg03 close the volume group
# Vgexport-p-S-M/tmp/map1 vg03, -M/tmp/map1: generate the map1 volume group information file)
# RCP/tmp/map1 rx6600b:/tmp/map1 copy the file to host B
On rx6600b
# Mkdir/dev/vg03 create the device volume directory
# Mknod/dev/vg03/group C 64 0x030000 create a volume control file
(Note: 03 is unique on the machine. Use LS-L */group to check whether it already exists. If 03 already exists, this value will be changed. Value: 00-16)
# Vgimport-S-M/tmp/map1 vg03 import vg03 volume group information
# Strings/etc/lvmtab view the imported volume group configuration
# Vgchange-A y vg03 activate vg03 volume group
# Mkdir/oradata create the Mount directory (same as host)
# Mount/dev/vg03/mylv/oradata mount file system sets VG to non-automatic activation
# Vi/etc/lvmrc
Where
Auto_vg_activate = 1 to 04, MC/SG Configuration
# Run CD/etc/cmcluster to enter the default directory of the cluster.
# Cmquerycl-C cluster. ascii-N rx6600-N rx6600 create a cluster text file
# Vi cluster. ASCII edit the cluster ASCII file and change the cluste name, disk lock, node heartbeat time, and number of packages cluster_name cluster1
First_cluster_lock_vg/dev/vglocknode_name rx6600a
Network_interface lan0
Heartbeat_ip 10.160.8.11
Network_interface lan1
Heartbeat_ip 192.168.1.2
# Cluster_lock_lun
First_cluster_lock_pv/dev/Disk/disk27node_name rx6600b
Network_interface lan0
Heartbeat_ip 10.160.8.12
Network_interface lan1
Heartbeat_ip 192.168.1.3
# Cluster_lock_lun
First_cluster_lock_pv/dev/Disk/disk32heartbeat_interval 1000000
Node_timeout 2000000auto_start_timeout 600000000
Network_polling_interval 2000000max_configured_packages 4 //// volume_group/dev/vg02 when hot standby is used, set ops_volume_group/dev/vglock // concurrent VG for Oracle RAC
Ops_volume_group/dev/vgcrs
Ops_volume_group/dev/vgdata2
Ops_volume_group/dev/vgdata1 # cmcheckconf-C cluster. ASCII check cluster and node configuration
# Cmapplyconf-C cluster. ASCII create Cluster
# Cmruncl-V
# Cmviewcl-V 5. Configure the service package running script and Environment
Host a (rx660a ):
# Mkdir/etc/cmcluster/pkg1
# Cd/etc/cmcluster/pkg1 create and enter a directory
# Cmmakepkg-P clustercrs. conf: Create a package configuration file. You can modify the package name, node, service, and package attributes.
# Vi clustercrs. conf edit package configuration file package_name pkg1 // package_type failover // switch when an error occurs. Node_name rx6600a // first priority Node 1
// Node_name rx6600b // second priority Node 1, which is automatically started when auto_run Yes // cmruncl is used for hot backup.
Node_fail_fast_enabled no // whether the node is down when a PKG error occurs. Run_script/etc/cmcluster/pkg1/clustercrs. cntl package run the script
Run_script_timeout no_timeout
Halt_script/etc/cmcluster/pkg1/clustercrs. cntl package stop script
Halt_script_timeout no_timeout # configured_node, min_package_node, site_preferred. // node rule to be switched when PKG fails
Failover_policy configured_node // switch to a configured node with a higher priority.
Failback_policy manual // whether it is automatic or manually switched back. Monitored_subnet 10.160.8.0 # cmmakepkg-s clustercrs. cntl create package control script
# Vi clustercrs. cntl edit package control script
Clustercrs. cntl configuration example: Path =/usr/bin:/usr/sbin:/etc:/bin:/usr/lbin: /etc/cmcluster/pkg1 // path to the package file directory vgchange = "vgchange-a s" // Mc takes over the parameters for activating the volume group. The default value is vgchange-a e, RAC uses vgchange-a SVG [0] = vg03 // The Name Of The volume group to be switched over. Multiple Volume groups can exist at the same time in the order of 0, 1, 2, and 3.
VG [1] = "vgdata1"
VG [2] = "vgdata2"
VG [3] = "vgcrs" // LV [2] =/dev/vg03/mylv; FS [2] =/oradata; fs_mount_opt [2] = "" // Mount directory of the logical volume. The file system to be mounted // ip address [0] = IP address of the 192.168.168.20 application package
// Subnet [0] = 192.168.168.0 network segment of the application package // SERVICE_NAME [0] = "Demo"
// Service_cmd [0] = "/usr/bin/X11/xclock-display 192.168.168.23: 0" (or set a script. For details, see the appendix)
// Service_restart [0] = "-R" function customer_defined_run_cmds
{(Add the command to start the application here)
Test_return 51
}
Function customer_defined_halt_cmds
{(Add the application close command here)
Test_return 52
} (Note:
SERVICE_NAME [0] = "Demo" is the service name and must be the same as SERVICE_NAME in demo. conf. Service_cmd [0] =
"..." Is the command used to start the service. The current command is "/usr/bin/X11/xclock-Display
192.168.168.23: 0 "indicates that xclock is run and displayed on the workstation 192.168.168.23. Service_restart [0]
= "" Indicates the number of times the service is restarted. "-R 2" indicates that the service is restarted twice, and "-R" indicates that the service is continuously restarted .) 4. Add a service package to the cluster and configure the environment for each node to take over the package
# RCP clustercrs. cntl rx6600b:/etc/cmcluster/pkg1 copy control script, copy the demo. cntl control script to host B to synchronize its environment)
# Cmcheckconf
-V-P clustercrs. conf
Check the package configuration to check whether the preceding package configuration is correct. There will be a log file with the same script name in the script directory, such as demo. cntl. log.
. If everything is correct, proceed to the next step. Otherwise, make the relevant changes until they are correct .)
# Cmapplyconf-v-P clustercrs. conf Add the package to the cluster for configuration check
# Cmcheckconf-v-C/etc/cmcluster. ascii-P/etc/cmcluster/Informix. cntl
Resend the cluster. ASCII file
# Cmapplyconf-v-C/etc/cmcluster/cluster. ascii-P/etc/cmcluster/Informix. cntl # cmrunpkg cluster run demo package
# Cmviewcl-V view the node information in the cluster and Cluster
The status of cluster, node, interface, and package is up and running. pkg_switch and node_type switching are all enabled.) 5. Start and manage, cluster, node, and service package # cmruncl start Cluster
# Cmhaltcl disable Cluster
# Cmrunnode node_name start one or more nodes
# Cmhaltnode-F node_name close one or more nodes
# Cmrunpkg pkg_name start the application package
# Cmhaltpkg pkg_name close the application package
# Cmviewcl-V view the node information in the cluster and Cluster
# Cmmodpkg-e pkg_name enables the application package to be taken over and switched
# The Key of the cmonpkg-e-n node_name pkg_name can take over the appendix of the application package:
The MC monitoring script can write a non-substantive cyclic command to keep the command running continuously. You can start a script named monitor to write simple data in the script, such:
While [1]
Do
Sleep 30
When done installs Oracle clusterware in the format of file system or LV raw, opsvg is required to solve the concurrent VG problem.
# Groupadd-G 201 DBA
# Groupadd-G 200 oinstall
# Useradd-u 200-G oinstall-G dBA, oinstall Oracle // if the default Oracle directory is not created, create the default directory/home/Oracle
# ID Oracle // check whether a nobody user exists
# ID nobody edit. rhosts in the $ home directory of an Oracle user
# Vi/home/Oracle/. rhosts
Rx6600a Oracle
Rx6600a_vip Oracle
Rx6600a_priv explain lerx6600b Oracle
Rx6600b_vip Oracle
Rx6600b_priv Oracle configuration profile file
# Vi/home/Oracle/. profileoracle_home =/Oracle/product/10.2.0
Export ORACLE_HOME
Oracle_base =/Oracle
Export oracle_base
Oracle_sid = gzga1
Export oracle_sid
Export ora_crs_home =/export rs
Java_home =/opt/java1.5
Export java_home
Tns_admin = $ ORACLE_HOME/Network/admin
Export tns_admin
Nls_lang = american_america.zhs16gbk
Export nls_lang
Nls_language = $ nls_lang
Export nls_language
Ora_nls33 = $ ORACLE_HOME/ocommon/NLS/admin/data export ora_nls33
LD_LIBRARY_PATH = $ ORACLE_HOME/lib:/usr/lib: $ ORACLE_HOME/rdbms/lib
Shlib_path = $ ORACLE_HOME/lib32: $ ORACLE_HOME/rdbms/lib32
Export LD_LIBRARY_PATH
Export shlib_path
Stty erase
Path = $ path:/opt/java1.5/bin:/usr/sbin:/etc:/opt/bin:/usr/CCS/bin: /usr/local/bin: $ ORACLE_HOME/bin :.
Export path
TMP =/tmp export TMP
Tmpdir =/tmp export tmpdir
Classpath = $ ORACLE_HOME/JRE: $ ORACLE_HOME/jlib: $ ORACLE_HOME/rdbms/jlib: $ ORACLE_HOME/Network/jlib: $ ORACLE_HOME/jdbc/lib/classes12.zip
Export classpath oracle_base =/Oracle/APP/Oracle; export oracle_base
ORACLE_HOME = $ oracle_base/product/10.2.0/DB; export ORACLE_HOME
Export ora_crs_home =/export rs
Oracle_sid = gzga1; export oracle_sid
Ora_nls33 = $ ORACLE_HOME/ocommon/NLS/admin/data; export ora_nls33
Oracle_term = VT100; export oracle_term
Tmpdir =/Oracle/tmp; export tmpdir
LD_LIBRARY_PATH = $ ORACLE_HOME/lib:/usr/lib; export LD_LIBRARY_PATH
Path =/usr/CCS/bin: $ ORACLE_HOME/bin:/usr/opt/networker/bin: $ path; export path
Display = 10.160.8.191: 0.0; export display
Nls_lang = american_america.zhs16gbk; export nls_lang
Tns_admin = $ ORACLE_HOME/Network/admin; export tns_admin
Term = VT100; export term
Editor = VI; export Editor
TMP =/tmp; export TMP
Classpath = $ ORACLE_HOME/JRE/lib: $ ORACLE_HOME/jlib: $ ORACLE_HOME/Network/jlib: $ ORACLE_HOME/rdbms/jlib: $ ORACLE_HOME/PLSQL/jlib: $ ORACLE_HOME/assistants/jlib: $ ORACLE_HOME/assistants/dbca/jlib; Export
Classpath
Dbca_raw_config =/Oracle/dbca_raw_config.txt; export dbca_raw_config
Export PS1 = 'hostname' @ 'whoam'' [$ PWD] '$ create the installation directories of clusterware and Oracle
Mkdir-P/Oracle/product/CRS
Mkdir-P/Oracle/product/rac10g
Chown-r ORACLE: oinstall/Oracle
Chmod-r 775/Oracle # configure raw devices for OCR:
Chown root: oinstall/dev/RDISK/disk140
Chmod 640/dev/RDISK/disk140 if the database adopts the ASM method, the MC/SG dual-host software is not required.
Attribute of the disk to be modified
Chown ORACLE: DBA/dev/RDISK/diskdetail
Chown ORACLE: DBA/dev/RDISK/disk138
Chown ORACLE: DBA/dev/RDISK/disk139chmod 660/dev/RDISK/diskmetadata
Chmod 660/dev/RDISK/disk138
Chmod 660/dev/RDISK/disk139
Install Oracle Database
#/CDROM/database/runinstaller-ignoresysprereqs