In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
In this issue, the editor will bring you about how to use Openfiler to achieve shared storage in Oracle. The article is rich in content and analyzes and narrates it from a professional point of view. I hope you can get something after reading this article.
1. For root users, rac1 and rac2 disable the firewall
Stop firewall
Systemctl stop firewalld.service
Disable firewall boot
Systemctl disable firewalld.service
View firewall status
Firewall-cmd-state
Close selinux
Vi / etc/selinux/config
Change SELINUX=enforcing to SELINUX=disabled
2. Root users, rac1, rac2 modify hosts file
Vi / etc/hosts
# public ip
192.168.0.95 rac1
192.168.0.97 rac2
# priv ip
10.10.0.95 rac1-prv
10.10.0.97 rac2-prv
# vip ip
192.168.0.96 rac1-vip
192.168.0.98 rac2-vip
# scan ip
192.168.0.102 rac-scan
# iscsi
192.168.0.91 iscsi
3. Root users, rac1, rac2 installation dependency packages
Yum install-y binutils compat-libcap1 compat-libstdc++-33 compat-libstdc++-33.i686 gcc gcc-c++ glibc
Yum install-y glibc.i686 glibc-devel glibc-devel.i686 ksh libgcc libgcc.i686 libstdc++ libstdc++.i686
Yum install-y libstdc++-devel libstdc++-devel.i686 libaio libaio.i686 libaio-devel libaio-devel.i686 libXext
Yum install-y libXext.i686 libXtst libXtst.i686 libX11 libX11.i686 libXau libXau.i686 libxcb libxcb.i686 libXi
Yum install-y libXi.i686 make sysstat unixODBC unixODBC-devel readline libtermcap-devel pdksh
Yum install-y smartmontools net-tools lrzsz unzip xdpyinfo compat-libstdc++ iscsi-initiator-utils nfs-utils
4. Root users, rac1, rac2 create users and user groups
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
Set grid and oracle passwords
Passwd grid
Passwd oracle
5. Root users, rac1 and rac2 create file directories
Mkdir-p / u01/app/grid
Mkdir-p / u01/app/grid/soft
Mkdir-p / u01/app/12.2.01/grid
Chown-R grid:oinstall / U01
Mkdir-p / u01/app/oraInventory
Chown-R grid:oinstall / u01/app/oraInventory
Mkdir-p / u01/app/oracle
Mkdir-p / u01/app/oracle/soft
Chown-R oracle:oinstall / u01/app/oracle
Chmod-R 775 / U01
6. Root users, rac1, rac2 modify 20-nproc.conf
Vi / etc/security/limits.d/20-nproc.conf
# Change this
# comment this line * soft nproc 1024
# To this adds the following line
*-nproc 16384
7. Root users, rac1, rac2 modify limits.conf
Vi / etc/security/limits.conf
# ORACLE SETTING
Grid soft nproc 2047
Grid hard nproc 16384
Grid soft nofile 1024
Grid hard nofile 65536
Grid soft stack 10240
Grid hard stack 32768
Oracle soft nproc 2047
Oracle hard nproc 16384
Oracle soft nofile 1024
Oracle hard nofile 65536
Oracle soft stack 10240
Oracle hard stack 32768
8. Root users, rac1, rac2 modify login
Vi / etc/pam.d/login
# ORACLE SETTING
Session required pam_limits.so
9. Root users, rac1, rac2 modify / etc/systemd/logind.conf file
Vi / etc/systemd/logind.conf
RemoveIPC=no
Re-reload
Systemctl daemon-reload
10. Root users, rac1, rac2 modify sysctl.conf
Vi / etc/sysctl.conf
# ORACLE SETTING
Fs.aio-max-nr = 1048576
Fs.file-max = 6815744
Kernel.shmmax = 61847529062 # physical memory * 1024 "1024" 1024 "0.9
Kernel.shmall = 15099494 # shmmax/1024/4
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
11. For root users, add NOZEROCONF=yes parameters to rac1 and rac2
Vi / etc/sysconfig/network
NOZEROCONF=yes
12. Root users, rac1, rac2 restart
Reboot
13. Grid user, rac1 configuration environment variable
Su-grid
Vi / .bash_profile
Export PS1= "[`whoami` @ `hostname`:"'$PWD] $'
Umask 022
Export TMP=/tmp
Export LANG=en_US
Export TMPDIR=$TMP
Export ORACLE_HOSTNAME=rac1
Export ORACLE_SID=+ASM1
Export ORACLE_TERM=xterm
Export ORACLE_BASE=/u01/app/grid
Export ORACLE_HOME=/u01/app/12.2.01/grid
Export NLS_DATE_FORMAT= "yyyy-mm-dd HH24:MI:SS"
Export PATH=.:$PATH:$HOME/bin:$ORACLE_HOME/bin
Export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
Export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
Export THREADS_FLAG=native
Export DISPLAY=192.168.0.99:0.0
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
14. Grid user, rac2 configuration environment variable
Su-grid
Vi / .bash_profile
Export PS1= "[`whoami` @ `hostname`:"'$PWD] $'
Umask 022
Export TMP=/tmp
Export LANG=en_US
Export TMPDIR=$TMP
Export ORACLE_HOSTNAME=rac2
Export ORACLE_SID=+ASM2
Export ORACLE_TERM=xterm
Export ORACLE_BASE=/u01/app/grid
Export ORACLE_HOME=/u01/app/12.2.01/grid
Export NLS_DATE_FORMAT= "yyyy-mm-dd HH24:MI:SS"
Export PATH=.:$PATH:$HOME/bin:$ORACLE_HOME/bin
Export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
Export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
Export THREADS_FLAG=native
Export DISPLAY=192.168.0.99:0.0
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
15. Oracle user, rac1 configuration environment variable
Su-oracle
Vi / .bash_profile
Export PS1= "[`whoami` @ `hostname`:"'$PWD] $'
Export TMP=/tmp
Export LANG=en_US
Export TMPDIR=$TMP
Export ORACLE_HOSTNAME=rac1
Export ORACLE_UNQNAME=rac1
Export ORACLE_BASE=/u01/app/oracle
Export ORACLE_HOME=$ORACLE_BASE/product/12.2.01/db_1
Export ORACLE_SID=rac1
Export ORACLE_TERM=xterm
Export NLS_DATE_FORMAT= "yyyy-mm-dd HH24:MI:SS"
Export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
Export PATH=.:$PATH:$HOME/bin:$ORACLE_BASE/product/12.2.01/db_1/bin:$ORACLE_HOME/bin
Export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
Export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
Export THREADS_FLAG=native
Export DISPLAY=192.168.0.99:0.0
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
16. Oracle user, rac2 configuration environment variable
Su-oracle
Vi / .bash_profile
Export PS1= "[`whoami` @ `hostname`:"'$PWD] $'
Export TMP=/tmp
Export LANG=en_US
Export TMPDIR=$TMP
Export ORACLE_HOSTNAME=rac2
Export ORACLE_UNQNAME=rac2
Export ORACLE_BASE=/u01/app/oracle
Export ORACLE_HOME=$ORACLE_BASE/product/12.2.01/db_1
Export ORACLE_SID=rac2
Export ORACLE_TERM=xterm
Export NLS_DATE_FORMAT= "yyyy-mm-dd HH24:MI:SS"
Export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
Export PATH=.:$PATH:$HOME/bin:$ORACLE_BASE/product/12.2.01/db_1/bin:$ORACLE_HOME/bin
Export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
Export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
Export THREADS_FLAG=native
Export DISPLAY=192.168.0.99:0.0
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. Root user, rac1,rac2 configuration environment variable
Su-root
Vi / .bash_profile
PATH=$PATH:/u01/app/12.2.01/grid/bin:$HOME/bin
Export PATH
18. Root user, rac1,rac2 installs cvuqdisk-1.0.10-1
Cd / usr/local/src
Upload a file package
Rz
Installation
Export CVUQDISK_GRP=oinstall
Rpm-ivh cvuqdisk-1.0.10-1.rpm
19. Root, grid, oracle users, rac1 configuration secret-free mutual trust su-root
Ssh-keygen
Ssh-copy-id root@rac2
Su-grid
Ssh-keygen
Ssh-copy-id grid@rac2
Su-oracle
Ssh-keygen
Ssh-copy-id oracle@rac2
20. Root, grid, oracle users, rac2 configuration secret-free mutual trust su-root
Ssh-keygen
Ssh-copy-id root@rac1
Su-grid
Ssh-keygen
Ssh-copy-id grid@rac1
Su-oracle
Ssh-keygen
Ssh-copy-id oracle@rac1
21. Root user, rac1,rac2 configuration shared disk
Scanning
Iscsiadm-m discovery-t sendtargets-p iscsi
Configure manual login
Iscsiadm-m node-T iqn.2006-01.com.openfiler:rac.ocr-p iscsi-l
Iscsiadm-m node-T iqn.2006-01.com.openfiler:rac.fra-p iscsi-l
Iscsiadm-m node-T iqn.2006-01.com.openfiler:rac.data-p iscsi-l
Check the disk
Fdisk-l | grep / dev
reconstruction
Dd if=/dev/zero of=/dev/sdb bs=1024 count=2056
Dd if=/dev/zero of=/dev/sdc bs=1024 count=2056
Dd if=/dev/zero of=/dev/sdd bs=1024 count=2056
Dd if=/dev/zero of=/dev/sde bs=1024 count=2056
Dd if=/dev/zero of=/dev/sdf bs=1024 count=2056
Find WWID
For i in `cat / proc/partitions | awk {'print $4'} | grep sd`; do echo "# $I: `/ lib/udev/scsi_id-- whitelist-- replace-whitespace / dev/$ i`"; done
Bind disk
Vi / etc/udev/rules.d/55-openiscsi.rules
# / etc/udev/rules.d/55-openiscsi.rules
KERNEL== "sd*", BUS== "scsi", PROGRAM= "/ etc/udev/scripts/iscsidev.sh% b"
SYMLINK+= "iscsi/%c/part%n", OWNER= "grid", GROUP= "oinstall", MODE= "0660"
~
Mkdir-p / etc/udev/scripts
Vi / etc/udev/scripts/iscsidev.sh
#! / bin/sh
# FILE:/etc/udev/scripts/iscsidev.sh
BUS=$ {1}
HOST=$ {BUS%%:*}
[- e/sys/class/iscsi_host] | | exit 1
File= "/ sys/class/iscsi_host/host$ {HOST} / device/session*/iscsi_session*/
Targetname "
Target_name=$ (cat$ {file})
# This is not anopen-scsi drive
If [- z "${target_name}"]; then
Exit 1
Fi
# Check if QNAPdrive
Check_qnap_target_name=$ {target_name%%:*}
If [$check_qnap_target_name= "iqn.2006-01.com.openfiler"]; then
Target_name= `echo "${target_name%.*}" `
Fi
Echo "${target_name##*.}"
Authorization
Chmod 775 / etc/udev/scripts/iscsidev.sh
Restart
Reboot
22. Grid user, rac1 installs grid
Upload files
Su-grid
[grid@rac1:/u01] $cd / u01/app/grid/soft
[grid@rac1:/u01/soft] $rz
Linuxx64_12201_grid_home
Extract the file
Unzip linuxx64_12201_grid_home.zip
Delete compressed package to save space
[grid@rac1:/u01/soft] $rm-rf linuxx64_12201_grid_home.zip
Verification
. / runcluvfy.sh stage-pre crsinst-n rac1,rac2-fixup-verbose
If you report to PRVE-0421: No entry exists in / etc/fstab for mounting / dev/shm
Can be ignored
Carry out installation
. / gridSetup.sh
Perform a rebuild if the disk state is Member
Dd if=/dev/zero of=/dev/sdb bs=1024 count=2056
23. Grid users, rac1 to view cluster status
Cd / u01/soft/grid/bin
. / crs_stat-t
Name Type Target State Host
Ora....SM.lsnr ora....er.type ONLINE ONLINE rac1
Ora.CRS.dg ora....up.type ONLINE ONLINE rac1
Ora....ER.lsnr ora....er.type ONLINE ONLINE rac1
Ora....AF.lsnr ora....er.type OFFLINE OFFLINE
Ora....N1.lsnr ora....er.type ONLINE ONLINE rac1
Ora.MGMTLSNR ora....nr.type ONLINE ONLINE rac1
Ora.asm ora.asm.type ONLINE ONLINE rac1
Ora.chad ora.chad.type ONLINE ONLINE rac1
Ora.cvu ora.cvu.type ONLINE ONLINE rac1
Ora.mgmtdb ora....db.type ONLINE ONLINE rac1
Ora....network ora....rk.type ONLINE ONLINE rac1
Ora.ons ora.ons.type ONLINE ONLINE rac1
Ora.qosmserver ora....er.type ONLINE ONLINE rac1
Ora....C1.lsnr application ONLINE ONLINE rac1
Ora.rac1.ons application ONLINE ONLINE rac1
Ora.rac1.vip ora....t1.type ONLINE ONLINE rac1
Ora....C2.lsnr application ONLINE ONLINE rac2
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
24. Grid users, rac1 create disk groups
Asmca
Create DATA and FRA disk groups
24. Oracle user, rac1 installs Oracle database software
Mkdir-p / u01/app/soft/
Cd / u01/app/soft/
Rz
Linuxx64_12201_database.zip
Unzip linuxx64_12201_database.zip
Rm-rf linuxx64_12201_database.zip
Cd database/
. / runInstaller
I forgot to cut the picture after the reconstruction (just finish it directly)
25. Oracle user, rac1 installation database
Dbca
The above is how to use Openfiler to achieve shared storage in the Oracle shared by the editor. If you happen to have similar doubts, you might as well refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.
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.