In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
ASM disk space planning
OCR+VOTING 8G three NORMAL redundancy
MGMT 80g external redundancy
1. Hardware detection
Memory (at least 8G)
Grep MemTotal / proc/meminfo
Swap space (4-16G equal to RAM more than 16GB:16GB)
Grep SwapTotal / proc/meminfo
/ tmp directory size > 2G
Df-h / tmp
Free memory
Free
Kernel version:
Uname-r
Df-h / dev/shm
2. System version
Cat / etc/oracle-releasecat / etc/redhat-releaselsb_release-iduname-r
3. Modify the host name:
Node 1:
Hostname dwdb1
Hostnamectl-static set-hostname dwdb1
Node 2:
Hostname dwdb2
Hostnamectl-static set-hostname dwdb2
4. Turn off the firewall:
Systemctl status firewalld
Systemctl stop firewalld
Systemctl disable firewalld
Look at the state
Firewall-cmd-state
Systemctl stop firewalld.service
Systemctl disable firewalld.service
5. Configure the correspondence between hostname and IP address
Vi / etc/hosts adds the following
Public
10.1.11.1 dwdb1
10.1.11.2 dwdb2
Private
20.1.1.39 dwdb1-priv
20.1.1.40 dwdb2-priv
Vip
10.1.11.161 dwdb1-vip
10.1.11.162 dwdb2-vip
Scanip
10.1.11.163 scan-dwdb
Modify / etc/sysconfig/network
NOZEROCONF=yes
6. Install the dependency package: (the oracle linux 7.2dependency package is as follows. For more information, please see the official documentation)
Yum install-y binutils-2.23.52.0.1-12.el7
Yum install-y compat-libcap1-1.10-3.el7
Yum install-y compat-libstdc++-33-3.2.3-71.el7
Yum install-y glibc-2.17-36.el7
Yum install-y glibc-devel-2.17-36.el7
Yum install-y ksh
Yum install-y libaio-0.3.109-9.el7
Yum install-y libaio-devel-0.3.109-9.el7
Yum install-y libX11-1.6.0-2.1.el7
Yum install-y libXau-1.0.8-2.1.el7
Yum install-y libXi-1.7.2-1.el7
Yum install-y libXtst-1.2.2-1.el7
Yum install-y libgcc-4.8.2-3.el7
Yum install-y libstdc++-4.8.2-3.el7
Yum install-y libstdc++-devel-4.8.2-3.el7
Yum install-y libxcb-1.9-5.el7
Yum install-y make-3.82-19.el7
Yum install-y nfs-utils-1.3.0-0.21.el7.x86_64
Yum install-y net-tools-2.0-0.17.20131004git.el7
Yum install-y smartmontools-6.2-4.el7
Yum install-y sysstat-10.1.5-1.el7
Yum install-y compat-libcap1-1.10
Yum install-y sysstat-10.1.5
Yum install-y libaio-devel-0.3.109
7. Close transparent hugepages and set hugepages
View transparent hugepage
Red Hat Enterprise Linux kernels:
Cat / sys/kernel/mm/redhat_transparent_hugepage/enabled
Other kernels:
Cat / sys/kernel/mm/transparent_hugepage/enabled
Oracle linux 7.2 does not enable transparent hugepages, ignore.
8. Enable Name Service Cache Deamon
Yum install-y nscdsystemctl start nscdsystemctl enable nscd
7 、 verifying the Disk I/O Scheduler on Linux
Cat / sys/block/$ {ASM_DISK} / queue/scheduler
Noop [deadline] cfq
8. Configure NTP time synchronization
Ntpdate 10.1.30.231vi / etc/ntp.conf modifies the following
Server 10.1.30.231 iburst
Server 10.1.30.232 iburst
Systemctl enable ntpd.service
/ etc/init.d/ntpd start/chkconfig ntpd on/chkconfig-- list ntpd
Systemctl restart chronyd.service
Systemctl enable chronyd.service
9. Network configuration (/ etc/sysctl.conf)
Private address to 2
Public address to 1
Bond1 p4p1 em3 20.1.1.39 private
Bond0 p5p1 p6p1 10.1.11.1 public
Net.ipv4.conf.p4p1.rp_filter=2
Net.ipv4.conf.em3.rp_filter=2
Net.ipv4.conf.p5p1.rp_filter=1
Net.ipv4.conf.p6p1.rp_filter=1
10. Users and groups:
/ usr/sbin/groupadd-g 54321 oinstall
/ usr/sbin/groupadd-g 54322 dba
/ usr/sbin/groupadd-g 54323 oper
/ usr/sbin/groupadd-g 54324 backupdba
/ usr/sbin/groupadd-g 54325 dgdba
/ usr/sbin/groupadd-g 54326 kmdba
/ usr/sbin/groupadd-g 54327 asmdba
/ usr/sbin/groupadd-g 54328 asmoper
/ usr/sbin/groupadd-g 54329 asmadmin
/ usr/sbin/groupadd-g 54330 racdba
/ usr/sbin/useradd-u 54321-g oinstall-G dba,asmdba,backupdba,dgdba,kmdba,racdba oracle/usr/sbin/useradd-u 54331-g oinstall-G dba,asmdba,asmoper,asmadmin grid
Passwd oracle
Hagj5Xc2GokR
Passwd grid
A31K0eBBJMXW
11. Catalogue:
Mkdir-p / u01/app/oraInventory
Chown-R grid:oinstall / u01/app/oraInventory
Chmod-R 71 / u01/app/oraInventory
Mkdir-p / u01/app/grid
Chown-R grid:oinstall / u01/app/grid
Mkdir-p / u01/12.2.0/grid
Chown-R grid:oinstall / u01/12.2.0/grid
Chmod-R 71 / u01/12.2.0/grid
Mkdir-p / u01/app/oracle
Mkdir / u01/app/oracle/fetology
Chown-R oracle:oinstall / u01/app/oracle
Chmod-R 71 / u01/app/oracle
Mkdir-p / u01/app/oracle/product/12.2.0/db_1
Chown-R oracle:oinstall / u01/app/oracle/product/12.2.0/db_1
Chmod-R 71 / u01/app/oracle/product/12.2.0/db_1
12. Environmental variables
Node 1:
-- oracle user
Export ORACLE_SID=dwdb1
Export ORACLE_BASE=/u01/app/oracle/
Export ORACLE_HOME=/u01/app/oracle/product/12.2.0/db_1
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
-- grid
Export ORACLE_SID=+ASM1
Export ORACLE_BASE=/u01/app/grid
Export ORACLE_HOME=/u01/12.2.0/grid
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
Node 2:
-- oracle user
Export ORACLE_SID=dwdb2
Export ORACLE_BASE=/u01/app/oracle/
Export ORACLE_HOME=/u01/app/oracle/product/12.2.0/db_1
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
-- gird
Export ORACLE_SID=+ASM2
Export ORACLE_BASE=/u01/app/grid
Export ORACLE_HOME=/u01/12.2.0/grid
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
13. Firewall
/ etc/init.d/iptables stop
Chkconfig iptables off
Networkmanager
Chkconfig NetworkManager off
Turn off the firewall on linux6 and execute under selinux,root:
Service iptables stop
Chkconfig iptables off
Service ip6tables stop
Chkconfig ip6tables off
Setenforce 0
Getenforce
Vi / etc/selinux/config ensures that the following
SELINUX=disabled
Ip6tables will get up after iptables is turned off on linux6, so it's best to turn it off as well.
/ etc/init.d/iptables stop
Chkconfig iptables off
14. Kernel parameters:
Kernel.panic_on_oops = 1
Fs.aio-max-nr = 104852
Fs.file-max = 6815744
Kernel.shmall = 134217728
Kernel.shmmax = 558345748480
Kernel.shmmni = 4096
Kernel.sem = 5010 641280 5010 128
Net.ipv4.ip_local_port_range = 9000 65500
Net.core.rmem_default = 8388608
Net.core.rmem_max = 16777216
Net.core.wmem_default = 8388608
Net.core.wmem_max = 16777216
Vm.swappiness = 0
Vm.nr_hugepages = 163845
-- modify the following two
Kernel.shmall = 134217728
Kernel.shmmax = 558345748480
-- Save effective
/ sbin/sysctl-p
15. Limit file: / etc/security/limits.conf
Oracle soft nproc 2047
Oracle hard nproc 16384
Oracle soft nofile 1024
Oracle hard nofile 65536
Oracle soft stack 10240
Grid soft nproc 2047
Grid hard nproc 16384
Grid soft nofile 1024
Grid hard nofile 65536
Grid soft stack 10240
Grid soft nproc 2047
Grid hard nproc 16384
Grid soft nofile 1024
Grid hard nofile 65536
Grid soft stack 10240
Oracle soft nproc 2047
Oracle hard nproc 16384
Oracle soft nofile 1024
Oracle hard nofile 65536
Oracle soft stack 10240
Soft memlock 524288000hard memlock 524288000
16. / etc/pam.d/login file
Session required pam_limits.so
/ etc/profile
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
17. Configure mutual trust
Execute on two nodes:
Su-oracle
/ usr/bin/ssh-keygen-t rsa
/ usr/bin/ssh-keygen-t dsa
2) execute on the second node
Cd .ssh
Scp id_rsa.pub rac1:/home/oracle/.ssh/id_rsa.pub2
Scp id_dsa.pub rac1:/home/oracle/.ssh/id_dsa.pub2
3) execute on the first node
Cat id_dsa.pub id_dsa.pub2 id_rsa.pub id_rsa.pub2 > authorized_keys
Chmod 644 authorized_keys
Scp authorized_keys rac2:/home/oracle/.ssh
Test after the configuration is complete:
Ssh dwdb1
Ssh dwdb1-priv
Ssh dwdb2
Ssh dwdb2-priv
Ssh dwdb2
Ssh dwdb2-priv
Ssh dwdb1
Ssh dwdb1-priv
Ssh dwdb2-priv
Ssh dwdb1-priv
Ssh dwdb1
Ssh dwdb2
Ssh dwdb2
Ssh dwdb2-priv
Ssh dwdb2
Ssh dwdb1-priv
Ssh dwdb1
Ssh dwdb1-priv
Ssh dwdb1
Ssh dwdb2-priv
Ssh dwdb2-priv
Ssh dwdb1-priv
Ssh dwdb1
Ssh dwdb1
. / runcluvfy.sh stage-pre crsinst-n dwdb1,dwdb2
18. Install cvudisk RPM package
Cvuqdisk is stored in the cv/rpm directory of the oracle GI installation media
Export CVUQDISK_GRP=asmadmin
Rpm-ivh cvuqdisk-1.0.10-1.rpm
19. Configure ASM disk:
OCR:8G NORMAL redundancy
GIMR: at least 40G external redundancy
DATA: external redundancy
ARCH: external redundancy
The root configuration script is as follows:
Vi asm_udev.sh
#! / bin/bash
For i in $(cat / proc/partitions | awk {'print $4'} | grep emcpower | sort)
Do
Echo "ACTION==\" add | change\ ", KERNEL==\" emcpower*\ ", ENV {DEVTYPE} = =\" disk\ ", SUBSYSTEM==\" block\ ", PROGRAM==\" / usr/lib/udev/scsi_id-g-u-d-whitelisted-replace-whitespace-device=\ $devnode\ ", RESULT==\" / usr/lib/udev/scsi_id-g-u-d-whitelisted-replace-whitespace-device=/dev/$i\ ", RUN+=\" / bin/sh-c 'mknod / dev/asm-$i b\ $major\ $minor Chown grid:asmadmin / dev/asm-$i; chmod 0660 / dev/asm-$i'\ "> > / etc/udev/rules.d/99-oracle-asmdevices.rules
Done
Chmod + x asm_udev.sh
Reload udev
/ sbin/udevadm trigger
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.