当前位置:网站首页>Linux 7 silent installation of Oracle 11g
Linux 7 silent installation of Oracle 11g
2022-04-22 09:50:00 【bjywxc】
linux Silent installation oracle11g
oracle The installation methods are OUI Graphical interface and silent installation ,OUI Graphical interface installation is relatively easy , According to the prompt, the next step can be , But sometimes because of the network environment and other reasons , There is no way to install through the graphical interface , At this time, we can only use the silent mode to install , This article briefly introduces the silent installation process , The preliminary preparations are not described in detail here .
One 、 Installation environment
Because of work needs , Migrate the existing environment to the government cloud , Government cloud provides vpn Connect to the fortress machine , Plus the need for security , Graphical that cannot be directly connected to the server .
| operating system | CentOS Linux release 7.3 |
|---|---|
| Database version | oracle 11.2.0.4 |
Two 、 Installation steps
1、 Environmental preparation
This article mainly introduces the silent installation , The previous preparation operations are not described in detail :
1、 download Oracle Upload the installation package to the server and unzip .
2、 install oracle 11g Some necessary software packages . You can execute commands to check rpm -q binutils compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibc glibc-common glibc-devel glibc-headers kernel-headers ksh libaio libaio-devel libgcc libgomp libstdc++ libstdc++-devel make numactl-devel sysstat unixODBC unixODBC-devel
3、oracle Yes Linux Some core parameters of the system put forward special requirements , stay /etc/sysctl.conf Configure relevant parameters in the file . At the same time edit /etc/hosts file , Add the host name and IP Address binding
edit /etc/sysctl.conf
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 169393387520
kernel.shmmni = 4096
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
fs.suid_dumpable = 1
4、 establish oracle User group , And configured oracle User environment variables and related variables Shell Adjust limits .
groupadd oinstall
groupadd dba
useradd -g oinstall -G dba oracle
edit oracle User .bash_profile file

edit /etc/security/limits.conf file
@oinstall soft nofile 2048
@oinstall hard nofile 65536
@oinstall soft nproc 16384
@oinstall soft stack 10240
edit /etc/pam.d/login file
session required pam_limits.so
5、 Turn off firewall , close selinux
6、 establish oracle The installation directory mkdir /u01
2、 Silent installation
1、 Edit silent install response file , among database yes Oracle The directory generated after decompressing the software . Visible in response There are three templates in the directory , among dbca.rsp It's used to create a database .db_install.rsp It's used to install Oracle The software .netca.rsp It's used to create listeners
[root@jjhsdb soft]# chown -R oracle:oinstall /soft/database/
[root@jjhsdb soft]# su - oracle
Last login: Tue Dec 31 14:38:15 CST 2019 on pts/0
[oracle@jjhsdb ~]$ cd /soft/database/response/
[oracle@jjhsdb response]$ ls
dbca.rsp db_install.rsp db_install.rsp.bak netca.rsp
[oracle@jjhsdb response]$ cp db_install.rsp db_install.rsp.bak
[oracle@jjhsdb response]$ vi db_install.rsp
# Mainly modify the following options , Refer to the appendix at the end of the article for the meaning of each configuration item A:db_install.rsp Detailed explanation
SELECTED_LANGUAGES=en,zh_CN
oracle.install.option=INSTALL_DB_SWONLY
ORACLE_HOSTNAME=jjhsdb
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION=/u01/app/oracle/oraInventory
SELECTED_LANGUAGES=en,zh_CN
ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome
ORACLE_BASE=/u01/app/oracle
oracle.install.db.InstallEdition=EE
oracle.install.db.DBA_GROUP=dba
oracle.install.db.OPER_GROUP=dba
DECLINE_SECURITY_UPDATES=true
2、 Start silent installation
[oracle@jjhsdb ~]$ cd /soft/database/
[oracle@jjhsdb database]$ ls
install response runInstaller stage
readme.html rpm sshsetup welcome.html
[oracle@jjhsdb database]$ pwd
/soft/database
[oracle@jjhsdb database]$ ./runInstaller -silent -responseFile /soft/database/response/db_install.rsp
Starting Oracle Universal Installer...
Checking Temp space: must be greater than 120 MB. Actual 66773 MB Passed
Checking swap space: must be greater than 150 MB. Actual 20479 MB Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2019-12-31_03[oracle@jjhsdb database]$ [WARNING] [INS-32055] The Central Inventory is located in the Oracle base.
CAUSE: The Central Inventory is located in the Oracle base.
ACTION: Oracle recommends placing this Central Inventory in a location outside the Oracle base directory.
[WARNING] [INS-13014] Target environment do not meet some optional requirements.
CAUSE: Some of the optional prerequisites are not met. See logs for details. /tmp/OraInstall2019-12-31_03-07-16PM/installActions2019-12-31_03-07-16PM.log
ACTION: Identify the list of failed prerequisite checks from the log: /tmp/OraInstall2019-12-31_03-07-16PM/installActions2019-12-31_03-07-16PM.log. Then either from the log file or from installation manual find the appropriate configuration to meet the prerequisites and fix it manually.
You can find the log of this install session at:
/u01/app/oracle/oraInventory/logs/installActions2019-12-31_03-07-16PM.log
The installation of Oracle Database 11g was successful.
Please check '/u01/app/oracle/oraInventory/logs/silentInstall2019-12-31_03-07-16PM.log' for more details.
As a root user, execute the following script(s):
1. /u01/app/oracle/oraInventory/orainstRoot.sh
2. /u01/app/oracle/product/11.2.0/dbhome/root.sh
Successfully Setup Software.
According to the prompt ,root The user runs these two commands to complete the installation .
[root@jjhsdb ~]# /u01/app/oracle/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oracle/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.
Changing groupname of /u01/app/oracle/oraInventory to oinstall.
The execution of the script is complete.
[root@jjhsdb ~]# /u01/app/oracle/product/11.2.0/dbhome/root.sh
Check /u01/app/oracle/product/11.2.0/dbhome/install/root_jjhsdb_2019-12-31_15-10-23.log for the output of root script
[root@jjhsdb ~]#
function sqlplus Test it
[oracle@jjhsdb database]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Tue Dec 31 15:12:24 2019
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to an idle instance.
SQL>
3、 Silent configuration monitor
netca.rsp The configuration file defaults to 1521 port
[oracle@jjhsdb database]$ netca /silent /responseFile /soft/database/response/netca.rsp
Parsing command line arguments:
Parameter "silent" = true
Parameter "responsefile" = /soft/database/response/netca.rsp
Done parsing command line arguments.
Oracle Net Services Configuration:
Profile configuration complete.
Oracle Net Listener Startup:
Running Listener Control:
/u01/app/oracle/product/11.2.0/dbhome/bin/lsnrctl start LISTENER
Listener Control complete.
Listener started successfully.
Listener configuration complete.
Oracle Net Services configuration successful. The exit code is 0
# Check the monitor
[oracle@jjhsdb database]$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 31-DEC-2019 15:18:20
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date 31-DEC-2019 15:17:22
Uptime 0 days 0 hr. 0 min. 58 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.2.0/dbhome/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/jjhsdb/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=jjhsdb)(PORT=1521)))
The listener supports no services
The command completed successfully
[oracle@jjhsdb database]$
[oracle@jjhsdb database]$ ls $ORACLE_HOME/network/admin
listener.ora samples shrept.lst sqlnet.ora
3、 Build a library in silence
1、 Edit profile
[oracle@jjhsdb database]$ cd /soft/database/
[oracle@jjhsdb database]$ ls
install response runInstaller stage
readme.html rpm sshsetup welcome.html
[oracle@jjhsdb database]$ cd response/
[oracle@jjhsdb response]$ ls
dbca.rsp db_install.rsp db_install.rsp.bak netca.rsp
[oracle@jjhsdb response]$ cp dbca.rsp dbca.rsp.bak
[oracle@jjhsdb response]$ vi dbca.rsp
# Set the following parameters :
GDBNAME= "jjhsdb"
SID =" jjhsdb"
SYSPASSWORD= "passowrd"
SYSTEMPASSWORD= "passowrd"
SYSMANPASSWORD= "passowrd"
DBSNMPPASSWORD= "passowrd"
DATAFILEDESTINATION=/data/jjhsdb
RECOVERYAREADESTINATION=/data/jjhsdb/fast_recovery_area
CHARACTERSET= "ZHS16GBK"
TOTALMEMORY= "53248"
2、 Start installation
[oracle@jjhsdb response]$ dbca -silent -responseFile /soft/database/response/dbca.rsp
a.rsp
Copying database files
1% complete
3% complete
11% complete
18% complete
26% complete
37% complete
Creating and starting Oracle instance
40% complete
45% complete
50% complete
55% complete
56% complete
60% complete
62% complete
Completing Database Creation
66% complete
70% complete
73% complete
85% complete
96% complete
100% complete
Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/jjhsdb/jjhsdb.log" for further details.
SQL> select instance_name,status from v$instance;
INSTANCE_NAME STATUS
---------------- ------------
jjhsdb OPEN
SQL> exit
[oracle@jjhsdb ~]$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 31-DEC-2019 16:07:33
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date 31-DEC-2019 15:17:22
Uptime 0 days 0 hr. 50 min. 11 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.2.0/dbhome/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/jjhsdb/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=jjhsdb)(PORT=1521)))
Services Summary...
Service "jjhsdb" has 1 instance(s).
Instance "jjhsdb", status READY, has 1 handler(s) for this service...
Service "jjhsdbXDB" has 1 instance(s).
Instance "jjhsdb", status READY, has 1 handler(s) for this service...
The command completed successfully
[oracle@jjhsdb ~]$
Here we are , Silent database installation is complete .
4、 Set boot up
stay Linux 7 In the system , Install well Oracle After the database service , It's not like Windows It's the same under the system ,Oracle By default, the service will start automatically with the start of the system .Linux In the system , You need to set it manually , Can achieve Oracle It starts automatically
1、 Database startup mainly involves three components .
lsnrctl: Listener program , Used to provide database access , Default listening TCP 1521 port .
dbstart、dbshut: Database control program , To start 、 Stop the database instance .
2、 modify /etc/oratab file
# take N Change to Y
vi dczjdb1:/u01/app/oracle/product/12.1.0/dbhome:Y
3、 modify dbstart file
[oracle@dczjdb1 ~]$ vi /u01/app/oracle/product/12.1.0/dbhome/bin/dbstart
-----------------------------------------------------------------------------
# take ORACLE_HOME_LISTNER=$1, It is amended as follows ORACLE_HOME_LISTNER=$ORACLE_HOME, namely ORACLE_HOME_LISTNER=/u01/app/oracle/product/12.1.0/dbhome
4、 Set boot up , modify /etc/rc.d/rc.local file , Add two startup lines at the bottom of the file .
[root@dczjdb1 ~]# vi /etc/rc.d/rc.local
#!/bin/bash
# THIS FILE IS ADDED FOR COMPATIBILITY PURPOSES
#
# It is highly advisable to create own systemd services or udev rules
# to run scripts during boot instead of using this file.
#
# In contrast to previous versions due to parallel execution during boot
# this script will NOT be run after all other services.
#
# Please note that you must run 'chmod +x /etc/rc.d/rc.local' to ensure
# that this script will be executed during boot.
touch /var/lock/subsys/local
su - oracle -lc "/u01/app/oracle/product/12.1.0/dbhome/bin/lsnrctl start"
su - oracle -lc /u01/app/oracle/product/12.1.0/dbhome/bin/dbstart
appendix A:db_install.rsp Detailed explanation
appendix B:dbca.rsp Detailed explanation
Other reference articles :https://www.imzcy.cn/1631.html
Other reference articles :https://www.cnblogs.com/hftian/p/6618551.html
版权声明
本文为[bjywxc]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204220946476346.html
边栏推荐
- [C language advanced level 10 -- character and string functions and their simulation implementation (1)]
- tensorflow实验四----波士顿房价预测
- 浙政钉扫码登录
- SQL expression
- 作文以记之 ~ 目标和
- Softing datafeed OPC Suite: empowering industrial equipment to connect to the Internet of things
- 【SQL server】SQL 概览
- Detailed explanation of p-type mos tube switch circuit and working principle - Kia MOS tube
- Project training - newspaper reading zombie
- SQL relational database management system
猜你喜欢

MySQL多实例安装方法一

Review of QT layout management

Command ‘yum‘ not found, but can be installed with: apt install yum

【Go】程序流程控制

IOS development - Database - Introduction to basic knowledge (01)

An analysis of the application of MOS tube series parallel drive - Kia MOS tube
![idea写sparksql程序local[*]模式可以运行,提交到spark yarn运行出现ClassNotFoundException](/img/67/065e2b047ba26d67924b458141d73b.png)
idea写sparksql程序local[*]模式可以运行,提交到spark yarn运行出现ClassNotFoundException

Matplotlib tutorial 04 --- drawing commonly used graphics

一文MOS管串联并联驱动应用解析-KIA MOS管

WEB应用扫码获取浙政钉用户信息
随机推荐
2022-04-21 mysql-innodb存储引擎核心处理
linux7静默安装oracle11g
内存管理-
5.嵌入式控制器(Embedded Controller,EC)学习 PS/2协议
【Go】程序流程控制
支持AUTOSAR Classic以及Adaptive平台的DEXT诊断数据库
TextView设置指定字符显示颜色
【QT小记】使用QPainter绘制各种基本图形
DA14580BLE点亮LED
Writing to remember the ~ goal and
Analysis of the factors affecting the switching speed of MOS transistor Kia MOS transistor
Nacos
UVC camera 封装类
QT AxObject库的简单操作
一款简易的自定义数字键盘输入控件
[SQL Server] SQL overview
Usage of stringstream
Beyond iterm! Known as the next generation terminal artifact, powerful!
How to realize synchronous monitoring of etcd
Implementation and analysis of watchablestore in etcd