12c rac搭建随笔

IPADDR=10.1.220.102
NETMASK=255.255.252.0
GATEWAY=10.1.220.1

 

10.1.220.101 ucloud-rac1-priv
10.1.220.100 ucloud-rac2-priv
10.168.0.117 ucloud-rac1-vip
10.168.0.118 ucloud-rac2-vip
10.168.0.107 ucloud-rac1
10.168.0.108 ucloud-rac2
10.168.0.127 ucloud-rac-scan scanip

 

hostnamectl set-hostname ucloud-rac1

安装multipath
defaults {
user_friendly_names yes
find_multipaths yes
}

 

vi /etc/sysctl.conf
fs.file-max= 6815744
fs.aio-max-nr=1048576
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= 1048576
kernel.sem= 250 32000 100 128

sysctl -p
vi /etc/security/limits.conf

oracle soft nofile 2048
oracle hard nofile 65536
oracle soft nproc 16384
oracle hard nproc 16384
oracle soft stack 10240
oracle hard stack 32768
oracle hard memlock 134217728
oracle soft memlock 134217728
grid soft nofile 2048
grid hard nofile 65536
grid soft nproc 16384
grid hard nproc 16384
grid soft stack 10240
grid hard stack 32768
grid hard memlock 134217728
grid soft memlock 134217728

 

vi /etc/pam.d/login
session required /lib64/security/pam_limits.so
session required pam_limits.so


vi /etc/sysconfig/selinux
echo "shm /dev/shm tmpfs size=180g 0 0">> /etc/fstab
mount -o remount /dev/shm

 

 


groupadd -g 501 oinstall
groupadd -g 502 dba
groupadd -g 503 asmadmin
groupadd -g 504 asmdba
groupadd -g 505 asmoper
groupadd -g 506 oper
useradd -u 501 -g oinstall -G asmadmin,asmdba,asmoper,dba grid
useradd -u 502 -g oinstall -G dba,asmdba,oper oracle


mkdir -p /u01/app/oracle/product/12.2.0/db_1
mkdir -p /u01/app/grid
mkdir -p /u01/12.2.0/grid
mkdir -p /u01/app/oraInventory
chown -R oracle.oinstall /u01/app/oracle/
chown -R oracle.oinstall /u01/app/oracle/*
chown -R grid.oinstall /u01/app/grid/
chown -R grid.oinstall /u01/app/oraInventory/
chown -R grid.oinstall /u01/12.2.0/grid/

互信
ssh-keygen -t dsa
ssh-keygen -t rsa

cat id_rsa.pub>>authorized_keys
cat id_dsa.pub>>authorized_keys

 

 

存储
multipaths {
multipath {
wwid "3600c0ff0005110046c7f575e01000000"
alias REDO
}
multipath {
wwid "3600c0ff000511004607f575e01000000"
alias RAC_OCR3
}
multipath {
wwid "3600c0ff000511004617f575e01000000"
alias RAC_OCR2
}
multipath {
wwid "3600c0ff000511004627f575e01000000"
alias RAC_OCR1
}
multipath {
wwid "3600c0ff0005110046b7f575e01000000"
alias RAC_DATA8
}
multipath {
wwid "3600c0ff0005110046a7f575e01000000"
alias RAC_DATA7
}
multipath {
wwid "3600c0ff000511004697f575e01000000"
alias RAC_DATA6
}
multipath {
wwid "3600c0ff000511004677f575e01000000"
alias RAC_DATA5
}
multipath {
wwid "3600c0ff000511004667f575e01000000"
alias RAC_DATA4
}
multipath {
wwid "3600c0ff000511004657f575e01000000"
alias RAC_DATA3
}
multipath {
wwid "3600c0ff000511004637f575e01000000"
alias RAC_DATA2
}
multipath {
wwid "3600c0ff0005110046d7f575e01000000"
alias RAC_DATA1
}
}

 

配置asm
ENV{DM_NAME}=="REDO", OWNER:="grid", GROUP:="asmadmin", MODE:="660", SYMLINK+="iscsi/asm-$env{DM_NAME}"
ENV{DM_NAME}=="RAC_OCR1", OWNER:="grid", GROUP:="asmadmin", MODE:="660", SYMLINK+="iscsi/asm-$env{DM_NAME}"
ENV{DM_NAME}=="RAC_OCR2", OWNER:="grid", GROUP:="asmadmin", MODE:="660", SYMLINK+="iscsi/asm-$env{DM_NAME}"
ENV{DM_NAME}=="RAC_OCR3", OWNER:="grid", GROUP:="asmadmin", MODE:="660", SYMLINK+="iscsi/asm-$env{DM_NAME}"
ENV{DM_NAME}=="RAC_DATA1", OWNER:="grid", GROUP:="asmadmin", MODE:="660", SYMLINK+="iscsi/asm-$env{DM_NAME}"
ENV{DM_NAME}=="RAC_DATA2", OWNER:="grid", GROUP:="asmadmin", MODE:="660", SYMLINK+="iscsi/asm-$env{DM_NAME}"
ENV{DM_NAME}=="RAC_DATA3", OWNER:="grid", GROUP:="asmadmin", MODE:="660", SYMLINK+="iscsi/asm-$env{DM_NAME}"
ENV{DM_NAME}=="RAC_DATA4", OWNER:="grid", GROUP:="asmadmin", MODE:="660", SYMLINK+="iscsi/asm-$env{DM_NAME}"
ENV{DM_NAME}=="RAC_DATA5", OWNER:="grid", GROUP:="asmadmin", MODE:="660", SYMLINK+="iscsi/asm-$env{DM_NAME}"
ENV{DM_NAME}=="RAC_DATA6", OWNER:="grid", GROUP:="asmadmin", MODE:="660", SYMLINK+="iscsi/asm-$env{DM_NAME}"
ENV{DM_NAME}=="RAC_DATA7", OWNER:="grid", GROUP:="asmadmin", MODE:="660", SYMLINK+="iscsi/asm-$env{DM_NAME}"
ENV{DM_NAME}=="RAC_DATA8", OWNER:="grid", GROUP:="asmadmin", MODE:="660", SYMLINK+="iscsi/asm-$env{DM_NAME}"

 

 


./runcluvfy.sh stage -pre crsinst -n ucloud-rac1,ucloud-rac2 -fixup -verbose

yum -y install binutils compat-libcap1 compat-libstdc++-33 compat-libstdc++-33*i686 compat-libstdc++-33*.devel compat-libstdc++-33 compat-libstdc++-33*.devel gcc gcc-c++ glibc glibc*.i686 glibc-devel glibc-devel*.i686 ksh libaio libaio*.i686 libaio-devel libaio-devel*.devel libgcc libgcc*.i686 libstdc++ libstdc++*.i686 libstdc++-devel libstdc++-devel*.devel libXi libXi*.i686 libXtst libXtst*.i686 make sysstat unixODBC unixODBC*.i686 unixODBC-devel unixODBC-devel*.i686

 

 


INVENTORY_LOCATION=/u01/app/oraInventory
oracle.install.option=CRS_CONFIG
ORACLE_BASE=/u01/app/grid
oracle.install.asm.OSDBA=asmdba
oracle.install.asm.OSOPER=asmoper
oracle.install.asm.OSASM=asmadmin
oracle.install.crs.config.gpnp.scanName=ucloud-rac-scan
oracle.install.crs.config.gpnp.scanPort=1521
oracle.install.crs.config.ClusterConfiguration=STANDALONE
oracle.install.crs.config.configureAsExtendedCluster=false
oracle.install.crs.config.clusterName=ucloud-rac
oracle.install.crs.config.gpnp.configureGNS=false
oracle.install.crs.config.autoConfigureClusterNodeVIP=false
oracle.install.crs.config.clusterNodes=ucloud-rac1:ucloud-rac1-vip:hub,ucloud-rac2:ucloud-rac2-vip:hub
oracle.install.crs.config.networkInterfaceList=bond0:10.168.0.0:1,bond1:10.34.0.0:5
oracle.install.asm.configureGIMRDataDG=true
oracle.install.crs.config.useIPMI=false
oracle.install.asm.storageOption=ASM
oracle.install.asmOnNAS.configureGIMRDataDG=false
oracle.install.asm.SYSASMPassword=oracle
oracle.install.asm.diskGroup.name=OCR
oracle.install.asm.diskGroup.redundancy=NORMAL
oracle.install.asm.diskGroup.AUSize=4
oracle.install.asm.diskGroup.disks=/dev/mapper/RAC_OCR1,/dev/mapper/RAC_OCR2,/dev/mapper/RAC_OCR3
oracle.install.asm.diskGroup.diskDiscoveryString=/dev/mapper/*
oracle.install.asm.monitorPassword=oracle
oracle.install.asm.gimrDG.name=GIMR
oracle.install.asm.gimrDG.redundancy=EXTERNAL
oracle.install.asm.gimrDG.AUSize=4
oracle.install.asm.gimrDG.disks=/dev/mapper/RAC_DATA1
oracle.install.crs.configureRHPS=false
oracle.install.crs.config.ignoreDownNodes=false
oracle.install.config.managementOption=NONE
oracle.install.crs.rootconfig.executeRootScript=false

上一篇:BUUCTF reverse26-30 WP


下一篇:22、统计各个部门的工资记录数