Oracle12c On 银河麒麟的安装过程


学习官网资料

下载最新版的preinstall文件
https://yum.oracle.com/repo/OracleLinux/OL8/appstream/x86_64/getPackage/oracle-database-preinstall-19c-1.0-2.el8.x86_64.rpm 安装必备的部分软件 yum install ksh* libnsl* -y 添加一个配置文件
cat > /etc/redhat-release <<EOF
CentOS Linux release 8.0
EOF 安装preinstall 的rpm
rpm -ivh oracle-database-preinstall-19c-1.0-2.el8.x86_64.rpm --nodeps --force

学习下rpm内的内容

解压缩rpm包
rpm2cpio oracle-database-preinstall-19c-1.0-2.el8.x86_64.rpm |cpio -div rpm2cpio oracle-database-preinstall-19c-1.0-2.el8.x86_64.rpm |cpio -div
./etc/rc.d/init.d/oracle-database-preinstall-19c-firstboot
./etc/sysconfig/oracle-database-preinstall-19c
./etc/sysconfig/oracle-database-preinstall-19c/oracle-database-preinstall-19c-verify
./etc/sysconfig/oracle-database-preinstall-19c/oracle-database-preinstall-19c.param
./usr/bin/oracle-database-preinstall-19c-verify
./usr/share/licenses/oracle-database-preinstall-19c
./usr/share/licenses/oracle-database-preinstall-19c/LICENSE
./var/log/oracle-database-preinstall-19c
./var/log/oracle-database-preinstall-19c/results
159 块 发现核心脚本应该是:
oracle-database-preinstall-19c-verify 可以查看安装后的日志信息
/var/log/oracle-database-preinstall-19c/results/

Preinstall 安装日志学习与分析

/var/log/oracle-database-preinstall-19c/results/orakernel.log

第一部分用户相关

Adding group oinstall with gid 54321
Adding group dba with gid 54322
Adding group oper with gid 54323
Adding group backupdba with gid 54324
Adding group dgdba with gid 54325
Adding group kmdba with gid 54326
Adding group racdba with gid 54330
Adding user oracle with user id 54321, initial login group oinstall, supplementary groups oinstall,dba,oper,backupdba,dgdba,kmdba,racdba and home directory /home/oracle
Changing ownership of /home/oracle to oracle:oinstall
Please set password for user - oracle
uid=54321(oracle) gid=54321(oinstall) groups=54321(oinstall),54330(racdba),54322(dba),54323(oper),54324(backupdba),54325(dgdba),54326(kmdba)
User creation passed

第二部分内核参数相关

Saving a copy of the initial sysctl.conf
Verifying kernel parameters as per Oracle recommendations...
Trying to remove instances of - setting for fs.file-max is
Adding fs.file-max = 6815744
Trying to remove instances of - setting for kernel.sem is
Adding kernel.sem = 250 32000 100 128
Trying to remove instances of - setting for kernel.shmmni is
Adding kernel.shmmni = 4096
Trying to remove instances of - setting for kernel.shmall is
Adding kernel.shmall = 1073741824
Trying to remove instances of - setting for kernel.shmmax is
Adding kernel.shmmax = 4398046511104
Trying to remove instances of - setting for kernel.panic_on_oops is
Adding kernel.panic_on_oops = 1
Trying to remove instances of - setting for net.core.rmem_default is
Adding net.core.rmem_default = 262144
Trying to remove instances of - setting for net.core.rmem_max is
Adding net.core.rmem_max = 4194304
Trying to remove instances of - setting for net.core.wmem_default is
Adding net.core.wmem_default = 262144
Trying to remove instances of - setting for net.core.wmem_max is
Adding net.core.wmem_max = 1048576
Trying to remove instances of - setting for net.ipv4.conf.all.rp_filter is
Changing net.ipv4.conf.all.rp_filter to match preinstall config
net.ipv4.conf.all.rp_filter = 2
Trying to remove instances of - setting for net.ipv4.conf.default.rp_filter is
Changing net.ipv4.conf.default.rp_filter to match preinstall config
net.ipv4.conf.default.rp_filter = 2
Trying to remove instances of - setting for fs.aio-max-nr is
Adding fs.aio-max-nr = 1048576
Trying to remove instances of - setting for net.ipv4.ip_local_port_range is
Changing net.ipv4.ip_local_port_range to match preinstall config
net.ipv4.ip_local_port_range = 9000 65500
Setting kernel parameters as per oracle recommendations...
Altered file /etc/sysctl.conf
Saved a copy of the current file in /etc/sysctl.d/99-oracle-database-preinstall-19c-sysctl.conf
Check /etc/sysctl.d for backups
Verification & setting of kernel parameters passed Setting user limits using /etc/security/limits.d/oracle-database-preinstall-19c.conf

资源限制与内核启动参数

Verifying oracle user OS limits as per Oracle recommendations...
Adding oracle soft nofile 1024
Adding oracle hard nofile 65536
Adding oracle soft nproc 16384
Adding oracle hard nproc 16384
Adding oracle soft stack 10240
Adding oracle hard stack 32768
Adding oracle hard memlock 134217728
Adding oracle soft memlock 134217728
Adding oracle soft data unlimited
Adding oracle hard data unlimited
Setting oracle user OS limits as per Oracle recommendations...
Altered file /etc/security/limits.d/oracle-database-preinstall-19c.conf
Original file backed up at /var/log/oracle-database-preinstall-19c/backup/Oct-23-2023-10-53-22
Verification & setting of user limits passed Saving a copy of /etc/default/grub file in /etc/default/grub-initial.orabackup
Saving a copy of /etc/default/grub in /var/log/oracle-database-preinstall-19c/backup/Oct-23-2023-10-53-22...
Verifying kernel boot parameters as per Oracle recommendations...
old boot params: "resume=/dev/mapper/klas-swap rd.lvm.lv=klas/root rd.lvm.lv=klas/swap rhgb quiet crashkernel=1024M,high audit=0"
new boot params: "resume=/dev/mapper/klas-swap rd.lvm.lv=klas/root rd.lvm.lv=klas/swap rhgb quiet crashkernel=1024M,high audit=0 numa=off" Setting boot params - Checking for blscfg
old boot params: "resume=/dev/mapper/klas-swap rd.lvm.lv=klas/root rd.lvm.lv=klas/swap rhgb quiet crashkernel=1024M,high audit=0 numa=off"
new boot params: "resume=/dev/mapper/klas-swap rd.lvm.lv=klas/root rd.lvm.lv=klas/swap rhgb quiet crashkernel=1024M,high audit=0 numa=off transparent_hugepage=never"

其他部分

Setting boot params - Checking for blscfg
Setting kernel boot parameters as per Oracle recommendations...
G_DIR=/boot/grub2
Checking for blscfg
Getting the first entry available in /boot/grub2/grub.cfg for 1b7a5f5e75a347ed83bd41d1d51fd630-4.19.90-52.15.v2207.ky10.x86_64
Default kernel is -> 1b7a5f5e75a347ed83bd41d1d51fd630-4.19.90-52.15.v2207.ky10.x86_64
Default saved_entry is -> 1b7a5f5e75a347ed83bd41d1d51fd630-4.19.90-52.15.v2207.ky10.x86_64
Default saved_entry_line is -> linux /vmlinuz-0-rescue-1b7a5f5e75a347ed83bd41d1d51fd630 root=/dev/mapper/klas-root ro resume=/dev/mapper/klas-swap rd.lvm.lv=klas/root rd.lvm.lv=klas/swap rhgb quiet crashkernel=1024M,high audit=0
Saving a copy of grubenv... in /var/log/oracle-database-preinstall-19c/backup/Oct-23-2023-10-53-22
Generating grub configuration file ...
File descriptor 199 (/run/lock/subsys/oracle-preinstall.lock) leaked on vgs invocation. Parent PID 35764: /usr/sbin/grub2-probe
File descriptor 199 (/run/lock/subsys/oracle-preinstall.lock) leaked on vgs invocation. Parent PID 35764: /usr/sbin/grub2-probe
Found linux image: /boot/vmlinuz-4.19.90-52.15.v2207.ky10.x86_64
Found initrd image: /boot/initramfs-4.19.90-52.15.v2207.ky10.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-1b7a5f5e75a347ed83bd41d1d51fd630
Found initrd image: /boot/initramfs-0-rescue-1b7a5f5e75a347ed83bd41d1d51fd630.img
File descriptor 199 (/run/lock/subsys/oracle-preinstall.lock) leaked on vgs invocation. Parent PID 36009: /usr/sbin/grub2-probe
File descriptor 199 (/run/lock/subsys/oracle-preinstall.lock) leaked on vgs invocation. Parent PID 36009: /usr/sbin/grub2-probe
done
File descriptor 199 (/run/lock/subsys/oracle-preinstall.lock) leaked on vgs invocation. Parent PID 36459: grub2-probe
File descriptor 199 (/run/lock/subsys/oracle-preinstall.lock) leaked on vgs invocation. Parent PID 36459: grub2-probe
The saved kernel 1b7a5f5e75a347ed83bd41d1d51fd630-4.19.90-52.15.v2207.ky10.x86_64 is now at position - 1
Boot parameters will be effected on next reboot
Altered file /etc/default/grub
Copy of the changed file is in - /etc/default/grub-oracle-database-preinstall-19c.orabackup
Copy of the original file is in - /var/log/oracle-database-preinstall-19c/backup/Oct-23-2023-10-53-22
Verification & setting of boot parameters passed Trying to add NOZEROCONF parameter...
Taking a backup of existing file to /etc/sysconfig/network.orabackup
Successfully added parameter NOZEROCONF to /etc/sysconfig/network
Setting /etc/sysconfig/network parameters passed Disabling Transparent Hugepages.
Refer Oracle Note:1557478.1 Disabling defrag.
Refer Oracle Note:1557478.1

安装过程中报错

在银河麒麟上面 解压缩完安装文件 执行命令会报错:
自己以为是 文件损坏, 然后计算了md5 发现还是不可以.
经过自己的查询 发现是 oracle 自带的一个unzip 软件与银河麒麟不兼容, 需要将unzip 从/usr/bin/unzip 复制一份到 oracle安装目录的 unzip 目录下面 安装成功后 建议也复制一份到 oracle 的bin目录下面比如我这边
scp /usr/bin/unzip `which unzip` 详细错误信息见下方: Usage: unzip [-Z] [-opts[modifiers]] file[.zip] [list] [-x xlist] [-d exdir]
Default action is to extract files in list, except those in xlist, to exdir;
file[.zip] may be a wildcard. -Z => ZipInfo mode ("unzip -Z" for usage). -p extract files to pipe, no messages -l list files (short format)
-f freshen existing files, create none -t test compressed archive data
-u update files, create if necessary -z display archive comment only
-v list verbosely/show version info -T timestamp archive to latest
-x exclude files that follow (in xlist) -d extract files into exdir
modifiers:
-n never overwrite existing files -q quiet mode (-qq => quieter)
-o overwrite files WITHOUT prompting -a auto-convert any text files
-j junk paths (do not make directories) -aa treat ALL files as text
-U use escapes for all non-ASCII Unicode -UU ignore any Unicode fields
-C match filenames case-insensitively -L make (some) names lowercase
-X restore UID/GID info -V retain VMS version numbers
-K keep setuid/setgid/tacky permissions -M pipe through "more" pager
See "unzip -hh" or unzip.txt for more help. Examples:
unzip data1 -x joe => extract all files except joe from zipfile data1.zip
unzip -p foo | more => send contents of foo.zip via pipe into program more
unzip -fo foo ReadMe => quietly replace existing ReadMe if archive file newer

设置环境变量

export NLS_LANG="AMERICAN_AMERICA.UTF8"
export TMP=/tmp
export TMPDIR=$TMP export ORACLE_HOSTNAME=oracle12c
export ORACLE_UNQNAME=ora12c
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/12.2.0.1/db_1
export ORACLE_HOME_LISTNER=$ORACLE_HOME
export ORACLE_SID=ora12c export PATH=/usr/sbin:/usr/local/bin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib

密码有效期重试策略等设置

alter profile default limit FAILED_LOGIN_ATTEMPTS unlimited ;
ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED;

基本的Oracle性能调优参数列表

1. 关闭recyclebin
2. 调大process和session
3. 根据内存设置好 SGA和PGA
4. 内存较大时设置好大页(注意此处不是透明大页.)
5. 适当的改大Open_Cursors 以及 session_cursors的值来提高性能.
6. 修改redo 增加文件大小和文件数量以便提高性能.
7. dbfiles 默认值是200 可以到 6400G, 逻辑值最高为 1022 可以使用 累计总量32T的数据文件.

设置开机启动

修改配置文件
vim /etc/oratab
注意按照要求
# Entries are of the form:
# $ORACLE_SID:$ORACLE_HOME:<N|Y>:
输入Y 数据库可以开机时启动 可以使用 contab 或者是其他rc.local等设置一下启动时的脚本
建议使用 systemd 脚本的模式, 更加方便快捷一些 另外注意 可以在脚本里面将环境变量补足, 因为crontab 的启动时 读取的环境变量不全. 比如我这边
/deploy/startoracle
内容为: export NLS_LANG="AMERICAN_AMERICA.UTF8"
export TMP=/tmp
export TMPDIR=$TMP export ORACLE_HOSTNAME=oracle12c
export ORACLE_UNQNAME=ora12c
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/12.2.0.1/db_1
export ORACLE_HOME_LISTNER=$ORACLE_HOME
export ORACLE_SID=ora12c export PATH=/usr/sbin:/usr/local/bin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib su oracle -lc dbstart 然后设置开机启动 crontab -e
@reboot /deploy/startoracle

其他

准备有时间学习和解析一下 preinstall 设置参数的含义和具体用途

Oracle12c On 银河麒麟v10SP3 的安装过程的更多相关文章

  1. 银河麒麟V10在线安装Postgresql步骤

    参考资料https://blog.csdn.net/u010430471/article/details/81663248 https://blog.csdn.net/qq_41619524/arti ...

  2. 银河麒麟服务器V10-SP2安装tomcat

    1.首先先去tomcat官网下载一个安装包 2.创建一个存放压缩包的文件夹,并考入文件 3.解压tomcat压缩包 命令: tar -xvf 压缩包名 4.启动tomcat 进入apache-tomc ...

  3. 银河麒麟V10安装ASP.NET Core并配置Supervisor让网站开机自动运行

    银河麒麟高级服务器操作系统V10是针对企业级关键业务,适应虚拟化.云计算.大数据.工业互联网时代对主机系统可靠性.安全性.性能.扩展性和实时性的需求,依据CMMI 5级标准研制的提供内生安全.云原生支 ...

  4. ubuntukylin16.04LTS(乌班图麒麟版长期支持版,并非银河麒麟)安装体验

    最近,国产银河麒麟版在政府部门推广使用.我有幸接触了,感觉还是不错的.这次政府软件正版化整改中,也列入了windows和银河麒麟的选项.我想试安装一下,可是没找到.就近找了它的类似系统ubuntuky ...

  5. 国产化之虚拟ARM64-CPU安装银河麒麟操作系统

    背景 某个项目需要实现基础软件全部国产化,其中操作系统指定银河麒麟v4,CPU使用飞腾处理器.我本地没有这个国产的处理器,但飞腾是基于ARMv8架构的64位处理器,所以理论上基于这个CPU架构的硬件应 ...

  6. 国产化之银河麒麟安装达梦数据库DM8

    背景 某个项目需要实现基础软件全部国产化,其中操作系统指定银河麒麟,数据库使用DM8. 虽然在之前的文章中已经成功模拟国产飞腾处理器,但是运行效率不高,所以这里的银河麒麟操作系统还是运行在x64平台上 ...

  7. 初学银河麒麟linux笔记 第一章 虚拟机、麒麟系统、QT安装与运行

    由于手头一个项目的QT软件开发需要在银河麒麟系统上运行,借此机会开始从头学习linux系统 首先下载虚拟机VMware 16和麒麟系统iso,这里参考的 https://blog.51cto.com/ ...

  8. 企业实践 | 国产操作系统之光? 银河麒麟KylinOS-V10(SP3)高级服务器操作系统基础安装篇

    [点击 关注「 全栈工程师修炼指南」公众号 ] 设为「️ 星标」带你从基础入门 到 全栈实践 再到 放弃学习! 涉及 网络安全运维.应用开发.物联网IOT.学习路径 .个人感悟 等知识分享. 希望各位 ...

  9. 国产银河麒麟 安装wps 的简单方法

    前提说明 银河麒麟 是总部在天津的企业 有国防科大还有 ubuntu的母公司一起在维护 主要的产品有 优麒麟 还有 银河麒麟 优麒麟 可以看做是 国产版的ubuntu的社区版 银河麒麟 则是 面向国内 ...

  10. 国产化之银河麒麟安装.NetCore-包管理器方式

    背景 某个项目需要实现基础软件全部国产化,其中操作系统指定银河麒麟,数据库使用达梦V8,CPU平台的范围包括x64.龙芯.飞腾.鲲鹏等. 考虑到这些基础产品对.NETCore的支持,最终选择了3.1版 ...

随机推荐

  1. 4.elasticsearch中聚合查询

    elasticsearch聚合查询 什么是聚合,就是目的不是查询具体的文档,而是查询文档的相关性,此外还可以对聚合的文档在按照其他维度再聚合. 包含以下四种聚合 Bucket Aggregation ...

  2. vue图片由小放大

    原生效果 <template> <div> <transition> <img :src="imageUrl" class="i ...

  3. GaussDB技术解读系列之SQL Audit,面向应用开发的SQL审核工具

    本文分享自华为云社区<​​GaussDB技术解读系列之SQL Audit,面向应用开发的SQL审核工具>​​,作者:华为云数据库和应用迁移专家. 前言 我们先从一个SQL语句说起(以某传统 ...

  4. 云图说|云数据库GaussDB如何做到卓越性能

    摘要:对于数据库来说,性能一直被视为最关键的部分.GaussDB作为华为自主创新研发的分布式关系型数据库,那么华为云数据库GaussDB在提升数据库性能方面都有哪些黑科技呢? 本文分享自华为云社区&l ...

  5. OpenCV萌新福音:易上手的数字识别实践案例

    摘要:信用卡识别的案例用到了图像处理的一些基本操作,对刚上手CV的人来说还是比较友好的. 本文分享自华为云社区<Python openCV案例:信用卡数字识别>,原文作者:深蓝的回音 . ...

  6. 聊聊Java的异常机制问题

    摘要:java异常指在程序运行时可能出现的一些错误,如:文件找不到.网络连接失败.非法参数等.异常是一个事件,它发生在程序运行期间,中断了正在执行的程序的正常指令流. 本文分享自华为云社区<Ja ...

  7. 华为云云原生数据库GaussDB加速创新,企业核心数据上云信赖之选

    集大会演讲.圆桌讨论.精彩活动及现场直击....一大波华为开发者大会2021干货资料来喽~~!还等什么快快来领取技术福利! 摘要:华为开发者大会(Cloud)上,华为云发布了云原生数据库GaussDB ...

  8. 数字化转型鸿沟如何消除?ROMA Connect融合集成,联接企业应用现在与未来

    摘要:ROMA Connect平台正在以"联接和融合"的方式,重塑传统企业上云的路径--"条条大路"通向云端. 本文分享自华为云社区<[大厂内参]第13期 ...

  9. 【终极教程】Cocos2dx服务端重构(优化cocos2dx服务端)

    [终极教程]Cocos2dx服务端重构(优化cocos2dx服务端) 文章目录 概述 问题概述1. 代码混淆代码加密具体步骤测试和配置阶段IPA 重签名操作步骤2. 缺乏文档3. 缺乏推荐的最佳实践4 ...

  10. BitSail“拍了拍”你,并给你一份快速入门指南

    本 Quick Guide 面向 BitSail 新手入门使用人员,从源码编译.产物结构.如何提交作业.实机演示等多方面带领大家迅速入门 BitSail,从 0 到 1 了解并完成 BitSail 基 ...