赞
踩
1.Oracle 19c RAC For Linux安装部署 (视频讲解)
https://edu.csdn.net/course/detail/35792
2.Oracle数据库 底层原理解析_解析oracle数据库内部实现(视频讲解)
https://edu.csdn.net/course/detail/35647
3.Oracle11gR2数据库安装
https://edu.csdn.net/course/detail/27750
4.Oracle 12c 数据库安装
https://edu.csdn.net/course/detail/35882
5.Oracle 19c 数据库一键安装
https://edu.csdn.net/course/detail/39198
6.Oracle 19c RAC For Linux安装部署 (视频讲解)
https://edu.csdn.net/course/detail/35792
7.oracle 19c 数据库基础和日常管理
https://edu.csdn.net/course/detail/36112
8.Oracle 11g DataGuard RAC集群到单节点部署
https://edu.csdn.net/course/detail/35959
9.Oracle数据库 底层原理解析_解析oracle数据库内部实现(视频讲解)
https://edu.csdn.net/course/detail/35647
10.MySQL数据库基础实战教程
https://edu.csdn.net/course/detail/26743
本章节详细介绍了Oracle19c RAC集群在Linux系统上的部署步骤。
部署环境信息
以下安装步骤以节点1为例
[root@localhost ~]# hostnamectl set-hostname node1
- vim /etc/hosts
-
- 127.0.0.1 localhost
-
- # Public ip
- 192.168.1.21 node1
- 192.168.1.22 node2
-
- # Private ip
- 10.0.60.21 node1-priv
- 10.0.60.22 node2-priv
-
- # Virture ip
- 192.168.1.23 node1-vip
- 192.168.1.24 node2-vip
-
- # Scan ip
- 192.168.1.25 scanip
- cd /etc/sysconfig/network-scripts
- [root@node1 network-scripts]# cat ifcfg-ens33
- TYPE=Ethernet
- BOOTPROTO=static
- NAME=ens33
- DEVICE=ens33
- ONBOOT=yes
- IPADDR=192.168.1.21
- GATEWAY=192.168.120.2
- NETMASK=255.255.255.0
-
- [root@node1 network-scripts]#cat ifcfg-ens34
- TYPE=Ethernet
- BOOTPROTO=static
- NAME=ens34
- DEVICE=ens34
- ONBOOT=yes
- IPADDR=10.0.60.21
- NETWORK=10.0.60.1
- NETMASK=255.255.255.0
- [root@node1 ~]# > /etc/yum.repos.d/my.repo
- [root@node1 ~]#cat >> /etc/yum.repos.d/my.repo << EOF
- [Oracle]
- name=oracle_install
- baseurl=file:///mnt/
- gpgcheck=0
- enabled=1
- EOF
- yum install -y binutils \
- compat-libcap1 \
- compat-libstdc++-33 \
- gcc \
- gcc-c++ \
- elfutils-libelf \
- elfutils-libelf-devel \
- glibc \
- glibc-devel \
- ksh \
- libaio \
- libaio-devel \
- libgcc \
- libstdc++ \
- libstdc++-devel \
- libxcb \
- libX11 \
- libXau \
- libXi \
- libXtst \
- libXrender \
- libXrender-devel \
- make \
- net-tools \
- nfs-utils \
- smartmontools \
- sysstat \
- e2fsprogs \
- e2fsprogs-libs \
- fontconfig-devel \
- expect \
- unzip \
- openssh-clients \
- readline* \
- bc
-
- yum install -y gnome*
-
- 单独上传compat-libstdc++-33,并安装
- rpm -ivh compat-libstdc++-33-3.2.3-72.el7.x86_64.rpm
-
- 检查rpm包安装情况
- rpm -q bc binutils compat-libcap1 compat-libstdc++-33 gcc gcc-c++ elfutils-libelf elfutils-libelf-devel glibc glibc-devel ksh libaio libaio-devel libgcc libstdc++ libstdc++-devel libxcb libX11 libXau libXi libXtst libXrender libXrender-devel make net-tools nfs-utils smartmontools sysstat e2fsprogs e2fsprogs-libs fontconfig-devel expect unzip openssh-clients readline | grep "not installed"
- systemctl stop firewalld.service
- systemctl disable firewalld.service
- systemctl status firewalld.service
-
- vim /etc/sysconfig/selinux
- SELINUX=enforcing¸Ä³ÉSELINUX=disabled
- 在NODE1节点配置就可以
- yum install -y tigervnc-server tigervnc-server-module
-
- 修改配置文件
- cat /etc/sysconfig/vncservers
- cat /lib/systemd/system/vncserver\@.service
- cp /lib/systemd/system/vncserver\@.service /etc/systemd/system/vncserver\@:1.service
-
- > /etc/systemd/system/vncserver\@:1.service
-
- cat >> /etc/systemd/system/vncserver\@:1.service << EOF
- [Unit]
- Description=Remote desktop service (VNC)
- After=syslog.target network.target
- [Service]
- Type=forking
- User=root
- ExecStartPre=-/usr/bin/vncserver -kill %i
- ExecStart=/usr/bin/vncserver %i
- PIDFile=/root/.vnc/%H%i.pid
- ExecStop=-/usr/bin/vncserver -kill %i
- [Install]
- WantedBy=multi-user.target
- EOF
-
- #注:用 root 的话用把/home/root/.vnc/%H%i.pid 改为/root/.vnc/%H%i.pid
-
- 设置vnc登录密码
- vncpasswd
-
- 启动vnc服务
- systemctl daemon-reload
- systemctl restart vncserver@:1.service
- systemctl enable vncserver@:1.service
-
- ss -lnt|grep 590
- LISTEN 0 5 *:5901 *:*
- LISTEN 0 5 :::5901 :::*
- cat >> /etc/sysctl.conf << EOF
- fs.aio-max-nr = 1048576
- fs.file-max = 6815744
- kernel.shmmni = 4096
- kernel.sem = 250 32000 100 128
- net.ipv4.ip_local_port_range = 9000 65500
- net.core.rmem_default = 4194304
- net.core.rmem_max = 4194304
- net.core.wmem_default = 262144
- net.core.wmem_max = 1048586
-
- kernel.shmall = 2359296
- kernel.shmmax = 9663676416
- EOF
-
-
- 使设置生效
- /sbin/sysctl -p
- cat >> /etc/profile <<EOF
- 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
- EOF
- cat >> /etc/security/limits.conf <<EOF
- grid soft nofile 1024
- grid hard nofile 65536
- grid soft stack 10240
- grid hard stack 32768
- grid soft nproc 2047
- grid hard nproc 16384
- oracle soft nofile 1024
- oracle hard nofile 65536
- oracle soft stack 10240
- oracle hard stack 32768
- oracle soft nproc 2047
- oracle hard nproc 16384
- oracle hard memlock 134217728
- oracle soft memlock 134217728
- EOF
- groupadd -g 14321 oinstall
- groupadd -g 14322 dba
- groupadd -g 14323 oper
- groupadd -g 14324 backupdba
- groupadd -g 14325 dgdba
- groupadd -g 14326 kmdba
- groupadd -g 14327 asmdba
- groupadd -g 14328 asmoper
- groupadd -g 14329 asmadmin
- groupadd -g 14330 racdba
-
- useradd -u 1100 -g oinstall -G asmadmin,asmdba,asmoper,dba,racdba,oper grid
- passwd grid
-
- useradd -u 1101 -g oinstall -G asmdba,dba,backupdba,dgdba,kmdba,racdba,oper oracle
- passwd oracle
- mkdir -p /u01/app/grid
- mkdir -p /u01/app/19.3.0/grid
- chown -R grid:oinstall /u01
- mkdir -p /u01/app/oracle
- chown -R oracle:oinstall /u01/app/oracle
- chmod -R 775 /u01
- su - grid
-
- [grid@node1 ~]$ vim .bash_profile
- #alias ls="ll -at"
- ORACLE_SID=+ASM1; export ORACLE_SID
- JAVA_HOME=/usr/local/java;export JAVA_HOME
- ORACLE_BASE=/u01/app/grid; export ORACLE_BASE
- ORACLE_HOME=/u01/app/19.3.0/grid; export ORACLE_HOME
- ORACLE_PATH=/u01/app/oracle/common/oracle/sql; export ORACLE_PATH
- ORACLE_TERM=xterm;export ORACLE_TERM
- NLS_DATE_FORMAT="YYYY-MM-DD HH24:MI:SS";export NLS_DATE_FORMAT
- TNS_ADMIN=$ORACLE_HOME/network/admin; export TNS_ADMIN
- ORA_NLS11=$ORACLE_HOME/nls/data; export ORA_NLS11
- PATH=.:${JAVA_HOME}/bin:${PATH}:$HOME/bin:$ORACLE_HOME/bin
- PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin
- PATH=${PATH}:/u01/app/common/oracle/bin
- export PATH
- LD_LIBRARY_PATH=$ORACLE_HOME/lib
- LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/oracm/lib
- LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib:/usr/lib:/usr/local/lib
- export LD_LIBRARY_PATH
- CLASSPATH=$ORACLE_HOME/JRE
- CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib
- CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib
- CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib
- export CLASSPATH
- THREADS_FLAG=native; export THREADS_FLAG
- export TEMP=/tmp
- export TMPDIR=/tmp
- #export NLS_LANG=american_america.ZHS16GBK
- #alias sqlplus="rlwrap sqlplus"
- umask 022
- su - oracle
-
- $ vim .bash_profile
- #alias ls="ll -at"
- ORACLE_SID=orcl1; export ORACLE_SID
- ORACLE_UNQNAME=orcl; export ORACLE_UNQNAME
- JAVA_HOME=/usr/local/java; export JAVA_HOME
- ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
- ORACLE_HOME=$ORACLE_BASE/product/19.3.0/dbhome_1; export ORACLE_HOME
- ORACLE_PATH=/u01/app/common/oracle/sql; export ORACLE_PATH
- ORACLE_TERM=xterm; export ORACLE_TERM
- NLS_DATE_FORMAT="DD-MON-YYYY HH24:MI:SS"; export NLS_DATE_FORMAT
- TNS_ADMIN=$ORACLE_HOME/network/admin; export TNS_ADMIN
- ORA_NLS11=$ORACLE_HOME/nls/data; export ORA_NLS11
- PATH=.:${JAVA_HOME}/bin:${PATH}:$HOME/bin:$ORACLE_HOME/bin
- PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin
- PATH=${PATH}:/u01/app/common/oracle/bin
- export PATH
- LD_LIBRARY_PATH=$ORACLE_HOME/lib
- LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/oracm/lib
- LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib:/usr/lib:/usr/local/lib
- export LD_LIBRARY_PATH
- CLASSPATH=$ORACLE_HOME/JRE
- CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib
- CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib
- CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib
- export CLASSPATH
- THREADS_FLAG=native; export THREADS_FLAG
- export TEMP=/tmp
- export TMPDIR=/tmp
- #export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
- umask 022
- #alias sqlplus="rlwrap sqlplus"
- #alias rman="rlwrap rman"
- 使用root用户
- service ntpd stop
- chkconfig ntpd off
- mv /etc/ntp.conf /etc/ntp.conf.bak
- 验证已安装 SSH 软件
- [root@node1 ~]# rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n"| grep ssh
- openssh-askpass-4.3p2-41.el5 (x86_64)
- openssh-clients-4.3p2-41.el5 (x86_64)
- openssh-4.3p2-41.el5 (x86_64)
- openssh-server-4.3p2-41.el5 (x86_64)
- ./sshUserSetup.sh -user grid -hosts "node1 node2" -advanced -exverify -confirm -noPromptPassphrase
- ./sshUserSetup.sh -user oracle -hosts "node1 node2" -advanced -exverify -confirm -noPromptPassphrase
-
- 验证节点互信
- su - grid
- ssh node1 "date;hostname"
- ssh node2 "date;hostname"
-
- su - oracle
- ssh node1 "date;hostname"
- ssh node2 "date;hostname"
- sed -i 's/quiet/quiet transparent_hugepage=never numa=off/' /etc/default/grub
- grub2-mkconfig -o /boot/grub2/grub.cfg
-
- 重启后检查是否生效
- cat /sys/kernel/mm/transparent_hugepage/enabled
- cat /proc/cmdline
- yum install -y avahi*
-
- systemctl stop avahi-daemon.socket
- systemctl stop avahi-daemon.service
-
- pgrep -f avahi-daemon | awk '{print "kill -9 "$2}'
-
- systemctl disable avahi-daemon.socket
- systemctl disable avahi-daemon.service
- cat <<EOF>>/etc/sysconfig/network
- NOZEROCONF=yes
- EOF
yum install xdpyinfo -y
- [root@node1 ~]$ cd /opt
- [root@node1 ~]$ chown grid.oinstall sw/
- [root@node1 ~]$ su - grid -c "unzip -q /opt/sw/LINUX.X64_19.3.0_193000_grid_home.zip -d /u01/app/19.3.0/grid"
- 使用root用户安装
- cd /u01/app/19.3.0/grid/cv/rpm/
- CVUQDISK_GRP=oinstall; export CVUQDISK_GRP
- rpm -ivh cvuqdisk-1.0.10-1.rpm
-
- 将cvuqdisk拷贝到其他节点
- scp cvuqdisk-1.0.10-1.rpm node2:/opt/sw
- CVUQDISK_GRP=oinstall; export CVUQDISK_GRP
- rpm -ivh cvuqdisk-1.0.10-1.rpm
- su - grid
- [grid@node1 ~]$ cd $ORACLE_HOME
- [grid@node1 grid]$ ./runcluvfy.sh stage -post hwos -n node1,node2 -verbose
- 调取图形界面
- [root@node1 ~]# xhost +
- access control disabled, clients can connect from any host
-
- [root@node1 ~]# su - grid
- [grid@node1 ~]$ export DISPLAY=192.168.1.21:1
-
- [grid@node1 ~]$ xhost +
- access control disabled, clients can connect from any host
-
- [grid@node1 ~]$ cd /u01/app/19.3.0/grid
- [grid@node1 grid]#./gridSetup.sh
asmca
-
- 上传数据库软件并解压,解压到grid的home目录
- [root@node1 ~]$ cd /opt
- [root@node1 ~]$ chown oracle.oinstall sw/ -R
- [root@node1 ~]$ su - oracle -c "unzip -q /opt/sw/LINUX.X64_19.3.0_193000_db_home.zip -d /u01/app/oracle/product/19.3.0/dbhome_1"
- su - oracle
- [oracle@node1 ~]$ export DISPLAY=192.168.1.21:1
- [oracle@node1 ~]$ cd /u01/app/oracle/product/19.3.0/dbhome_1
- [oracle@node1 dbhome_1]$ ./runInstaller
dbca
以上是Oracle19c RAC集群linux平台上安装的详细步骤。以上部署是在节点1的配置步骤,节点2第1部分系统配置和第2部分存储配置配置步骤一样;第3部分集群和数据库的安装,只需要在节点1执行即可。
1.Oracle数据库 底层原理解析_解析oracle数据库内部实现(视频讲解)
详细讲解了Oracle数据库内部是如何实现的,以及Oracle数据库的设计思路;
以此举一反三,可以轻松掌握MySQL与PostgreSQL数据库的设计思想与不同之处。
https://edu.csdn.net/course/detail/35647
2.Oracle 19c RAC For Linux安装部署(视频讲解)
https://edu.csdn.net/course/detail/35792
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。