Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install Oracle stand-alone silently

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

Editor to share with you how to silently install Oracle stand-alone, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

I. preliminary preparation

1. Hardware check

Cat / etc/issue

Uname-r (version)

Grep MemTotal / proc/meminfo (memory size)

Grep SwapTotal / proc/meminfo (switch area size)

Grep "model name" / proc/cpuinfo (CPU information)

Free (available memory)

two。 Check dependency packages

[root@dgc] # rpm-Q binutils compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibc-2.5 glibc-common glibc-devel glibc-headers ksh libaio libaio-devel libgcc libstdc++ libstdc++-devel make sysstat unixODBC unixODBC-devel

Binutils-2.20.51.0.2-5.42.el6.x86_64

Package compat-libstdc++-33 is not installed

Elfutils-libelf-0.158-3.2.el6.x86_64

Package elfutils-libelf-devel is not installed

Gcc-4.4.7-11.el6.x86_64

Package gcc-c++ is not installed

Package glibc-2.5 is not installed

Glibc-common-2.12-1.149.el6.x86_64

Glibc-devel-2.12-1.149.el6.x86_64

Glibc-headers-2.12-1.149.el6.x86_64

Package ksh is not installed

Libaio-0.3.107-10.el6.x86_64

Package libaio-devel is not installed

Libgcc-4.4.7-11.el6.x86_64

Libstdc++-4.4.7-11.el6.x86_64

Package libstdc++-devel is not installed

Make-3.81-20.el6.x86_64

Sysstat-9.0.4-27.el6.x86_64

UnixODBC-2.2.14-14.el6.x86_64

Package unixODBC-devel is not installed

3. Create the required operating system groups and users

Groupadd oinstall

Groupadd dba

Groupadd oper

Useradd-g oinstall-G dba oracle

Passwd oracle

4. Create installation directory and permissions

Mkdir-p / app/oracle

Chown-R oracle.oinstall / app/oracle

5. Modify kernel parameters

Vi / etc/sysctl.conf

Fs.aio-max-nr = 1048576

Fs.file-max = 6815744

Kernel.shmall = 2097152

Kernel.shmmax = 4294967295

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

Sysctl-p

6. Modify user restrictions

Vi / etc/security/limits.conf

# for oracle

Oracle soft nproc 2047

Oracle hard nproc 16384

Oracle soft nofile 1024

Oracle hard nofile 65536

Vi / etc/pam.d/login

Session required / lib/security/pam_limits.so

7. Create a / etc/oraInst.loc file with the following contents

Nventory_loc=/app/oracle/oraInventory

Inst_group=oinstall

Change the permissions of a file

Chown oracle:oinstall / etc/oraInst.loc

Chmod 664 / etc/oraInst.loc

8. Set the oracle environment variable

Vi / home/oracle/.bash_profile

Export PATH

Export TMP=/tmp

Export TMPDIR=$TMP

Export ORACLE_BASE=/app/oracle

Export ORACLE_HOME=$ORACLE_BASE/product/11204/db

Export ORACLE_SID=orcl

Export ORACLE_TERM=xterm

Export PATH=/usr/sbin:$PATH

Export PATH=$ORACLE_HOME/bin:$CRS_HOME/bin:$PATH

Export LD_LIBRARY_PATH=$ORACLE_HOME/bin:/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin

Export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib

Umask 022

9. Make the settings take effect

Source / home/oracle/.bash_profile

10. Configure the hosts file

Vi / etc/hosts

10.102.98.231 adgc

Note:

At the same time, the settings of DISPLAY will be checked when using silent installation. If it is often said that checking DISPLAY does not work, execute "xhost + your ip:0.0" under root users.

II. Implementation and deployment

1. Extract the oracle installation file

Unzip linux.x64_11gR2_database_1of2.zip

Unzip linux.x64_11gR2_database_2of2.zip

two。 Copy the response file template and set the response file permissions (pay attention to adjusting the personal environment path)

Mkdir $ORACLE_BASE/etc

Cp / backup/software/database/response/* / app/oracle/etc/

Su-root

Chmod 700 / app/oracle/etc/*.rsp (note that the owner is oinstall)

3. Install Oracle software silently

(1) modify the response file / app/oracle/etc/db_install.rsp for installing Oracle software (you can follow the configuration prompts in it. Here are some common configurations for reference)

Oracle.install.option=INSTALL_DB_SWONLY / / installation type

ORACLE_HOSTNAME=dgc / / Host name (hostname query)

UNIX_GROUP_NAME=oinstall / / installation group

INVENTORY_LOCATION=/app/oracle/oraInventory / / INVENTORY directory (left empty is the default)

SELECTED_LANGUAGES=en,zh_CN,zh_TW / / Select language

ORACLE_HOME=/app/oracle/product/11204/db_1 / / oracle_home

ORACLE_BASE=/app/oracle / / oracle_base

Oracle.install.db.InstallEdition=EE / / oracle version

Oracle.install.db.isCustomInstall=false / / Custom installation, No, use default components

Oracle.install.db.DBA_GROUP=dba / / dba user group

Oracle.install.db.OPER_GROUP=oinstall / / oper user group

Oracle.install.db.config.starterdb.type=GENERAL_PURPOSE / / database type

Oracle.install.db.config.starterdb.globalDBName=orcl / / globalDBName

Oracle.install.db.config.starterdb.SID=orcl / / SID

Oracle.install.db.config.starterdb.memoryLimit=32768 / / automatically manage memory (M)

Oracle.install.db.config.starterdb.password.ALL=oracle / / set all database users to use the same password

Note:

SECURITY_UPDATES_VIA_MYORACLESUPPORT=false (false written manually)

DECLINE_SECURITY_UPDATES=true / / set security update (there seems to be bug, this must be selected true, otherwise it will infinitely remind you that there is a problem with the email address and terminate the installation. PS: no matter whether the address is correct or not)

(2) start silent installation

[root@dgc database] # su-oracle

[root@dgc oracle] # cd / backup/software/database/

[oracle@dgc database] $. / runInstaller-silent-responsefile / app/oracle/etc/db_install.rsp

Starting Oracle Universal Installer...

Check temporary space: must be greater than 120 MB. Actually passed for 725253 MB.

Check swap space: must be greater than 150 MB. Actually passed for 32279 MB.

Prepare to launch Oracle Universal Installer / tmp/OraInstall2018-03-12, 06-24-28PM from the following address. Please wait... [oracle@dgc database] $[WARNING] [INS-13014] the target environment does not meet some optional requirements.

Reason: some optional prerequisites are not met. For more information, check the log. / app/oracle/oraInventory/logs/installActions2018-03-12 October 06-24-28PM.log

Action: determine the list of failed prerequisite checks from the log / app/oracle/oraInventory/logs/installActions2018-03-12 / 06-24-28PM.log. Then, find the appropriate configuration that meets these prerequisites from the log file or installation manual, and fix it manually.

The log for this installation session can be found at the following location:

/ app/oracle/oraInventory/logs/installActions2018-03-12 October 06-24-28PM.log

The installation of Oracle Database 11g was successful.

Please see'/ app/oracle/oraInventory/logs/silentInstall2018-03-12 December 06-24-28PM. Log 'for more information.

Execute the following script as the root user:

1. / app/oracle/product/11204/db_1/root.sh

Successfully Setup Software.

(3) execute script / app/oracle/product/11204/db_1/root.sh as root user

(4) another way to install directly by using command plus parameters.

$. / runInstaller-silent-debug-force\

FROM_LOCATION=/backup/software/database/stage/products.xml\

Oracle.install.option=INSTALL_DB_SWONLY\

UNIX_GROUP_NAME=oinstall\

INVENTORY_LOCATION=/app/oracle/oraInventory\

ORACLE_HOME=/app/oracle/product/11204/db_1\

ORACLE_HOME_NAME= "OraDb11g_Home"\

ORACLE_BASE=/app/oracle\

Oracle.install.db.InstallEdition=EE\

Oracle.install.db.isCustomInstall=false\

Oracle.install.db.DBA_GROUP=dba\

Oracle.install.db.OPER_GROUP=dba\

DECLINE_SECURITY_UPDATES=true

... ...

It will appear at the end.

The installation of Oracle Database 11g was successful.

Please see'/ app/oracle/oraInventory/logs/silentInstall2018-03-120005-28-14PM.log' for more information.

(5) execute script / app/oracle/product/11204/db_1/root.sh as root user

[root@dgc tmp] # / app/oracle/product/11204/db_1/root.sh

Check / app/oracle/product/11204/db_1/install/root_dgc_2018-03-12, 17-31-43.log for the output of root script

4. Install DB silently

(1) Edit the configuration file dbca.rsp (you can follow the configuration prompts in it. Here are some common configurations for reference)

[GENERAL]

RESPONSEFILE_VERSION = "11.2.0"

OPERATION_TYPE = "createDatabase"

[CREATEDATABASE]

GDBNAME = "orcl"

SID = "orcl"

TEMPLATENAME = "General_Purpose.dbc"

CHARACTERSET = "AL32UTF8" / * Default value US7ASCII * /

(2) install DB

[oracle@dgc ~] $dbca-silent-responsefile / app/oracle/etc/dbca.rsp

Error: template new_orcl.dbc does not exist. Please specify an existing template for the database creation operation.

Location where the template is installed:

[oracle@dgc ~] $cd / app/oracle/product/11204/db_1/assistants/dbca/templates

[oracle@dgc templates] $ls

Data_Warehouse.dbc example.dmp New_Database.dbt Seed_Database.dfb

Example01.dfb General_Purpose.dbc Seed_Database.ctl

[oracle@dgc etc] $dbca-silent-responsefile / app/oracle/etc/dbca.rsp

Enter the SYS user password:

Enter the SYSTEM user password:

Copy database files

1% completed

3% completed

11% completed

18% completed

26% completed

37% completed

Creating and starting Oracle instance

40% completed

45% completed

50% completed

55% completed

56% completed

60% completed

62% completed

Database creation in progress

66% completed

70% completed

73% completed

85% completed

96% completed

100% completed

For more information, see the log file "/ app/oracle/cfgtoollogs/dbca/orcl/orcl.log".

5. Install and configure network monitoring

(1) install monitoring

[oracle@dgc etc] $netca-silent-responsefile / app/oracle/etc/netca.rsp

Parsing command line arguments:

Parameter "silent" = true

Parameter "responsefile" = / app/oracle/etc/netca.rsp

Complete the syntax analysis of the command line parameters.

Oracle Net Services configuration:

Complete the profile configuration.

The Oracle Net listener starts:

Running listener controls:

/ app/oracle/product/11204/db_1/bin/lsnrctl start LISTENER

Listener control complete.

The listener started successfully.

The listener configuration is complete.

Oracle Net Services configuration completed successfully. The exit code is 0

(2) check the monitoring status

[oracle@dgc etc] $lsnrctl status

LSNRCTL for Linux: Version 11.2.0.4.0-Production on 12-MAR-2018 19:50:19

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 12-MAR-2018 19:49:58

Uptime 0 days 0 hr. 0 min. 21 sec

Trace Level off

Security ON: Local OS Authentication

SNMP OFF

Listener Parameter File / app/oracle/product/11204/db_1/network/admin/listener.ora

Listener Log File / app/oracle/diag/tnslsnr/dgc/listener/alert/log.xml

Listening Endpoints Summary...

(DESCRIPTION= (ADDRESS= (PROTOCOL=ipc) (KEY=EXTPROC1521)

(DESCRIPTION= (ADDRESS= (PROTOCOL=tcp) (HOST=dgc) (PORT=1521))

The listener supports no services

The command completed successfully

(3) add tnsnames.ora files

[oracle@dgc admin] $cat tnsnames.ora

# tnsnames.ora Network Configuration File: / home/app/oracle/product/11.2.0/db/network/admin/tnsnames.ora

# Generated by Oracle configuration tools.

Orcl =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP) (HOST = dgc) (PORT = 1521))

(CONNECT_DATA =

(SERVER = DEDICATED)

(SERVICE_NAME = orcl)

)

)

(4) Test connection

[oracle@dgc admin] $sqlplus sys/oracle@orcl as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Mon Mar 12 23:00:54 2018

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

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.4.0-64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL > exit

Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0-64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

[oracle@dgc admin] $

(5) check and modify database parameters (as appropriate)

For example: memory_max_target, sga_max_size, processes, pga_aggregate_target, etc.

SYS@orcl > alter system set processes=1000 scope=spfile

System altered.

SYS@orcl > alter system set sga_max_size=20g scope=spfile

System altered.

SYS@orcl > alter system set sga_target=20g scope=spfile

System altered.

SYS@orcl > alter system set pga_aggregate_target=6g scope=spfile

System altered.

SYS@orcl > alter system set nls_time_format='yyyy-mm-dd hh34:mi:ss' scope=spfile

System altered.

The above is all the contents of the article "how to install Oracle stand-alone silently". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report