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 11g silently

2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

This article is about how to install oracle 11g silently. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

Download oracle 11g

Download address: wget http://v.yingsun.net/cobra/download/linux.x64_11gR2_database_1of2.zip

Download address: wget http://v.yingsun.net/cobra/download/linux.x64_11gR2_database_2of2.zip

One installation of java

Check to see if the CentOS native JDK is installed. Yum list installed | grep java

Check the Java installation package command in the yum library: yum-y list java to see if there is java-1.8.0-openjdk in the installable package

Check and install the required rpm

Check packages and versions of each version can be found in the official documentation

Https://docs.oracle.com/cd/E11882_01/install.112/e24326/toc.htm#BHCFACHG

Check whether all installation packages have been installed

Rpm-Q binutils compat-libcap1 compat-libstdc++-33 gcc gcc-c++ glibc glibc-devel ksh libaio libaio-devel libgcc libstdc++ libstdc++-devel libXi libXtst make sysstat unixODBC unixODBC-devel

Check if there are 31.

You can also check it in the following ways, including centos6,centos7 's package

Rpm-Q-- qf'% {NAME} -% {VERSION} -% {RELEASE} (% {ARCH})\ n 'binutils\

Compat-libcap1\

Compat-libstdc++-33\

Elfutils-libelf\

Elfutils-libelf-devel\

Gcc\

Gcc-c++\

Glibc\

Glibc-common\

Glibc-devel\

Glibc-headers\

Ksh\

Libaio\

Libaio-devel\

Libgcc\

Libstdc++\

Libstdc++-devel\

LibXi\

LibXtst\

Make\

Sysstat\

UnixODBC\

UnixODBC-devel

If the corresponding package is missing, you can install it with yum-y install, or you can install all the required dependent packages directly as follows

Yum-y install binutils compat-libcap1 compat-libstdc++-33 compat-libstdc++-33*i686 compat-libstdc++-33*.devel compat-libstdc++-33 compat-libstdc++-33*.devel gcc gcc-c++ glibc glibc*.i686 glibc-devel glibc-devel*.i686 ksh libaio libaio*.i686 libaio-devel libaio-devel*.devel libgcc libgcc*.i686 libstdc++ libstdc++*.i686 libstdc++-devel libstdc++-devel*.devel libXi libXi*.i686 libXtst libXtst*.i686 make sysstat unixODBC unixODBC*.i686 unixODBC-devel unixODBC-devel*.i686

The method of online search can also be referred to as follows

Yum-y install binutils compat-libstdc++ compat-libstdc++-33 elfutils-libelf-devel gcc gcc-c++ glibc-devel glibc-headers ksh libaio-devel libstdc++-devel make sysstat unixODBC-devel binutils-* compat-libstdc++* elfutils-libelf* glibc* gcc-* libaio* libgcc* libstdc++* make* sysstat* unixODBC* wget unzip unixODBC-devel

There are also packages that must be downloaded.

Wget ftp://ftp.pbone.net/mirror/www.whiteboxlinux.org/whitebox/4/en/updates/i686/glibc-2.3.4-2.43.i686.rpm

3. Create user groups and users

Userdel-r oracle

Groupadd-g 700 oinstall

Groupadd-g 701 dba

Useradd-g oinstall-G dba-u 700 oracle

Passwd oracle

Id oracle

Fourth, set ORACLE environment variables

Su-oracle

Vi / .bash_profile

Export ORACLE_BASE=/u02/oracle

Export ORACLE_HOME=/u02/oracle/product/11.2.0/dbhome_1

Export ORACLE_SID=orcl

Export NLS_LANG= "american_america.AL32UTF8"

Export NLS_DATE_FORMAT= "YYYY-MM-DD HH24:Mi:SS"

Export LD_LIBRARY_PATH=$ORACLE_HOME/lib

Export PATH=$ORACLE_HOME/bin:$PATH

/ / reference method for initializing environment variables by script

New_export = "export ORACLE_BASE=/u02/oracle"

Echo "export ORACLE_BASE=/u02/oracle" > > ~ / .bash_profile

Echo "export ORACLE_HOME=/u02/oracle/product/11.2.0/dbhome_1" > > ~ / .bash_profile

Echo "export ORACLE_SID=orcl" > > ~ / .bash_profile

Bash shell: sample http://blog.csdn.net/10km/article/details/51953721 for updating LD_LIBRARY_PATH by modifying the profile file in the script

Source / .bash_profile

Check to see if the environment variable is complete

Env | grep ORA

5. Create an installation directory

Su-root

Mkdir-p / u02/oracle

Mkdir-p / u02/oracle/product/11.2.0/dbhome_1

Chown-R oracle:oinstall / u02/oracle

Chmod-R 775 / u02/oracle

Vi / etc/oraInst.loc

Inventory_loc==/home/oracle/oraInventory

Inst_group=oinstall

Source / etc/oraInst.loc

Chown oracle:oinstall / etc/oraInst.loc

Chmod 664 / etc/oraInst.loc

5. Decompress the installation file

Unzip p10404530_112030_Linux-x86-64_1of7.zip

Unzip p10404530_112030_Linux-x86-64_2of7.zip

Six copy response file template

Copy with oracle user

Su-oracle

Mkdir / home/oracle/etc-- put configuration files such as response files

Mkdir / home/oracle/oraInventory-put the files related to the product catalog

Cp / u02 / home/oracle/etc/ oracle database * / responseCue

7. Set response file permissions

Su-root

Chmod 700 / home/oracle/etc/*.rsp (note owner, oinstall)

Eight silently install Oracle software

Su-oracle

Modify the response file / home/oracle/etc/db_install.rsp for installing Oracle software

# Delete the comment line in the answer file (starting with #)

$sed-I's / ^ #. * $/ / g'* .rsp

Delete blank lines without content (^ $)

$sed-I'/ ^ $/ d'* .rsp

Detailed description of the contents of the file

Oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v11_2_0

Oracle.install.option=INSTALL_DB_SWONLY / / 29 installation type

ORACLE_HOSTNAME=oracle / / 37 Host name (hostname query)

UNIX_GROUP_NAME=oinstall / / 42 installation group

INVENTORY_LOCATION=/home/oracle/oraInventory / / 47 INVENTORY directory (left empty is the default) Note: it is best not to enter a directory consistent with the oracle installation path in the inventory directory here, as an error will be reported.

SELECTED_LANGUAGES=en,zh_CN,zh_TW / / 78 Select language

ORACLE_HOME=/u02/oracle/product/11.2.0/dbhome_1 / / 83 oracle_home

ORACLE_BASE=/u02/oracle / / 88 oracle_base

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

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

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

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

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

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

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

Oracle.install.db.config.starterdb.memoryLimit=81920 / 200automatically manages the memory of memory (M)

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

SECURITY_UPDATES_VIA_MYORACLESUPPORT=false / / 376 (false was written manually)

DECLINE_SECURITY_UPDATES=true / / 385 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)

The detailed list of the actual product library refers to the content of db_install.rsp.

Oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v11_2_0

Oracle.install.option=

ORACLE_HOSTNAME=iZ2zehy7gff0kpg1swp1czZ

UNIX_GROUP_NAME=oinstall

INVENTORY_LOCATION=/home/oracle/oraInventory

SELECTED_LANGUAGES=en

ORACLE_HOME=/u02/oracle/product/11.2.0/dbhome_1

ORACLE_BASE=/u02/oracle

Oracle.install.db.InstallEdition=EE

Oracle.install.db.EEOptionsSelection=false

Oracle.install.db.optionalComponents=oracle.rdbms.partitioning:11.2.0.4.0,oracle.oraolap:11.2.0.4.0,oracle.rdbms.dm:11.2.0.4.0,oracle.rdbms.dv:11.2.0.4.0,oracle.rdbms.lbac:11.2.0.4.0,oracle.rdbms.rat:11.2.0.4.0

Oracle.install.db.DBA_GROUP=dba

Oracle.install.db.OPER_GROUP=dba

Oracle.install.db.CLUSTER_NODES=

"/ home/oracle/etc/db_install.rsp" 53L, 2500C

Oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v11_2_0

Oracle.install.option=

ORACLE_HOSTNAME=iZ2zehy7gff0kpg1swp1czZ

UNIX_GROUP_NAME=oinstall

INVENTORY_LOCATION=/home/oracle/oraInventory

SELECTED_LANGUAGES=en

ORACLE_HOME=/u02/oracle/product/11.2.0/dbhome_1

ORACLE_BASE=/u02/oracle

Oracle.install.db.InstallEdition=EE

Oracle.install.db.EEOptionsSelection=false

Oracle.install.db.optionalComponents=oracle.rdbms.partitioning:11.2.0.4.0,oracle.oraolap:11.2.0.4.0,oracle.rdbms.dm:11.2.0.4.0,oracle.rdbms.dv:11.2.0.4.0,oracle.rdbms.lbac:11.2.0.4.0,oracle.rdbms.rat:11.2.0.4.0

Oracle.install.db.DBA_GROUP=dba

Oracle.install.db.OPER_GROUP=dba

Oracle.install.db.CLUSTER_NODES=

Oracle.install.db.isRACOneInstall=

Oracle.install.db.racOneServiceName=

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

Oracle.install.db.config.starterdb.globalDBName=orcl11g

Oracle.install.db.config.starterdb.SID=orcl11g

Oracle.install.db.config.starterdb.characterSet=AL32UTF8

Oracle.install.db.config.starterdb.memoryOption=true

Oracle.install.db.config.starterdb.memoryLimit=400

Oracle.install.db.config.starterdb.installExampleSchemas=false

Oracle.install.db.config.starterdb.enableSecuritySettings=true

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

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

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

Oracle.install.db.config.starterdb.password.SYSMAN=

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

Oracle.install.db.config.starterdb.control=DB_CONTROL

Oracle.install.db.config.starterdb.gridcontrol.gridControlServiceURL=

Oracle.install.db.config.starterdb.automatedBackup.enable=false

Oracle.install.db.config.starterdb.automatedBackup.osuid=

Oracle.install.db.config.starterdb.automatedBackup.ospwd=

Oracle.install.db.config.starterdb.storageType=FILE_SYSTEM_STORAGE

Oracle.install.db.config.starterdb.fileSystemStorage.dataLocation=/u02/oracle/oradata/

Oracle.install.db.config.starterdb.fileSystemStorage.recoveryLocation=/u02/oracle/flash_recovery_area/

Oracle.install.db.config.asm.diskGroup=

Oracle.install.db.config.asm.ASMSNMPPassword=

MYORACLESUPPORT_USERNAME=

MYORACLESUPPORT_PASSWORD=

SECURITY_UPDATES_VIA_MYORACLESUPPORT=

DECLINE_SECURITY_UPDATES=true

PROXY_HOST=

PROXY_PORT=

PROXY_USER=

PROXY_PWD=

PROXY_REALM=

COLLECTOR_SUPPORTHUB_URL=

Oracle.installer.autoupdates.option=

Oracle.installer.autoupdates.downloadUpdatesLoc=

AUTOUPDATES_MYORACLESUPPORT_USERNAME=

AUTOUPDATES_MYORACLESUPPORT_PASSWORD=

Execute the command to start the default installation

Cd / u02/oracle/database

. / runInstaller-ignorePrereq-showProgress-silent-responseFile / home/oracle/etc/db_install.rsp this method does not display logs

. / runInstaller-ignorePrereq-showProgress-silent-force-responseFile / home/oracle/etc/db_install.rsp

. / runInstaller-silent-force-responseFile / home/oracle/etc/db_install.rsp

You can look at the installation log at this time.

INFO: Number of threads for fast copy: 1

Pay attention to the problem.

Here, when you install oracle11g on centos7, either 11.1.0.1 or 11.2.0.4 will report an error.

String: Error in invoking target 'agent nmhs' of makefile' / u02 apprenticespact product 11.2.0 Universe dbhomehammer 1 Universe SysmanAccording to SysmanAccords.

This error is equivalent to the error encountered during the installation of the graphical interface, but the installation of the graphical interface will stop when it encounters an error, and a button to retry will be provided. Silent installation is not enough. Please refer to the specific solution.

Http://www.jb51.net/article/129719.htm "method of installing Oracle 11.2.0.4 database under CentOS 7.4" here you need to edit the installation file.

Follow the wizard to execute two files

/ home/oracle/oraInventory/orainstRoot.sh

/ u02/oracle/product/11.2.0/dbhome_1/root.sh

Nine silently configure the network

Edit the netca.rsp file

$more / home/oracle/etc/netca.rsp

[GENERAL]

RESPONSEFILE_VERSION= "11.2"

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"}

Under oracle users

$ORACLE_HOME/bin/netca / silent / responsefile / home/oracle/database/response/netca.rsp

Ten silently install the database

Installed by oracle users. You need to configure the template file for silent installation database response, and also extract the dbca_rsp file in the response directory under database in the installation package. The specific configuration is as follows

/ / $more / u02/soft/database/response/dbca.rsp

Vi / home/oracle/etc/dbca.rsp

[GENERAL]

RESPONSEFILE_VERSION = "11.2.0"

OPERATION_TYPE = "createDatabase"

[CREATEDATABASE]

GDBNAME = "orcl11g.localdomain"

SID = "orcl11g"

TEMPLATENAME = "General_Purpose.dbc"

DATAFILEDESTINATION=/u02/oracle/oradata

RECOVERYAREADESTINATION=/u02/oracle/flash_recovery_area

CHARACTERSET = "AL32UTF8"

NATIONALCHARACTERSET= "AL16UTF16"

DB_UNIQUE_NAME = "orcl11g"

LISTENERS=LISTENER

TOTALMEMORY = "700"

SYSPASSWORD = "oracle"

SYSTEMPASSWORD = "oracle"

Perform installation

$ORACLE_HOME/bin/dbca-silent-responseFile / home/oracle/etc/dbca.rsp

-/ u02/oracle/database/response/dbca.rsp

National Day holiday deletion method

After the database is installed successfully, delete the executed command

Delete the database first

/ home/oracle/database/dbca-silent-deleteDatabase-sourcedb orcl11g-sid orcl11g-sysDBAUserName system-sysDBAPassword oracle

Delete the database and software method if the installation is not successful

Delete the corresponding database folder under the / u02/oracle/oradata directory

Delete the corresponding database folder under the / u02/oracle/flash_recovery_area directory

Most important / etc/oratab deletes the record of the last corresponding database

-- Delete vi / home/oracle/oraInventory/ContentsXML/inventory.xml

Root user

Clear the swap space and delete the data files and oracle directories

Swapoff-a & & swapon-a

Rm-fr / u02/oracle/oradata

Rm-fr / u02/oracle/flash_recovery_area

Rm-fr / home/oracle/oraInventory

Rm-fr / u02/oracle/product/11.2.0/dbhome_1

Delete profile contents

Vi / etc/oratab

-- vi / home/oracle/oraInventory/ContentsXML/inventory.xml

-- sed-I'/ ^

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

Database

Wechat

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

12
Report