- As a result of this experiment, I will copy the last virtual machine directly, and then install the graphical interface inside the Oracle to delete, re-install again, so here to modify some configuration.
- The first thing to change is our IP address.
# system-config-network
- After completion we modify the Hosts file, the inside of the IP address to modify
# vi/etc/hosts
- Then we delete the last Oracle file we installed
-RF *
- Enter root:rm-rf/etc/ora*
- or configure it before installation.
- The next silent installation. First we'll create a file that records all of our Oracle installation processes.
[Email protected] ~]$ cd/u01/database///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 start the installation:
[Email protected] ~]$ cd/u01/database$. /runinstaller-silent-responsefile/u01/enterprise.rsp
- After the installation is complete, execute the following script
$ORACLE _base/orainventory/orainstroot.sh$oracle_home/root.sh
- After executing the script, use: Sqlplus/as sysdba to know that the Oracle version is: 10.2.0.1.0
- Silently upgrade the database
$ CP/U01/DISK1/RESPONSE/PATCHSET.RSP/U01vi/u01/PATCHSET.RSP Edit the following line: $Unix_group_name=\"oinstall\ " theOracle_home=\"/u01/app/oracle/10.2.0/db_1\ " AboutOracle_home_name=\"oradbhome1\ " 533Myoraclesupport_username=\"[email protected]\] 542Myoraclesupport_password=\"b\ " 603decline_security_updates=true
- Patches for installing upgrades
$./RUNINSTALLER-SILENT-RESPONSEFILE/U01/PATCHSET.RSP
- Upgrade successful
as 10.2. 0.5. 0 - productionwith 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.5instance_name=Orcldb_name=Orclsga_target=500msga_max_size=500mjob_queue_processes=Tenundo_management=Autoundo_tablespace=undotbsaudit_file_dest= $ORACLE _base/admin/orcl/adumpbackground_dump_dest= $ORACLE _base/admin/orcl/bdumpcore_dump_dest= $ORACLE _base/admin/orcl/cdumpuser_dump_dest= $ORACLE _base/admin/orcl/Udumpcontrol_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
- Where to create the control file
Mkdir-p/u01/app/oracle/oradata/orcl/
- Boot to instance:
as from pfile;startup nomount
- Next, create the database
- VI Createdb.sql writes the following:
CREATE DATABASE ORCL USER SYS identified by a---you need to change your password here. USER SYSTEM identified by a LOGFILE GROUP1(\'/u01/app/oracle/oradata/orcl/redo01.log\ ') SIZE 50M,GROUP2(\'/u01/app/oracle/oradata/orcl/redo02.log\ ') SIZE 50M,GROUP3(\'/u01/app/oracle/oradata/orcl/redo03.log\ ') SIZE 50MMaxlogfiles5maxlogmembers5maxloghistory1Maxdatafiles -maxinstances1CHARACTER set UTF8 national CHARACTER set UTF8 datafile \'/u01/app/oracle/oradata/orcl/system01.dbf\ ' SIZE 325M reuseEXTENT MANAGEMENT LOCAL sysaux datafile \'/u01/app/oracle/oradata/orcl/sysaux01.dbf\ ' SIZE 325M reuseDEFAULT tablespace users datafile \'/u01/app/oracle/oradata/orcl/users01.dbf\ ' size 200MDEFAULT 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 MAXSIZE UNLIMITED/
- Then refer to these scripts in SQL
get /u01/create.sql --- explain how get works by referencing any file in the operating system directory into SQL. SQL> ... SQL>/-----Execute these script statements and generate control files, data files, log files, and so on in the appropriate location----
- Then execute
sql>desc Dba_tableserror:ora-04043object dba_tables does not exist---- Explain: The query here is the data dictionary, we just built the database, and not the database related views, tables, indexes, data dictionary and so on. ----
- So we're going to build these views, tables, indexes.
$ cd/U01vi Jb.sql writes the following: @?/rdbms/admin/catalog.sql ----catalog.sql: Create a data dictionary @?/rdbms/admin/ Catproc.sql ----catproc.sql: Install Oracle custom Package conn System/a@?/sqlplus/admin/pupbld.sql --- -pupbld.sql: Shielded Sqlplus Error
- Then execute the script in the database:
sql>@/u01/Jb.sql---Explain here: @: You can execute a SQL statement in a script under the operating system
- Then there is a long wait, an estimated more than 20 minutes.
- After the execution, you will see a lot of what table ah view what, does not exist. Don't worry about him, this is the time to create a data dictionary to query for those tables that do not exist. Of course not exist ah, because have not yet created, so naturally will error.
Sql>desc Dba_tables
- This time after the end of the content.
Select from Dba_tables
- Next we do OEM installation, we will fix the patch before installation. Patches We also use a silent installation. Patch: P8350262_10205_generic.zip
- Upload the patch to the directory: $ORACLE _home/opatch/decompression:
$ unzip P8350262_10205_generic.zip
- Get a directory of: 8350262
- Patching:
$ emctl Stop dbconsole$ CD $ORACLE _home/opatch$. 8350262
- After the patch is installed
$ lsnrctl Status display: No Listener
- Then we do:
$ cd/u01/database/response///SILENT/RESPONSEFILE/U01/NETCA.RSP
- After installing the listener, we enter Sqlplus to register the database with this listener.
as sysdba;sqlplus>alter System Register
- After the listener installation is complete, we install the repository
Select from where username=\'sysman\ '; No rows selected
- To execute the installation repository command:
$ EMCA-Repos Create STARTED EMCA at Mar -, - 9: $: atamem Configuration Assistant, Version10.2.0.1.0Productioncopyright (c)2003,2005, Oracle. All rights reserved. Enter the following information:database sid:orcllistener port number:1521Password forSYS User:password forSysman User:password forSysman User:do you wish toContinue? [Yes (Y)/No (N)]: Ymar -, - 9: -: -AM oracle.sysman.emcp.EMConfig performinfo:this Operation isBeing logged at/u01/app/oracle/10.2.0/db_1/cfgtoollogs/emca/orcl/emca_2013-Geneva-30_09- $-2-AM.log.Mar -, - 9: -: -AM oracle.sysman.emcp.EMReposConfig createrepositoryinfo:creating the EM repository ( ThisMay take a while) ... Mar -, - Ten:xx: theAM oracle.sysman.emcp.EMReposConfig invokeinfo:repository successfully createdenterprise Manager configuration Completed successfullyfinished EMCA at Mar -, - Ten:xx: theAm
- After the database installation is complete, we install the console:
$ EMCA-config Dbcontrol dbstarted EMCA at Mar -, - Ten: on: -amem Configuration Assistant, Version10.2.0.1.0Productioncopyright (c)2003,2005, Oracle. All rights reserved. Enter the following information:database sid:orcllistener port number:1521Password forSYS User:password forDbsnmp User:password forSysman user:invalid username/password. Password forSysman User:email Address forNotifications (optional): Outgoing Mail (SMTP) Server forNotifications (optional):-----------------------------------------------------------------You have specified the following settingsdatabase oracle_home ... ... ...../u01/app/oracle/10.2.0/Db_1database hostname ..... Hndxlistener port number ..... .......... .........-- -------------"1521Database SID ..... orclemail address of the ..... forNotifications ......... Outgoing Mail (SMTP) Server fornotifications .........-----------------------------------------------------------------Wish toContinue? [Yes (Y)/No (N)]: Ymar -, - Ten: Geneva: theAM oracle.sysman.emcp.EMConfig performinfo:this Operation isBeing logged at/u01/app/oracle/10.2.0/db_1/cfgtoollogs/emca/orcl/emca_2013-Geneva-30_10- on-4-AM.log.Mar -, - Ten: Geneva: -AM oracle.sysman.emcp.util.DBControlUtil startomsinfo:starting Database Control ( ThisMay take a while) ... Mar -, - Ten:Geneva: -AM oracle.sysman.emcp.EMDBPostConfig performconfigurationinfo:database Control started Successfullymar -, - Ten:Geneva: -AM oracle.sysman.emcp.EMDBPostConfig performconfigurationinfo:>>>>>>>>>>> the Database Control URL ishttp//hndx:1158/em <<<<<<<<<<<Enterprise Manager configuration completed successfullyfinished EMCA at Mar -, - Ten:Geneva: -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 definition
- See the Firefox interface is very friendly. It is estimated that there will be an error, that is, to add a certificate, enter and add click the following add just fine.