当前位置:首页>Linux>Red Hat Enterprise Linux 8.10 +oracle19c静默安装

Red Hat Enterprise Linux 8.10 +oracle19c静默安装

  • 2026-09-02 18:46:47
Red Hat Enterprise Linux 8.10 +oracle19c静默安装

Red Hat Enterprise Linux 8.10 +oracle19c静默安装

一、环境准备

验证Red Hat Enterprise Linux 8.10系统下oracle19C的安装配置,供学习参考

1.1基础环境信息

名称

版本

操作系统版本

Red Hat Enterprise Linux 8.10

数据库版本

主机名

oracle

IP地址

192.168.1.10

二、系统参数优化

2.1.关闭防火墙:

systemctl stop firewalld && systemctl disable firewalld

1.2.关闭selinux

sed -i 's/SELINUX=enforcing/SELINUX=disabled/g'/etc/selinux/config

or

sed -ir '/^SELINUX=/s/=.+/=disabled/' /etc/selinux/config && setenforce 0

1.3. 配置主机名和host文件

# hostnamectl 

cat >>/etc/hosts <         <EOF< span>          </EOF<>

192.168.1.10 oracle

EOF

1.4. 配置yum源及安装软件依赖环境

mount /dev/cdrom /mnt

cat > /etc/yum.repos.d/Redhat-Media.repo<         <EOF< span>          </EOF<>

[BaseOS]

name=BaseOS

baseurl=file:///mnt/BaseOS

gpgcheck=0

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

enabled=1

[AppStream]

name=AppStream

baseurl=file:///mnt/AppStream

enabled=1

gpgcheck=0

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta

EOF

# dnf clean all

# dnf makecache

# dnf group list

# yum groupinstall -y GNOME --安装GNOME桌面

# init 5

1.5.安装依赖包

rpm -ivh oracle-database-preinstall-19c-1.0-1.el8.x86_64.rpm

1.6.Oracle安装前的准备创建用户组

# passwd oracle

更改文件系统的权限

mkdir -p /oracle/19.3.0/db1 /oradata /backup /rman

chown -R oracle:oinstall /oracle /oradata /backup /rman

chmod -R 775 /oracle /oradata /backup /rman

1.7.修改资源限制文件

cat >/etc/security/limits.conf <         <EOF< span>          </EOF<>

oracle soft nproc 16384

oracle hard nproc 16384

oracle soft nofile 16384

oracle hard nofile 65536

oracle soft stack 10240

oracle hard stack 32768

#oracle hard memlock 8000000

#oracle soft memlock 8000000

EOF

1.8.修改/etc/pam.d/login文件

cat >/etc/pam.d/login <         <EOF< span>          </EOF<>

sessionrequiredpam_namespace.so 

sessionrequiredpam_limits.so

EOF

1.9.修改内核参数

cat >> /etc/sysctl.conf <         <EOF< span>          </EOF<>

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 = 1048576

kernel.panic_on_oops = 1

kernel.shmall = 2097152

kernel.shmmax = 6871947673

kernel.shmmni = 4096

vm.nr_hugepages=2800

EOF

1.10.修改系统环境变量

/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

# source /etc/profile

1.11.配置oracle用户环境变量

su - oracle

/home/oracle/.bash_profile 

export PATH

export TMP=/tmp

export TMPDIR=$TMP

export ORACLE_BASE=/oracle

export ORACLE_HOME=$ORACLE_BASE/19.3.0/db1

export ORACLE_SID=ERP

export PATH=$ORACLE_HOME/bin:$PATH

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib

export CLASSPATH=$ORACLE_HOME/jre:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib

source /home/oracle/.bash_profile

三、数据库安装

2.1.解压oracle软件包

unzip LINUX.X64_193000_db_home.zip -d $ORACLE_HOME

chown -R oracle:oinstall /oracle

chmod -R 775 /oracle

2.2.安装前环境检查

$./runInstaller -silent -executePrereqs -responseFile install/response/db_install.rsp

Launching Oracle Database Setup Wizard...

[FATAL] An internal error occurred within cluster verification framework

An error occurred in creating a TaskFactory object or in generating a task list

PRVG-0282 : failed to retrieve the operating system distribution ID

$ export CV_ASSUME_DISTID=rhel8.10

$ export CV_ASSUME_DISTID=rhel9.4

$./runInstaller -silent -executePrereqs -responseFile install/response/db_install.rsp

Launching Oracle Database Setup Wizard...

Prerequisite checks executed successfully.

2.3.oracle软件执行静默安装

$ cd install/response/

$ egrep -v "^#|^$" db_install.rsp

oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v19.0.0

oracle.install.option=INSTALL_DB_SWONLY

UNIX_GROUP_NAME=oinstall

INVENTORY_LOCATION=/oracle/oraInventory

ORACLE_HOME=/oracle/19.3.0/db1

ORACLE_BASE=/oracle

oracle.install.db.InstallEdition=EE

oracle.install.db.OSDBA_GROUP=dba

oracle.install.db.OSOPER_GROUP=oper

oracle.install.db.OSBACKUPDBA_GROUP=backupdba

oracle.install.db.OSDGDBA_GROUP=dgdba

oracle.install.db.OSKMDBA_GROUP=kmdba

oracle.install.db.OSRACDBA_GROUP=racdba

oracle.install.db.rootconfig.executeRootScript=

oracle.install.db.rootconfig.configMethod=

oracle.install.db.rootconfig.sudoPath=

oracle.install.db.rootconfig.sudoUserName=

oracle.install.db.CLUSTER_NODES=

oracle.install.db.config.starterdb.type=

oracle.install.db.config.starterdb.globalDBName=

oracle.install.db.config.starterdb.SID=

oracle.install.db.ConfigureAsContainerDB=

oracle.install.db.config.PDBName=

oracle.install.db.config.starterdb.characterSet=ZHS16GBK

oracle.install.db.config.starterdb.memoryOption=

oracle.install.db.config.starterdb.memoryLimit=

oracle.install.db.config.starterdb.installExampleSchemas=

oracle.install.db.config.starterdb.password.ALL=

oracle.install.db.config.starterdb.password.SYS=

oracle.install.db.config.starterdb.password.SYSTEM=

oracle.install.db.config.starterdb.password.DBSNMP=

oracle.install.db.config.starterdb.password.PDBADMIN=

oracle.install.db.config.starterdb.managementOption=

oracle.install.db.config.starterdb.omsHost=

oracle.install.db.config.starterdb.omsPort=

oracle.install.db.config.starterdb.emAdminUser=

oracle.install.db.config.starterdb.emAdminPassword=

oracle.install.db.config.starterdb.enableRecovery=

oracle.install.db.config.starterdb.storageType=

oracle.install.db.config.starterdb.fileSystemStorage.dataLocation=

oracle.install.db.config.starterdb.fileSystemStorage.recoveryLocation=

oracle.install.db.config.asm.diskGroup=

oracle.install.db.config.asm.ASMSNMPPassword= 

2.4.执行oracle安装软件

$ ./runInstaller -silent -ignorePrereqFailure -responseFile install/response/db_install.rsp

Launching Oracle Database Setup Wizard...

[WARNING] [INS-08101] Unexpected error while executing the action at state: 'supportedOSCheck'

CAUSE:No additional information available.

ACTION:Contact Oracle Support Services or refer to the software manual.

SUMMARY:

-java.lang.NullPointerException

Moved the install session logs to:

/oracle/oraInventory/logs/InstallActions2024-06-02_04-41-14PM

export CV_ASSUME_DISTID=rhel8.10

export CV_ASSUME_DISTID=rhel9.4--报错版本不在列表执行这个命令

./runInstaller -silent -ignorePrereqFailure -responseFile install/response/db_install.rsp

Launching Oracle Database Setup Wizard...

[WARNING] [INS-32047] The location (/oracle/oraInventory) specified for the central inventory is not empty.

ACTION:It is recommended to provide an empty location for the inventory.

[WARNING] [INS-32055] The Central Inventory is located in the Oracle base.

ACTION:Oracle recommends placing this Central Inventory in a location outside the Oracle base directory.

The response file for this session can be found at:

/oracle/19.3.0/db1/install/response/db_2024-06-02_03-39-18AM.rsp

You can find the log of this install session at:

/tmp/InstallActions2024-06-02_03-39-18AM/installActions2024-06-02_03-39-18AM.log

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

1./oracle/oraInventory/orainstRoot.sh

2./oracle/19.3.0/db1/root.sh

Execute /oracle/oraInventory/orainstRoot.sh on the following nodes: 

[oracle]

Execute /oracle/19.3.0/db1/root.sh on the following nodes: 

[oracle]

Successfully Setup Software.

Moved the install session logs to:

/oracle/oraInventory/logs/InstallActions2024-06-02_03-39-18AM

[oracle@oracle db1]$

[root@oracle ~]# /oracle/oraInventory/orainstRoot.sh

Changing permissions of /oracle/oraInventory.

Adding read,write permissions for group.

Removing read,write,execute permissions for world.

Changing groupname of /oracle/oraInventory to oinstall.

The execution of the script is complete.

[root@oracle ~]# /oracle/19.3.0/db1/root.sh

Check /oracle/19.3.0/db1/install/root_oracle_2024-06-02_03-41-37-827764808.log for the output of root script

[root@oracle ~]#

2.5.配置监听创建的参数

cd /oracle/19.3.0/db1/assistants/netca/

cat netca.rsp | grep -v "#"|grep -v ^$

[GENERAL]

RESPONSEFILE_VERSION="19.0"

CREATE_TYPE="CUSTOM"

[oracle.net.ca]

INSTALLED_COMPONENTS={"server","net8","javavm"}

INSTALL_TYPE=""typical""

LISTENER_NUMBER=1

LISTENER_NAMES={"LISTENER"}

LISTENER_PROTOCOLS={"TCP;1521"}

LISTENER_START=""LISTENER""

NAMING_METHODS={"TNSNAMES","ONAMES","HOSTNAME"}

NSN_NUMBER=1

NSN_NAMES={"EXTPROC_CONNECTION_DATA"}

NSN_SERVICE={"PLSExtProc"}

NSN_PROTOCOLS={"TCP;HOSTNAME;1521"}

2.6.创建监听服务

/oracle/19.3.0/db1/bin/netca -silent -responsefile /oracle/19.3.0/db1/assistants/netca/netca.rsp

Parsing command line arguments:

Parameter"silent" = true

Parameter"responsefile" = /oracle/19.3.0/db1/assistants/netca/netca.rsp

Done parsing command line arguments.

Oracle Net Services Configuration:

Profile configuration complete.

Oracle Net Listener Startup:

RunningListener Control: 

/oracle/19.3.0/db1/bin/lsnrctlstart LISTENER

ListenerControl complete.

Listenerstarted successfully.

Listener configuration complete.

Oracle Net Services configuration successful. The exit code is 0

2.7.配置创建实例参数

egrep -v "^#|^$" dbca.rsp

responseFileVersion=/oracle/assistants/rspfmt_dbca_response_schema_v19.0.0

gdbName=ERP

sid=ERP

databaseConfigType= SI

RACOneNodeServiceName=

policyManaged=

createServerPool=

serverPoolName=

cardinality=

force=

pqPoolName=

pqCardinality=

createAsContainerDatabase=true

numberOfPDBs=1

pdbName=ERP1

useLocalUndoForPDBs=

pdbAdminPassword=123.com..

nodelist=

templateName=/oracle/19.3.0/db1/assistants/dbca/templates/General_Purpose.dbc

sysPassword=123.com..

systemPassword=123.com.. 

oracleHomeUserPassword=

emConfiguration=

emExpressPort=5500

runCVUChecks=

dbsnmpPassword=

omsHost=

omsPort=

emUser=

emPassword=

dvConfiguration=

dvUserName=

dvUserPassword=

dvAccountManagerName=

dvAccountManagerPassword=

olsConfiguration=

datafileJarLocation={ORACLE_HOME}/assistants/dbca/templates/

datafileDestination=/oradata/{DB_UNIQUE_NAME}

recoveryAreaDestination=

storageType=

diskGroupName=

asmsnmpPassword=

recoveryGroupName=

characterSet=ZHS16GBK

nationalCharacterSet=

registerWithDirService=

dirServiceUserName=

dirServicePassword=

walletPassword=

listeners=LISTENER

variablesFile=

variables=

initParams=

sampleSchema=

memoryPercentage=40

databaseType=

automaticMemoryManagement=

totalMemory=0

2.8.创建ERP实例,

/oracle/19.3.0/db1/bin/dbca -silent -createDatabase -responsefile /oracle/19.3.0/db1/assistants/dbca/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.

[WARNING] [DBT-06208] The 'PDBADMIN' 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

8% complete

Copying database files

31% complete

Creating and starting Oracle instance

32% complete

36% complete

40% complete

43% complete

46% complete

Completing Database Creation

51% complete

53% complete

54% complete

Creating Pluggable Databases

58% complete

77% complete

Executing Post Configuration Actions

100% complete

Database creation complete. For details check the logfiles at:

/oracle/cfgtoollogs/dbca/ERP.

Database Information:

Global Database Name:ERP

System Identifier(SID):ERP

Look at the log file "/oracle/cfgtoollogs/dbca/ERP/ERP.log" for further details.

最新文章

随机文章