Teach you how to install oracle_oracle silently

Source: Internet
Author: User
Tags mkdir reserved create database sqlplus

Because of this experiment I was the last virtual machine directly copied over, and then the graphical interface inside the installed Oracle to delete, reinstall again, so here to modify some configuration.

The first modification is our IP address.

# system-config-network

When we are done, we will revise the hosts file and change the IP address inside.

# vi/etc/hosts

Then we delete the last installed Oracle files

# CD $ORACLE _base
# ls
# RM-RF *

Enter root:rm-rf/etc/ora*
or configure before installation.
The following is a silent installation. First we have to create a file that records all the processes of our Oracle installation

[Oracle@oracle ~]$ cd/u01/database/response
$ cp enterprise.rsp/u01
$ vi/u01/enterprise.rsp

Modify the content:

Unix_group_name=\ "oinstall\"
 oracle_home=\ "/u01/app/oracle/10.2.0/db_1\"
 oracle_home_name=\ " Oradbhome1\ "
 351 component_languages={\" en,zh_cn\ "}
 384 s_namefordbagrp=\" dba\ "
 392 s_nameforopergrp= \ "Oper\"
 422 n_configurationoption=3

To begin the installation:

[Oracle@oracle ~]$ cd/u01/database
$/runinstaller-silent-responsefile/u01/enterprise.rsp

Execute the following script after Setup completes

$ORACLE _base/orainventory/orainstroot.sh
$ORACLE _home/root.sh

After the script is executed: Sqlplus/as SYSDBA can know that Oracle version is: 10.2.0.1.0
Silent Upgrade Database

$ cp/u01/disk1/response/patchset.rsp/u01
VI/U01/PATCHSET.RSP Edit the following line:
  unix_group_name=\ "Oinstall\"
  Oracle_home=\ "/u01/app/oracle/10.2.0/db_1\"
  oracle_home_name=\ "oradbhome1\"
  Myoraclesupport_ Username=\ "zhaoming@sina.com\"
  542 myoraclesupport_password=\ "b\" 603 decline_security_updates=true
  

Patches for installation upgrades

$./RUNINSTALLER-SILENT-RESPONSEFILE/U01/PATCHSET.RSP

Upgrade successful

$ sqlplus/as sysdba;
Connected to:
Oracle Database 10g Enterprise Edition release 10.2.0.5.0-production
with the partitioning, OLAP , Data Mining and real application testing options

Next, build the library manually

$ VI $ORACLE _home/dbs/initorcl.ora
writes the following:
compatible=10.2.0.5
INSTANCE_NAME=ORCL
DB_NAME=ORCL
sga_target=500m
sga_max_size=500m
job_queue_processes=10
undo_management=auto
undo_ Tablespace=undotbs
audit_file_dest= $ORACLE _base/admin/orcl/adump
background_dump_dest= $ORACLE _base/ Admin/orcl/bdump
core_dump_dest= $ORACLE _base/admin/orcl/cdump
user_dump_dest= $ORACLE _BASE/ADMIN/ORCL /udump
control_files=\ '/u01/app/oracle/oradata/orcl/control01.ctl\ ', \ '/u01/app/oracle/oradata/orcl/ Control02.ctl\ '
Save exit

To create a trace directory:

Mkdir-p $ORACLE _base/admin/orcl/{a,b,c,u}dump

To create a location for the control file

Mkdir-p/u01/app/oracle/oradata/orcl/

Boot to instance:

Sqlplus/as sysdba
Create SPFile from Pfile;
Startup Nomount

  Next CREATE DATABASE
 vi Createdb.sql writes the following:

 CREATE DATABASE ORCL user SYS identified by a---need to modify your password USER SYSTEM identified by a LOGFILE Group 1 (\ '/u01/app/oracle/oradata/orcl/redo01.log\ ') SIZE 50M, GROUP 2 (\ '/u01/app/oracle/oradata/orcl/redo 
  02.log\ ') size 50M, GROUP 3 (\ '/u01/app/oracle/oradata/orcl/redo03.log\ ') size 50M maxlogfiles 5 maxlogmembers 5 Maxloghistory 1 maxdatafiles maxinstances 1 CHARACTER set UTF8 national CHARACTER set UTF8 datafile \ '/u0 1/app/oracle/oradata/orcl/system01.dbf\ ' SIZE 325M reuse EXTENT MANAGEMENT local sysaux datafile \ '/u01/app/oracle/ora Data/orcl/sysaux01.dbf\ ' SIZE 325M reuse DEFAULT tablespace users datafile \/u01/app/oracle/oradata/orcl/users01.dbf\
  ' Size 200M DEFAULT temporary tablespace temp tempfile \ '/u01/app/oracle/oradata/orcl/temp01.dbf\ ' size 20M reuse UNDO tablespace undotbs datafile \ '/u01/app/oracle/oradata/orcl/undotbs01.dbf\ ' SIZE 200M reuse autoextend on MAXS Ize Unlimited/

And then refer to these scripts in SQL

Sql> Get/u01/create.sql  ---Explain the role of Get: Referencing any file in the operating system directory into SQL. Sql> .....
sql>/

-----The script statements are executed, the control files, data files, log files, and so on are generated at the appropriate locations----
Then execute

Sql>desc dba_tables
ERROR:
ora-04043:object dba_tables does not exist

----Explain: Here is a data dictionary, we just built a database, and not the database related views, tables, indexes, data dictionary, etc. built. ----
So we're going to build these views, tables, and indexes.

$ cd/u01
VI Jb.sql writes as follows:
@?/rdbms/admin/catalog.sql----Catalog.sql: Creating a data dictionary
@?/rdbms/admin/ Catproc.sql  ----catproc.sql: Install the Oracle custom package
conn system/a
@?/sqlplus/admin/pupbld.sql  ---- Pupbld.sql: Shielding Sqlplus Error

The script is then executed in the database:

Sql>@/u01/jb.sql

---here to explain: @: Can execute SQL statements in a script under the operating system

Followed by a long wait, estimated more than 20 minutes.

After the execution is done, you will see a lot of what the tables and views are, does not exist. Don't worry about him, this is the time to create the data dictionary first query these tables do not exist. Of course it does not exist, because they have not been created, so nature will be an error.

Sql>desc Dba_tables

After this time, there is content.

Sql> Select COUNT (*) from Dba_tables

Next we will install the OEM, before we install the patch to fill up. We also use the silent installation. Patch:

P8350262_10205_generic.zip

Upload the patch to the directory: $ORACLE _home/opatch/decompression:
$ unzip P8350262_10205_generic.zip
Get a list of: 8350262
Patching:

$ emctl Stop dbconsole
$ cd $ORACLE _home/opatch
$/opatch Apply 8350262

After the patch is installed

$ lsnrctl Status display: No Listener

And then we do:

$ cd/u01/database/response/
$ cp netca.rsp/u01
$ netca/silent/responsefile/u01/netca.rsp

After installing the listener we go into the sqlplus to register the database on this listener.

$ sqlplus/as sysdba;
Sqlplus>alter System Register

After the listener installation completes, we install the repository

Sql> Select username from dba_users where username=\ ' sysman\ ';
     No rows selected

To execute the Install repository command:

$ emca-repos Create 
started EMCA at Mar, 2013 9:57:23 AM
EM Configuration Assistant, Version 10.2.0.1.0 produc tion
Copyright (c) 2003,%, Oracle. All rights reserved.
Enter The following information:
Database sid:orcl
Listener Port number:1521
Password for SYS User: 
Pas Sword for Sysman User: 
Password for Sysman User: 
does you have wish to continue? [Yes (y)/no (N)]: Y-
Mar, 2013 9:58:28 AM oracle.sysman.emcp.EMConfig perform info:this operation is
being Logg Ed At/u01/app/oracle/10.2.0/db_1/cfgtoollogs/emca/orcl/emca_2013-03-30_09-57-2-am.log.
Mar, 2013 9:58:28 AM oracle.sysman.emcp.EMReposConfig createrepository
info:creating the EM repository (this May Take a while) ...
Mar, 2013 10:00:42 AM oracle.sysman.emcp.EMReposConfig invoke
info:repository successfully
created Enterprise Manager configuration completed successfully
finished EMCA at Mar, 2013 10:00:42 AM

After the database installation is complete, we install the console:

$ emca-config Dbcontrol DB started EMCA at Mar, 2013 10:01:47 AM EM Configuration Assistant, Version 10.2.0.1.0 produ Ction Copyright (c) 2003,%, Oracle.
All rights reserved.  Enter the following information:database sid:orcl Listener port number:1521 Password for SYS User:password for DBSNMP
User:password for Sysman user:invalid Username/password. Password for Sysman User:email address for notifications (optional): Outgoing Mail (SMTP) server for notifications (opt
ional):-----------------------------------------------------------------You have specified the following settings The database oracle_home ... .../u01/app/oracle/10.2.0/db_1 database hostname ... hndx Listener Port--------------... Number .......... 
1521 Database SID ... ... orcl Email address for notifications ........... ........ ... Outgoing Mail (SMTP) server for notifications .......------------------------------------------------------- ----------do you wish to continue? [Yes (Y)/no (N)]: Y-Mar, 2013 10:02:42 AM oracle.sysman.emcp.EMConfig perform info:this operation is being logged at/u01/app/o
Racle/10.2.0/db_1/cfgtoollogs/emca/orcl/emca_2013-03-30_10-01-4-am.log. Mar, 2013 10:02:48 AM oracle.sysman.emcp.util.DBControlUtil startoms info:starting Database Control (this may take a W
Hile) ... Mar, 2013 10:04:24 AM oracle.sysman.emcp.EMDBPostConfig performconfiguration info:database Control started Ly Mar, 2013 10:04:24 AM oracle.sysman.emcp.EMDBPostConfig performconfiguration INFO: >>>>>>>
>>>> the Database control URL is Http://hndx:1158/em <<<<<<<<<<<

 Enterprise Manager configuration completed successfully finished EMCA at Mar, 2013 10:04:24 AM

It's almost done.
$ Firefox http://hndx:1158/em-if error: username password is wrong, please create password file first:
To create a password file:

Orapwd file= $ORACLE _HOME/DBS/ORAPWORCL password=xxxxx---user name defined

Do you see the interface of Firefox browser is very cordial. It is estimated that there will be a mistake, is to add a certificate, after entering add click on the following Add.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.