首页 > 数据库 >Oracle 19C静默安装详解

Oracle 19C静默安装详解

时间:2022-10-18 22:00:29浏览次数:46  
标签:app firewalld tcp 详解 yum ipv4 install Oracle 19C

1.检查主机名和网络并且配置/etc/hosts文件

关闭防火墙

#检查防火墙状态
[root@bogon app]# systemctl status firewalld.service
● firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2022-10-18 10:35:47 CST; 2h 57min ago
Docs: man:firewalld(1)
Main PID: 5302 (firewalld)
CGroup: /system.slice/firewalld.service
└─5302 /usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid

Oct 18 10:35:46 localhost.localdomain systemd[1]: Starting firewalld - dynamic firewall daemon...
Oct 18 10:35:47 localhost.localdomain systemd[1]: Started firewalld - dynamic firewall daemon.

Oracle 19C静默安装详解_linux

#暂时关闭防火墙,下次启动时防火墙仍随系统启动而启动
[root@bogon app]# systemctl stop firewalld.service
#彻底永久关闭防火墙
[root@bogon app]# systemctl disable firewalld.service
Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
#再次查看防火墙状态,已关闭
[root@bogon app]# systemctl status firewalld.service
● firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
Active: inactive (dead)
Docs: man:firewalld(1)

Oct 18 10:35:46 localhost.localdomain systemd[1]: Starting firewalld - dynamic firewall daemon...
Oct 18 10:35:47 localhost.localdomain systemd[1]: Started firewalld - dynamic firewall daemon.
Oct 18 13:34:31 bogon systemd[1]: Stopping firewalld - dynamic firewall daemon...
Oct 18 13:34:32 bogon systemd[1]: Stopped firewalld - dynamic firewall daemon.

Oracle 19C静默安装详解_vim_02

修改主机名

[root@bogon app]# vim /etc/hosts
10.0.1.143 ismdb

Oracle 19C静默安装详解_linux_03

关闭SELINUX防火墙,将SELINUX=enforcing改为SELINUX=disabled

[root@bogon app]# vim /etc/selinux/config
***
SELINUX=disabled
***

Oracle 19C静默安装详解_linux_04

2.安装ORACLE先决条件的软件包

yum install -y bc
yum install -y compat-libcap1*
yum install -y compat-libcap*
yum install -y binutils
yum install -y compat-libstdc++-33
yum install -y elfutils-libelf
yum install -y elfutils-libelf-devel
yum install -y gcc
yum install -y gcc-c++
yum install -y glibc-2.5
yum install -y glibc-common
yum install -y glibc-devel
yum install -y glibc-headers
yum install -y ksh libaio
yum install -y libaio-devel
yum install -y libgcc
yum install -y libstdc++
yum install -y libstdc++-devel
yum install -y make
yum install -y sysstat
yum install -y unixODBC
yum install -y unixODBC-devel
yum install -y binutils*
yum install -y compat-libstdc*
yum install -y elfutils-libelf*
yum install -y gcc*
yum install -y glibc*
yum install -y ksh*
yum install -y libaio*
yum install -y libgcc*
yum install -y libstdc*
yum install -y make*
yum install -y sysstat*
yum install -y libXp*
yum install -y glibc-kernheaders
yum install -y net-tools-*

3.修改LINUX的内核文件

[root@bogon app]# vim  /etc/sysctl.conf
kernel.shmmax = 277495689510912
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048586
fs.file-max = 6815744
kernel.shmall = 67747971072
net.ipv4.tcp_max_tw_buckets = 6000
net.ipv4.ip_local_port_range = 9000 65500
net.ipv4.tcp_tw_recycle = 0
net.ipv4.tcp_tw_reuse = 1
net.core.somaxconn = 262144
net.core.netdev_max_backlog = 262144
net.ipv4.tcp_max_orphans = 262144
net.ipv4.tcp_max_syn_backlog = 262144
net.ipv4.tcp_synack_retries = 2
net.ipv4.tcp_syn_retries = 1
net.ipv4.tcp_fin_timeout = 1
net.ipv4.tcp_keepalive_time = 30
net.ipv4.tcp_keepalive_probes = 6
net.ipv4.tcp_keepalive_intvl = 5
net.ipv4.tcp_timestamps = 0
fs.aio-max-nr = 1048576
net.ipv4.conf.all.rp_filter = 2
net.ipv4.conf.default.rp_filter = 2

Oracle 19C静默安装详解_vim_05

生成系统参数

[root@bogon app]# sysctl -p 
kernel.shmmax = 277495689510912
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048586
fs.file-max = 6815744
kernel.shmall = 67747971072
net.ipv4.tcp_max_tw_buckets = 6000
net.ipv4.ip_local_port_range = 9000 65500
net.ipv4.tcp_tw_recycle = 0
net.ipv4.tcp_tw_reuse = 1
sysctl: setting key "net.core.somaxconn": Invalid argument
net.core.somaxconn = 262144
net.core.netdev_max_backlog = 262144
net.ipv4.tcp_max_orphans = 262144
net.ipv4.tcp_max_syn_backlog = 262144
net.ipv4.tcp_synack_retries = 2
net.ipv4.tcp_syn_retries = 1
net.ipv4.tcp_fin_timeout = 1
net.ipv4.tcp_keepalive_time = 30
net.ipv4.tcp_keepalive_probes = 6
net.ipv4.tcp_keepalive_intvl = 5
net.ipv4.tcp_timestamps = 0
fs.aio-max-nr = 1048576
net.ipv4.conf.all.rp_filter = 2
net.ipv4.conf.default.rp_filter = 2

Oracle 19C静默安装详解_linux_06

4.添加下列参数到/etc/security/limits.conf

vim /etc/security/limits.conf
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft nproc 16384
oracle hard nproc 16384
oracle soft stack 10240
oracle hard stack 32768
oracle hard memlock 134217728
oracle soft memlock 134217728

Oracle 19C静默安装详解_vim_07

5.添加下列条目到/etc/pam.d/login

vim /etc/pam.d/login
session required /lib/security/pam_limits.so
session required pam_limits.so

Oracle 19C静默安装详解_linux_08

6.环境变量中添加下列语句

vim /etc/profile

if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi

Oracle 19C静默安装详解_linux_09

使环境变量生效

[root@bogon app]# source /etc/profile

7.创建文件目录和相应的用户

创建用户及组


groupadd oinstall
groupadd dba
groupadd oper
useradd -g oinstall -G dba,oper oracle

Oracle 19C静默安装详解_oracle_10

设置密码

passwd oracle

Oracle 19C静默安装详解_vim_11

创建文件目录

mkdir -p /app/oracle/product/19c/db_1
mkdir -p /app/oraInventory
chown -R oracle.oinstall /app
chmod -R 775 /app/oracle

8.配置ORACLE用户的环境变量

su - oracle
vim .bash_profile

export EDITOR=vi
export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_SID=orcl
export ORACLE_BASE=/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/19c/db_1
export INVENTORY_LOCATION=/app/oraInventory
export TNS_ADMIN=$ORACLE_HOME/network/admin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export NLS_LANG="AMERICAN_AMERICA.ZHS16GBK"
export NLS_DATE_FORMAT="YYYY-MM-DD HH24:MI:SS"
export PATH=$ORACLE_HOME/bin:/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin:$PATH:$HOME/bin
umask 022

Oracle 19C静默安装详解_oracle_12

使环境变量生效

source .bash_profile

9.将Oracle19C安装包与静默安装配置文件【db_install.rsp、dbca.rsp、netca.rsp】上传至服务器中进行解压安装

Oracle 19C静默安装详解_linux_13

10.静态安装数据库

./runInstaller  -silent  -force -noconfig  -ignorePrereq  -responseFile /app/rsp/db_install.rsp
Launching Oracle Database Setup Wizard...

[WARNING] [INS-13014] Target environment does not meet some optional requirements.
CAUSE: Some of the optional prerequisites are not met. See logs for details. installActions2022-10-18_08-07-09PM.log
ACTION: Identify the list of failed prerequisite checks from the log: installActions2022-10-18_08-07-09PM.log. Then either from the log file or from installation manual find the appropriate configuration to meet the prerequisites and fix it manually.
The response file for this session can be found at:
/app/oracle/product/19c/db_1/install/response/db_2022-10-18_08-07-09PM.rsp

You can find the log of this install session at:
/tmp/InstallActions2022-10-18_08-07-09PM/installActions2022-10-18_08-07-09PM.log

As a root user, execute the following script(s):
1. /app/oraInventory/orainstRoot.sh
2. /app/oracle/product/19c/db_1/root.sh

Execute /app/oraInventory/orainstRoot.sh on the following nodes:
[ismdb]
Execute /app/oracle/product/19c/db_1/root.sh on the following nodes:
[ismdb]


Successfully Setup Software with warning(s).
Moved the install session logs to:
/app/oraInventory/logs/InstallActions2022-10-18_08-07-09PM

Oracle 19C静默安装详解_linux_14

当提示如下内容时,需使用root用户执行

As a root user, execute the following script(s):

1. /u01/oraInventory/orainstRoot.sh

2. /u01/app/oracle/product/19c/db_1/root.sh

Oracle 19C静默安装详解_oracle_15

Oracle 19C静默安装详解_oracle_16

11.静默配置监听

netca -silent -responsefile /app/rsp/netca.rsp

出现如下内容代表完成

Parsing command line arguments:
Parameter "silent" = true
Parameter "responsefile" = /app/rsp/netca.rsp
Done parsing command line arguments.
Oracle Net Services Configuration:
Profile configuration complete.
Oracle Net Listener Startup:
Running Listener Control:
/app/oracle/product/19c/db_1/bin/lsnrctl start LISTENER
Listener Control complete.
Listener started successfully.
Listener configuration complete.
Oracle Net Services configuration successful. The exit code is 0

Oracle 19C静默安装详解_linux_17

查看监听

lsnrctl status

LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 18-OCT-2022 20:28:33

Copyright (c) 1991, 2019, Oracle. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ismdb)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 19.0.0.0.0 - Production
Start Date 18-OCT-2022 20:27:23
Uptime 0 days 0 hr. 1 min. 10 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /app/oracle/product/19c/db_1/network/admin/listener.ora
Listener Log File /app/oracle/diag/tnslsnr/ismdb/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ismdb)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
The listener supports no services
The command completed successfully

Oracle 19C静默安装详解_oracle_18

12.静默建库

dbca -silent -createDatabase -responseFile /app/rsp/dbca.rsp

[WARNING] [DBT-06208] The 'SYS' password entered does not conform to the Oracle recommended standards.
CAUSE:
a. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
b.The password entered is a keyword that Oracle does not recommend to be used as password
ACTION: Specify a strong password. If required refer Oracle documentation for guidelines.
[WARNING] [DBT-06208] The 'SYSTEM' password entered does not conform to the Oracle recommended standards.
CAUSE:
a. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
b.The password entered is a keyword that Oracle does not recommend to be used as password
ACTION: Specify a strong password. If required refer Oracle documentation for guidelines.
Prepare for db operation
10% complete
Copying database files
40% complete
Creating and starting Oracle instance
42% complete
46% complete
50% complete
54% complete
58% complete
60% complete
Completing Database Creation
66% complete
69% complete
70% complete
Executing Post Configuration Actions
100% complete
Database creation complete. For details check the logfiles at:
/app/oracle/cfgtoollogs/dbca/orcl.
Database Information:
Global Database Name:orcl
System Identifier(SID):orcl
Look at the log file "/app/oracle/cfgtoollogs/dbca/orcl/orcl.log" for further details.

Oracle 19C静默安装详解_linux_19

安装完成,测试登录

[oracle@ismdb /]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Tue Oct 18 21:47:10 2022
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle. All rights reserved.


Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0

SQL>

Oracle 19C静默安装详解_vim_20

标签:app,firewalld,tcp,详解,yum,ipv4,install,Oracle,19C
From: https://blog.51cto.com/makning/5768256

相关文章

  • oracle open hang 等待cursor: pin S wait on X---惜分飞
    客户19.3数据库无法在open过程hang住分析alert日志 2022-10-18T15:04:57.374918+08:00db_recovery_file_dest_sizeof102400MBis9.58%used.Thisisaus......
  • 记录清理Oracle归档日志
    一、登录数据库1.切换到Oracle用户su命令–切换用户身份su命令来自于英文单词“switchuser”的缩写,其功能是用于切换用户身份。管理员切换至任意用户身份而无需密......
  • plsql连接oracle数据库常见的报错
    1、ORA-00001:违反唯一约束条件的解决办法(sql重复执行)2、ORA-01427问题的分析和解决(sql语句有错误)3、Oracle报ORA-00942:表或视图不存在的解决方法(用sql重新查找表是否存......
  • MQ详解
    什么是MQ?【1】MQ:MessageQueue,消息队列。队列,是一种FIFO先进先出的数据结构。消息由生产者发送到MQ进行排队,然后按原来的顺序交由消息的消费者进行处理。QQ和微信就......
  • cron表达式详解
    Cron表达式是一个字符串,字符串以5或6个空格隔开,分为6或7个域,每一个域代表一个含义,Cron有如下两种语法格式:(1) SecondsMinutesHoursDayofMonthMonthDayofWeekYear......
  • Oracle 左连接、右链接(+)
    用(+)来实现,这个+号可以这样来理解: +表示补充,即哪个表有加号,这个表就是匹配表。如果加号写在右表,左表就是全部显示,所以是左连接。显示所有工作人员的停车记录,包括无记录......
  • oracle创建只读用户
    创建一个只读用户user2,只能查询管理员用户user1下的表,不能增删改。操作环境:PL/SQLDeveloper1、用管理员用户user1登录,创建用户user2、并授权--创建用户user1,密码12345......
  • @PostConstruct详解
    定义:@PostConstruct是Java自带的注解,在方法上加该注解会在项目启动的时候执行该方法,也可以理解为在spring容器初始化的时候执行该方法。从JavaEE5规范开始,Servl......
  • 详解React的Transition工作原理原理
    Transition使用姿势Transition是react18引入的新概念,用来区分紧急和非紧急的更新。紧急的更新,指的是一些直接的用户交互,如输入、点击等;非紧急的更新,指的是UI界面......
  • Oracle数据库修改字符集编码为AL32UTF8
    正常做短信平台,字符集编码格式一般都是ZHS16GBK,偶尔会遇到要改成AL32UTF8查看当前使用的字符集编码SQL>selectuserenv('language')fromdual;USERENV('LANGUAGE')-......