当前位置:网站首页>CentOS 7.9 installing Oracle 21C Adventures
CentOS 7.9 installing Oracle 21C Adventures
2022-07-07 05:20:00 【bisal(Chen Liu)】
and 19c Installation related historical articles ,
《 Not Oracle Linux Next Oracle 19c CDB Database installation 》
《Oracle 19c Of examples Silent installation 》
《 Not Oracle Linux Lower installation Oracle 19c》
Because there is a scene , Need to use Oracle 21c In the environment of , I plan to install one on the virtual machine . Read the installation file download on the official website , At present, three platforms are provided (Linux x86-64、HP-UX ia64 and Windows x64) Medium of ,
https://www.oracle.com/database/technologies/oracle-database-software-downloads.html

Linux platform , The official website provides rpm and home Two ways to install , This and 19c It's the same , Therefore, the installation process , It should be the same ,

We choose rpm install ,19c Of rpm install CDB He Fei CDB All tested , As shown below ,
《 Not Oracle Linux Next Oracle 19c CDB Database installation 》
reference 19c Installation process , Try installing 21c.
1. install preinstall
rpm Prelude to installation , By installing preinstall To prepare the environment , The following is for Oracle Linux 7 and Oracle Linux 8 Of preinstall Package download address ,
https://yum.oracle.com/repo/OracleLinux/OL7/latest/x86_64/getPackage/oracle-database-preinstall-21c-1.0-1.el7.x86_64.rpm
https://yum.oracle.com/repo/OracleLinux/OL8/appstream/x86_64/getPackage/oracle-database-preinstall-21c-1.0-1.el8.x86_64.rpm

Although what is said here is aimed at Oracle Linux, But the actual environment I installed this time is CentOS 7.9,Linux The same applies to the kernel .
preinstall In fact, it installs some dependent packages needed in the installation process , In the previous version, we prepared by hand , from 19c Start , Integrated into preinstall in , Convenient for automatic installation , Reduce the difficulty of installation , If some auxiliary packages are missing during installation , You have to install it yourself ,
[[email protected] software]# rpm -ivh oracle-database-preinstall-21c-1.0-1.el7.x86_64.rpm
warning: oracle-database-preinstall-21c-1.0-1.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
error: Failed dependencies:
ksh is needed by oracle-database-preinstall-21c-1.0-1.el7.x86_64
nfs-utils is needed by oracle-database-preinstall-21c-1.0-1.el7.x86_64
policycoreutils-python is needed by oracle-database-preinstall-21c-1.0-1.el7.x86_64
smartmontools is needed by oracle-database-preinstall-21c-1.0-1.el7.x86_64
sysstat is needed by oracle-database-preinstall-21c-1.0-1.el7.x86_64
xorg-x11-utils is needed by oracle-database-preinstall-21c-1.0-1.el7.x86_64
xorg-x11-xauth is needed by oracle-database-preinstall-21c-1.0-1.el7.x86_64Install these missing dependent packages , Re execution ,
[[email protected] software]# rpm -ivh oracle-database-preinstall-21c-1.0-1.el7.x86_64.rpm
warning: oracle-database-preinstall-21c-1.0-1.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
Preparing... ################################# [100%]
package oracle-database-preinstall-21c-1.0-1.el7.x86_64 is already installed2. install 21c Database software
CentOS 7.9 use oracle-database-ee-21c-1.0-1.ol7.x86_64.rpm To install .rpm install Oracle The default path is /opt/oracle, Before installation, you need to confirm that the permission of this path is oracle Usable , If it is root, When performing the installation , It will prompt the error ,
[[email protected] software]# rpm -ivh oracle-database-ee-19c-1.0-1.x86_64.rpm
warning: oracle-database-ee-19c-1.0-1.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
Preparing... ################################# [100%]
[SEVERE] The install cannot proceed because ORACLE_BASE directory (/opt/oracle)
is not owned by "oracle" user. You must change the ownership of ORACLE_BASE
directory to "oracle" user and retry the installation.
error: %pre(oracle-database-ee-19c-1.0-1.x86_64) scriptlet failed, exit status 1
error: oracle-database-ee-19c-1.0-1.x86_64: install failed At this time, change the permission ,
chown -R oracle:oinstall /opt/oracleRe execution , It will be installed normally ,
[[email protected] software]# rpm -ivh oracle-database-ee-21c-1.0-1.ol7.x86_64.rpm
warning: oracle-database-ee-21c-1.0-1.ol7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
Preparing... ################################# [100%]
Updating / installing...
1:oracle-database-ee-21c-1.0-1 ################################# [100%]
[INFO] Executing post installation scripts...
[INFO] Oracle home installed successfully and ready to be configured.
To configure a sample Oracle Database you can execute the following service configuration script as root: /etc/init.d/oracledb_ORCLCDB-21c configureI hit a pit here , Under normal circumstances , Install the software ,/opt/oracle At least these folders should be included in , If it wasn't for these , There is probably a problem , Pay attention to whether there are errors in the console log ,
cd /opt/oracle
drwxr-x--- 3 oracle oinstall 4096 Jul 1 23:50 cfgtoollogs
drwxr-x--- 2 oracle oinstall 4096 Jul 1 23:50 dbs
drwxrwxr-x 23 oracle oinstall 4096 Jul 1 23:50 diag
drwxr-x--- 3 oracle oinstall 4096 Jul 1 23:50 homes
drwxrwx--- 4 oracle oinstall 4096 Jul 1 23:50 oraInventory
drwxr-xr-x 3 oracle oinstall 4096 Jul 1 23:46 productin addition , Maybe because of my path permission problem , Prompt me that many file permissions are wrong ,
[[email protected] init.d]# /etc/init.d/oracledb_BISALCDB_21c configure
Configuring Oracle Database BISALCDB.
[FATAL] [DBT-10011] Incorrect ownership/permissions detected for the file (/opt/oracle/product/21c/dbhome_1/bin/oradism).
CAUSE: Following nodes does not have required file ownership/permissions: Node :vm-20-15-centos
PRVG-11960 : Set user ID bit is not set for file "/opt/oracle/product/21c/dbhome_1/bin/oradism" on node "vm-20-15-centos".
PRVG-2031 : Owner of file "/opt/oracle/product/21c/dbhome_1/bin/oradism" did not match the expected value on node "vm-20-15-centos". [Expected = "root(0)" ; Found = "oracle(54321)"]
ACTION: Run the Oracle Home root script as the "root" user to fix the permissions.
[FATAL] [DBT-05509] Failed to connect to the specified database (BISALCDB).
CAUSE: OS Authentication might be disabled for this database (BISALCDB).
ACTION: Specify a valid sysdba user name and password to connect to the database.
Database configuration failed.for example $ORACLE_HOME/bin The file in should be a linked file ,
[[email protected] bin]# ll oradism
-rwsr-x--- 1 root oinstall 1867552 Jul 28 2021 oradismBut in the environment I installed, this file is a file ,
[[email protected] bin]# ll oradism
-rwxr-x--- 1 root oinstall 1867552 Jul 28 2021 oradismAnd at that point it goes through chown When adjusting folders , There may still be a problem , Be sure to execute configure It was adjusted before /opt/oracle Authority .
3. install 21c database
and 19c identical ,21c Can be configured by oracledb_$ORACLE_SID_21c This file is used to install the database ,
P.S. If you change the original oracledb_ORCLCDB_21c The name is
oracledb_BISALCDB_21c,
be /etc/sysconfig Of oracledb_ORCLCDB-21c.conf To be changed to
oracledb_BISALCDB-21c.conf,
[[email protected] init.d]# ./oracledb_BISALCDB_21c configure
Configuring Oracle Database BISALCDB.
Prepare for db operation
8% complete
Copying database files
31% complete
100% complete
[FATAL]
Parsing command line arguments:
Parameter "silent" = true
Parameter "local" = true
Parameter "inscomp" = server
Parameter "insprtcl" = TCP
Parameter "orahome" = /opt/oracle/product/21c/dbhome_1
Parameter "instype" = custom
Parameter "listener" = LISTENER
Parameter "lisport" = 1521
Parameter "cfg" = local
Parameter "responsefile" = /opt/oracle/product/21c/dbhome_1/network/install/netca_typ.rsp
Done parsing command line arguments.
Oracle Net Services Configuration:
LISTENER:No valid IP Address returned for the host VM-20-15-centos.
Profile configuration complete.
Check the trace file for details: /opt/oracle/cfgtoollogs/netca/trace_OraDBHome21cEE-22070212AM1239.log
Oracle Net Services configuration failed. The exit code is 1
8% complete
0% complete
Look at the log file "/opt/oracle/cfgtoollogs/dbca/BISALCDB/BISALCDB.log" for further details.
Database configuration failed.There is a mistake here , Look at the tips , It's about configuration Listener when , Cannot find a valid corresponding host name IP Address , from netca journal , You can reconfirm ,
[main] [ 2022-07-02 00:12:40.913 CST ] [ConfigureListener.isPortFree:1330] InetAddress.getByName(127.0.0.1): /127.0.0.1
[main] [ 2022-07-02 00:12:40.913 CST ] [ConfigureListener.isPortFree:1332] Local host IP address: VM-20-15-centos/127.0.0.1
[main] [ 2022-07-02 00:12:40.913 CST ] [ConfigureListener.isPortFree:1334] Local host name: VM-20-15-centos
[main] [ 2022-07-02 00:12:40.913 CST ] [ConfigureListener.isPortFree:1345] Address VM-20-15-centos
[main] [ 2022-07-02 00:12:40.913 CST ] [ConfigureListener.isPortFree:1345] Address VM-20-15-centos
[main] [ 2022-07-02 00:12:40.913 CST ] [ConfigureListener.isPortFree:1407] No IP address returned for host. VM-20-15-centos
[main] [ 2022-07-02 00:12:40.913 CST ] [SilentConfigure.silentConfigureListener:398] oracle.net.ca.IllegalEndpointException: No valid IP Address returned for the host VM-20-15-centos.In this case , Need configuration /etc/hosts, Add host name and current intranet IP The relationship between ,
vi /etc/hosts
x.x.x.x VM-20-15-centosreinstall , It can be executed normally ,
[[email protected] init.d]# ./oracledb_BISALCDB_21c configure
Configuring Oracle Database BISALCDB.
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
54% complete
Creating Pluggable Databases
58% complete
77% complete
Executing Post Configuration Actions
100% complete
Database creation complete. For details check the logfiles at:
/opt/oracle/cfgtoollogs/dbca/BISALCDB.
Database Information:
Global Database Name:BISALCDB
System Identifier(SID):BISALCDB
Look at the log file "/opt/oracle/cfgtoollogs/dbca/BISALCDB/BISALCDB0.log" for further details.
Database configuration completed successfully. The passwords were auto generated, you must change them by connecting to the database using 'sqlplus / as sysdba' as the oracle user.4. Connect to database
Database installation complete , You can log in , because 21c No support for non CDB, therefore sqlplus / as sysdba Login is CDB, We configured a PDB, Can pass alter session set container perhaps tns Log in to this PDB,

There is another pit here , I am here $ORACLE_HOME/network/admin Of tnsnames.ora Configuration of the ,
BISALPDB = (DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = VM-20-15-centos)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = BISALPDB1)
)
) Normally speaking ,sqlplus user/[email protected] You can log in , But it's always suggested that ,

ORA-12514 My mistake is TNS Configuration error , But I looked at the document , There's really nothing wrong . After many attempts , Even if I delete $ORACLE_HOME/network/admin/
tnsnames.ora The content of , Can be implemented tnsping BISALCDB, This is strange .
" When things go out of whack, they will ", Compared several configuration files 、 Monitoring configuration and other information , Find a doubtful point ,lsnrctl status Medium Listener Parameter File The path is /opt/oracle/homes/, Not at all /opt/oracle/product/...,

Let's take a look at /opt/oracle/homs/ Of tnsnames The configuration file , Indeed, only the above tests exist BISALCDB, No wonder it was deleted /opt/oracle/product Of tnsnames.ora Content , No entry into force , It turned out that the wrong document , But why is the listening parameter file here , It's not very elegant , It's probably the first time to install , There are some problems with the configuration , A parameter adopts the default ,
[[email protected] admin]$ cat tnsnames.ora
# tnsnames.ora Network Configuration File: /opt/oracle/homes/OraDBHome21cEE/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
LISTENER_BISALCDB =
(ADDRESS = (PROTOCOL = TCP)(HOST = VM-20-15-centos)(PORT = 1521))
BISALCDB =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = VM-20-15-centos)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = BISALCDB)
)
)In order to solve this , I deleted /opt/oracle/homes Wrong path tnsnames.ora、listener.ora, Restart monitoring , Will be looking for $ORACLE_HOME/network/admin Of tnsnames.ora,

If a friend knows how to change it more accurately Listener Parameter File The way of value , Please advise .
You can use TNS Log in normally to PDB,

21c The overall use and operation of , and 19c The difference is not too big , Aspects of new features , You also need to test to understand .
Recently updated articles :
《Linux Of 10 Great danger orders 》
《 You know, Oracle Is there an upper limit on the size of the data file ?》
《Oracle and JSON The combination of 》
《 How to " grace " avoid MySQL Login tips 》
《 Xiaobai studies MySQL - Incremental Statistics SQL The needs of - Scheme of windowed function 》
Recent hot articles :
《" Red Alert " Game open source code brings us a shock 》
Article classification and indexing :
边栏推荐
- Leetcode(417)——太平洋大西洋水流问题
- Y58. Chapter III kubernetes from entry to proficiency - continuous integration and deployment (Sany)
- 【js组件】自定义select
- 【js组件】date日期显示。
- 《四》表单
- QSlider of QT control style series (I)
- Two methods of thread synchronization
- Pytest testing framework -- data driven
- Analysis -- MySQL statement execution process & MySQL architecture
- y58.第三章 Kubernetes从入门到精通 -- 持续集成与部署(三一)
猜你喜欢

Full link voltage test: the dispute between shadow database and shadow table

基于 hugging face 预训练模型的实体识别智能标注方案:生成doccano要求json格式

【问道】编译原理

AOSP ~binder communication principle (I) - Overview

Pytest testing framework -- data driven

Annotation初体验

【opencv】图像形态学操作-opencv标记不同连通域的位置

JHOK-ZBG2漏电继电器

实现网页内容可编辑

U++4 interface learning notes
随机推荐
HarmonyOS第四次培训
高数中值定理总结
漏电继电器JOLX-GS62零序孔径Φ100
SQL injection cookie injection
Longest non descent subsequence (LIS) (dynamic programming)
ThinkPHP关联预载入with
Simulate thread communication
How can professional people find background music materials when doing we media video clips?
LabVIEW在打开一个新的引用,提示内存已满
ThinkPHP Association preload with
batch size设置技巧
数字化创新驱动指南
批量归一化(标准化)处理
最长回文子串(动态规划)
《二》标签
Knapsack problem unrelated to profit (depth first search)
Is PMP really useful?
[opencv] image morphological operation opencv marks the positions of different connected domains
做自媒体,有哪些免费下载视频剪辑素材的网站?
利用OPNET进行网络指定源组播(SSM)仿真的设计、配置及注意点