阿里云centos 6.9安装oracle10g

以前安装过oracle 11g,所以环境变量部分准备略过,仅说明不同之处
1 安装
解压

cpio -idmv <10201_database_linux_x86_64.cpio
./runInstaller  -ignoresysprereqs

检查缺包:

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.mk

错误可以忽略,也可以后续安装oracle 10.2.0.4/5来解决些问题;

2 sqlplus / as sysdba 报错
ORA-01804 failure to initialize timezone information
由于装了oracle 11g,所以更改.bash_profile,去掉oracle 11g环境变量,单独为每个版本设置变量
3 startup nomount报错

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 database

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.ora
undo_management=auto

继续执行:


@?/rdbms/admin/catalog.sql
@?/rdbms/admin/catproc.sql
@?/sqlplus/admin/pupbld.sql

查看alert_prod3.log:

Heap size 3408K exceeds notification threshold (2048K)

扫描二维码关注公众号,回复: 2199200 查看本文章
SQL&gt; 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

猜你喜欢

转载自blog.51cto.com/snowhill/2145991
今日推荐