之前安裝過oracle 11g,因此環境變量部分準備略過,僅說明不一樣之處
1 安裝
解壓linux
cpio -idmv <10201_database_linux_x86_64.cpio ./runInstaller -ignoresysprereqs
檢查缺包:sql
yum install libXp.so.6 yum install libXt.so.6 yum install libXtst.so.6
安裝82%報錯:數據庫
makefile '/u01/app/oracle10g/product/10g/db_1/sysman/lib/ins_emdb.mkbash
錯誤能夠忽略,也能夠後續安裝oracle 10.2.0.4/5來解決些問題;oracle
2 sqlplus / as sysdba 報錯ORA-01804 failure to initialize timezone information
因爲裝了oracle 11g,因此更改.bash_profile,去掉oracle 11g環境變量,單獨爲每一個版本設置變量
3 startup nomount報錯app
ORA-27125:unable to create shared memory segment [root@iZm5eg3yspb12f3ke9ts08Z bin]# id oracle uid=500(oracle) gid=500(oinstall) groups=500(oinstall),501(dba) [root@iZm5eg3yspb12f3ke9ts08Z bin]# more /proc/sys/vm/hugetlb_shm_group 0 [root@iZm5eg3yspb12f3ke9ts08Z bin]# echo 500>/proc/sys/vm/hugetlb_shm_group
4 create databasetcp
CREATE DATABASE prod3 USER SYS IDENTIFIED BY oracle USER SYSTEM IDENTIFIED BY oracle LOGFILE GROUP 1 ('/data/prod3/redo01a.log') SIZE 100M , GROUP 2 ('/data/prod3/redo02a.log') SIZE 100M , GROUP 3 ('/data/prod3/redo03a.log') SIZE 100M MAXLOGFILES 5 MAXLOGMEMBERS 5 MAXLOGHISTORY 1 MAXDATAFILES 100 CHARACTER SET AL32UTF8 NATIONAL CHARACTER SET AL16UTF16 EXTENT MANAGEMENT LOCAL DATAFILE '/data/prod3/system01.dbf' SIZE 325M REUSE SYSAUX DATAFILE '/data/prod3/sysaux01.dbf' SIZE 325M REUSE DEFAULT TABLESPACE users DATAFILE '/data/prod3/users01.dbf' SIZE 500M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED DEFAULT TEMPORARY TABLESPACE tempts1 TEMPFILE '/data/prod3/temp01.dbf' SIZE 200M REUSE UNDO TABLESPACE undotbs DATAFILE '/data/prod3/undotbs01.dbf' SIZE 200M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED;
ORA-30014: operation only supported in Automatic Undo Management mode
vi initPROD3.oraundo_management=auto
ide
繼續執行:ui
@?/rdbms/admin/catalog.sql @?/rdbms/admin/catproc.sql @?/sqlplus/admin/pupbld.sql
查看alert_prod3.log:this
Heap size 3408K exceeds notification threshold (2048K)
SQL> SELECT x.ksppinm NAME, y.ksppstvl VALUE, x.ksppdesc describ FROM SYS.x$ksppi x, SYS.x$ksppcv y WHERE x.inst_id = USERENV ('Instance') AND y.inst_id = USERENV ('Instance') AND x.indx = y.indx AND x.ksppinm LIKE '%&par%'
Enter value for par: kgl_large old 6: AND x.ksppinm LIKE '%&par%' new 6: AND x.ksppinm LIKE '%kgl_large%' --------------------------------------------------------------------- _kgl_large_heap_warning_threshold 2097152 maximum heap size before KGL writes warnings to the alert log alter system set "_kgl_large_heap_warning_threshold"=8388608 scope=spfile ;
檢查監聽:
lsnrctl status LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 17-JUL-2018 17:55:49 Copyright (c) 1991, 2005, Oracle. All rights reserved. Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521)) STATUS of the LISTENER Alias LISTENER Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production Start Date 10-JUN-2018 11:54:09 Uptime 37 days 6 hr. 1 min. 39 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora Listener Log File /u01/app/oracle/diag/tnslsnr/iZm5eg3yspb12f3ke9ts08Z/listener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=iZm5eg3yspb12f3ke9ts08Z)(PORT=1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=extproc))) Services Summary... Service "PROD1" has 1 instance(s). Instance "PROD1", status UNKNOWN, has 1 handler(s) for this service... Service "PROD3" has 1 instance(s). Instance "PROD3", status READY, has 1 handler(s) for this service... Service "prod3_XPT" has 1 instance(s). Instance "PROD3", status READY, has 1 handler(s) for this service... The command completed successfully
檢查數據庫狀態:
SQL> select * from v$version; BANNER ---------------------------------------------------------------- Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bi PL/SQL Release 10.2.0.1.0 - Production CORE 10.2.0.1.0 Production TNS for Linux: Version 10.2.0.1.0 - Production NLSRTL Version 10.2.0.1.0 - Production