少年恃险若平地,独倚长剑凌清秋。这篇文章主要讲述CentOS 7.9x64 配置ASM安装 Oracle 12cR1相关的知识,希望能为你提供帮助。
CentOS 7.9x64配置ASM安装 Oracle 12cR1标签(空格分隔): oracle 系列
?
1. 系统环境初始化
1.1 系统介绍
?
1. 系统:
CentOS7.9x642. 主机名:cat /etc/hosts ----172.16.10.11flyfishsrvs01
172.16.10.12flyfishsrvs02
172.16.10.13flyfishsrvs03
172.16.10.14flyfishsrvs04
172.16.10.15flyfishsrvs05
172.16.10.16flyfishsrvs06
172.16.10.17flyfishsrvs07----本次安装flyfishsrvs04 主机 安装Oracle12R2
1.2 系统初始化
echo "export LANG=en_US.UTF8" >
>
~/.bash_profilecat ~/.bash_profile
source ~/.bash_profile/usr/sbin/groupadd -g 60001 oinstall
/usr/sbin/groupadd -g 60002 dba
/usr/sbin/groupadd -g 60003 oper
/usr/sbin/groupadd -g 60004 backupdba
/usr/sbin/groupadd -g 60005 dgdba
/usr/sbin/groupadd -g 60006 kmdba
/usr/sbin/groupadd -g 60007 asmdba
/usr/sbin/groupadd -g 60008 asmoper
/usr/sbin/groupadd -g 60009 asmadminuseradd -u 61001 -g oinstall -G dba,asmdba,backupdba,dgdba,kmdba,oper oracle
useradd -u 61002 -g oinstall -G asmadmin,asmdba,asmoper,dba gridecho grid |passwd grid --stdin echo oracle |passwd oracle --stdin mkdir -p /u01/app/grid
mkdir -p /u01/app/12.2/grid
chown -R oracle:oinstall /u01mkdir -p /u01/app/oracle
chown -R oracle:oinstall /u01/app/oraclemkdir -p /u01/app/oraInventory
chown -R oracle:oinstall /u01/app/oraInventory
chmod -R 775 /u01系统依赖包yum -y install autoconf
yum -y install automake
yum -y install binutils
yum -y install binutils-devel
yum -y install bison
yum -y install cpp
yum -y install dos2unix
yum -y install ftp
yum -y install gcc
yum -y install gcc-c++
yum -y install lrzsz
yum -y install python-devel
yum -y install compat-db*
yum -y install compat-gcc-34
yum -y install compat-gcc-34-c++
yum -y install compat-libcap1
yum -y install compat-libstdc++-33
yum -y install compat-libstdc++-33.i686
yum -y install glibc-*
yum -y install glibc-*.i686
yum -y install libXpm-*.i686
yum -y install libXp.so.6
yum -y install libXt.so.6
yum -y install libXtst.so.6
yum -y install libXext
yum -y install libXext.i686
yum -y install libXtst
yum -y install libXtst.i686
yum -y install libX11
yum -y install libX11.i686
yum -y install libXau
yum -y install libXau.i686
yum -y install libxcb
yum -y install libxcb.i686
yum -y install libXi
yum -y install libXi.i686
yum -y install libXtst
yum -y install libstdc++-docs
yum -y install libgcc_s.so.1
yum -y install libstdc++.i686
yum -y install libstdc++-devel
yum -y install libstdc++-devel.i686
yum -y install libaio
yum -y install libaio.i686
yum -y install libaio-devel
yum -y install libaio-devel.i686
yum -y install ksh
yum -y install libXp
yum -y install libaio-devel
yum -y install numactl
yum -y install numactl-devel
yum -y install make -y
yum -y install sysstat -y
yum -y install unixODBC
yum -y install unixODBC-devel
yum -y install elfutils-libelf-devel-0.97
yum -y install elfutils-libelf-devel
yum -y install redhat-lsb-corevi /etc/security/limits.conf#ORACLE SETTING
gridsoftnproc16384
gridhardnproc16384
gridsoftnofile65536
gridhardnofile65536
gridsoftstack32768
gridhardstack32768
oraclesoftnproc16384
oraclehardnproc16384
oraclesoftnofile65536
oraclehardnofile65536
oraclesoftstack32768
oraclehardstack32768
oraclehardmemlock 6000000
oraclesoftmemlock6000000echo "sessionrequiredpam_limits.so" >
>
/etc/pam.d/logincat /etc/pam.d/loginvi /etc/sysctl.conf#ORACLE SETTING
fs.aio-max-nr = 1048576
fs.file-max = 6815744
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
kernel.panic_on_oops = 1
kernel.shmmax = 5033164800
kernel.shmall = 1228800
kernel.shmmni = 4096
vm.nr_hugepages = 2500
sysctl -pcat /sys/kernel/mm/transparent_hugepage/defrag
[always] madvise nevercat /sys/kernel/mm/transparent_hugepage/enabled
[always] madvise nevervi /etc/rc.d/rc.localif test -f /sys/kernel/mm/transparent_hugepage/enabled;
then
echo never >
/sys/kernel/mm/transparent_hugepage/enabled
fi
if test -f /sys/kernel/mm/transparent_hugepage/defrag;
then
echo never >
/sys/kernel/mm/transparent_hugepage/defrag
fichmod +x /etc/rc.d/rc.localyum install numactl -ynumactl --hardwarevi /etc/default/grubnuma=offgrub2-mkconfig -o /etc/grub2.cfgnumactl --hardwaresystemctl set-default multi-user.targetvi /etc/fstab
none/dev/shmtmpfsdefaults,size=6144m0 0mount -o remount /dev/shmecho "SELINUX=disabled" >
/etc/selinux/config
echo "#SELINUXTYPE=targeted " >
>
/etc/selinux/config
setenforce 0systemctl stop firewalld.service
systemctl disable firewalld.service
systemctl status firewalld.serviceASM 环境变量:PS1="[`whoami`@`hostname`:"$PWD]$
export PS1
umask 022
#alias sqlplus="rlwrap sqlplus"
export TMP=/tmp
export LANG=en_US.UTF8
export TMPDIR=$TMP
export TZ=Asia/Shanghai
ORACLE_SID=+ASM;
export ORACLE_SID
ORACLE_TERM=xterm;
export ORACLE_TERM
ORACLE_BASE=/u01/app/grid;
export ORACLE_BASE
ORACLE_HOME=/u01/app/12.2/grid;
export ORACLE_HOME
NLS_DATE_FORMAT="yyyy-mm-dd HH24:MI:SS";
export NLS_DATE_FORMAT
PATH=$PATH:$HOME/.local/bin:$HOME/bin:$ORACLE_HOME/bin;
export PATH
THREADS_FLAG=native;
export THREADS_FLAG
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
fiDISPLAY=172.16.10.1:0.0
export DISPLAYstty erase ^h Oracle 环境变量PS1="[`whoami`@`hostname`:"$PWD]$
#alias sqlplus="rlwrap sqlplus"
#alias rman="rlwrap rman"
export PS1
export TMP=/tmp
export LANG=en_US
export TMPDIR=$TMP
export TZ=Asia/Shanghai
export ORACLE_UNQNAME=flyfishdb
ORACLE_SID=flyfishdb;
export ORACLE_SID
ORACLE_BASE=/u01/app/oracle;
export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/12.2/db_1;
export ORACLE_HOME
ORACLE_TERM=xterm;
export ORACLE_TERM
NLS_DATE_FORMAT="yyyy-mm-dd HH24:MI:SS";
export NLS_DATE_FORMAT
NLS_LANG=AMERICAN_AMERICA.UTF8;
export NLS_LANG
PATH=.:$PATH:$HOME/.local/bin:$HOME/bin:$ORACLE_BASE/product/12.2/db-1/bin:$ORACLE_HOME/bin;
export PATH
THREADS_FLAG=native;
export THREADS_FLAG
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
fiDISPLAY=172.16.10.1:0.0
export DISPLAYstty erase ^h
2. Oracle ASM 部署实施 2.1 Oracle asm安装包准备
安装依赖包:
yum install -y bind-utils compat-libcap1 glibc-devel ksh libaio-devel libstdc++-devel nfs-utils psmisc smartmontools xorg-x11-utils xorg-x11-xauth elfutils-libelf-devel ksh libaio-devel ncurses-devel readline-devel zlib-devel gcc-c++
这几个包去 Oracle Linux 7.9x64 iso 里面提取
compat-libstdc++-33-3.2.3-72.el7.x86_64.rpm
kmod-oracleasm-2.0.8-28.0.1.el7.x86_64.rpm
oracleasmlib-2.0.12-1.el7.x86_64.rpm
oracleasm-support-2.1.11-2.el7.x86_64.rpm下面这几个包去Oracle 官网下
oracleasmlib-2.0.12-1.el7.x86_64.rpm下载地址:
https://www.oracle.com/linux/downloads/linux-asmlib-v7-downloads.html
rpm -ivh compat-libstdc++-33-3.2.3-72.el7.x86_64.rpm rpm -ivh kmod-oracleasm-2.0.8-28.0.1.el7.x86_64.rpm rpm -ivh oracleasm-support-2.1.11-2.el7.x86_64.rpm rpm -ivh oracleasmlib-2.0.12-1.el7.x86_64.rpm
文章图片
oracleasm --help
文章图片
添加一块磁盘:fdisk /dev/sdb分区不用格式化 /dev/sdb1新建ASM磁盘
oracleasm configure -i
文章图片
oracleasm init oracleasm createdisk DISK0 /dev/sdb1 oracleasm listdisks
文章图片
2.2 配置ASM grid
su - oracleunzip linuxamd64_12102_grid_1of2.zip
unzip linuxamd64_12102_grid_2of2.zip
文章图片
加载grid-env.sh. ./grid-env.sh
文章图片
安装ASM
cd /home/oracle/grid
./runInstaller
文章图片
文章图片
文章图片
冗余方式选择——
● normal:相同的数据在磁盘中至少存储两份;
● high:存储三份;
● external:不提供冗余。
● AU size:分配单元的大小。因为我们这边只有一块所以具选external 不提供冗余
文章图片
密钥相同都用Oracle
文章图片
文章图片
文章图片
文章图片
文章图片
文章图片
文章图片
文章图片
文章图片
文章图片
文章图片
文章图片
sh /u01/app/oraInventory/orainstRoot.shsh /u01/app/12.2/grid/root.sh
文章图片
文章图片
文章图片
3. 安装 Oracle 12c
加载 Oracle 12c 环境变量source .bash_profile env |grep ORA
文章图片
su - oracle unzip linuxamd64_12102_database_1of2.zipunzip linuxamd64_12102_database_2of2.zipcd database ./runInstaller
文章图片
文章图片
文章图片
文章图片
文章图片
文章图片
文章图片
【CentOS 7.9x64 配置ASM安装 Oracle 12cR1】
文章图片
文章图片
文章图片
文章图片
文章图片
Oracle 12c 安装完成
4. 创建数据库
netca
文章图片
文章图片
文章图片
文章图片
文章图片
文章图片
文章图片
文章图片
文章图片
文章图片
文章图片
文章图片
文章图片
文章图片
文章图片
文章图片
5. 系统配置
登录数据库su - oracle sqlplus/ as sysdba
文章图片
推荐阅读
- 文件查找locate和find ,参数替换xargs
- #yyds干货盘点#RabbitMQ示例2(工作队列)
- #yyds干货盘点#CSS-ing Candy Ghost 按钮
- WP get_footer函数不显示页脚
- WP-子主题获取主题目录
- wp-bootstrap-nav walker崩溃在iPad上不起作用
- Wordress-如何使用非WordPress主题
- WordPress-wp_nav_menu container_class不更改容器类
- wordpress(woocomerce)如何向标题添加按钮