免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3257 | 回复: 3
打印 上一主题 下一主题

[原创] Redhat AS3_U6 的 Oracle9i 安装完全攻略--常见错误 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-04-06 23:49 |只看该作者 |倒序浏览
发信人: Wwashington (Jacky), 信区: NewSoftware
标  题: [原创] Redhat AS3_U6 的 Oracle9i 安装完全攻略--常见错误
发信站: 水木社区 (Thu Apr  6 23:40:44 2006), 站内

Written By: Wwashington(AT)newsmth.org
Published : 2006/04/06

错误说明:列举以下错误的目的,是为了帮助大家少走弯路,碰到问题可以
          迅速找到答案,资料包括但不仅限于 Redhat AS3 平台。有些是
          直接引用其他网站内容,感谢内容提供者。另一些是我经过分析
          研究找出来的答案,如需转载请注明出处。

其他说明:文章提及的 pg,pk 等脚本,源码在安装完全攻略的脚本精选里。
          文章的 X 是指本机登陆 X 视窗,Xman 是指 Xmanager 远程登录。

#-------------------------------------------------------------------------

1) 中文环境下,安装时不能修改密码,这导致不断地告警,安装无法进行。
   中文环境下,oemapp console 在 X 和 Xman 不能输入密码,Vnc 可以。

经分析,是 chinput 引起的问题,在安装或运行Oracle 9i之前把相关进程
杀掉即可。很明显,无法输入最大嫌疑就是输入法。运行 pg chinput 就知
道了,因为 Redhat 9.0,Redhat AS3 都会自动加载中文输入法。遗憾的是,
Google 上没有任何资料提到这一点,导致不少人(包括我)走了弯路。

Vnc 因为某些字体库不支持,所以 chinput 运行又退出了,不信你可以自
己在 Vnc 里运行一下。至于 X 和 Xman,因为它们都支持相关的中文字库,
所以 chinput 接管了系统输入控制。问题在于Oracle 9i 与中文输入法的
兼容性很差,造成“用户/密码”无法输入。

杀掉 chinput 再安装 Oracle 9i,或者装好之后运行 oemapp console 都不
会出现无法输入“用户/密码”的情况。解决办法是 pk chinput。如果不杀
chinput,又想要中文安装、中文使用的话,只能通过 Vnc 安装和使用。我
的做法是把脚本写好并且可执行,然后在 .bashrc 里自动杀 chinput。

[oracle@rebeca oracle]$ chinput &        {在 Xmanager 的窗口里运行}
Chinput Version 3.0.2 -- XIM Server
Distributed under the terms of the GNU General Public License (GPL)
Following charsets:
0: -Sony-Fixed-Medium-R-Normal--16-120-100-100-C-80-ISO8859-1
1: -misc-zysong18030-medium-r-normal--0-0-0-0-c-0-gb2312.1980-0
Chinput ................................................[OK]

[oracle@rebeca oracle]$ pg chinput
UID        PID  PPID  C STIME TTY          TIME CMD
oracle    5158     1  0 13:15 pts/1    00:00:00 chinput
[oracle@rebeca oracle]$ pk chinput
# ps -ef | grep chinput | grep -v grep | awk '{ print $2 }' | xargs -i kill -9 {}

[oracle@rebeca oracle]$ chinput &        {在 VNC Viewer 窗口里运行}
Chinput Version 3.0.2 -- XIM Server
Distributed under the terms of the GNU General Public License (GPL)
Basic: Cannot open font -misc-zysong18030-medium-r-normal--0-0-0-0-c-0-gb2312.1980-0

#-------------------------------------------------------------------------

2) Oracle 装好之后,sqlplus 以及本机 oemapp console 可以访问,但是
WinXp 的 Client 和 Web 无法连接。

请检查 Linux 的防火墙设置,并修改 iptables 配置,开放 1521 和 7778。
可以参考这篇文章:Redhat AS3_U6 的 Oracle9i 安装完全攻略--中文显示。

#-------------------------------------------------------------------------

3) 在 Linux 本机或者 WinXp 客户端里,ORACLE_SID 和 ORACLE_NAME 不同
导致不能访问,难道两者必须一样?

注意:Oracle 装好之后,要搞清 Oracle 里 SID 和 NAME 的逻辑关系。通常
在 Client 端的 Net Config 里,写 ORACLE_NAME 和 IP,不是 ORACLE_SID。
在 oemapp console 里,可以用 tnsname 也就是 ORACLE_NAME 来访问,也可
以用 IP 加上 ORACLE_SID 来访问,其它写法会报错。例如:

ORACLE_SID=ora9i, ORACLE_NAME=turbo, IP=192.168.100.60。 那么,你在
配置 Net Config 时,填写 turbo 和 192.168.100.60,在 oemapp cosole
访问时,可以使用本地 tnsname 的 TURBO,或者写主机名(填IP或域名)以及
SID,然后网络服务名就会自动变成 ORA9I_192.168.100.60。

#-------------------------------------------------------------------------

4.1) 启动 Apache 时候报错,环境变量 PERL5LIB 问题。

按目前 Google 所找到资料去安装 Oracle 9i,一个必然发生的问题就是会
看到 httpd could not be started 错误,把 startJServ.sh 和 apachectl
的代码逐行在系统运行(设置变量要加 export 和空格),就会看到里面的
某些库找不到,经过研究,通过设置 PERL5LIB 可以解决这个问题。

为了保障系统和脚本的正常运行,在 .bash_profile 和 apachectl 都修改
了,大家可以利用 perl -V 这个命令来检查运行环境。同时,考虑到 perl
5.005 和 5.80 的兼容性,在 PATH 里把 Oracle 自带的 perl 放前面。

vi ~/.bash_profile
<-----
export PATH=$ORACLE_HOME/jdk/bin:$ORACLE_HOME/Apache/perl/bin:$PATH
export PERL5LIB=$ORACLE_HOME/Apache/perl/lib/5.00503:$ORACLE_HOME/Apache/perl/lib/site_perl/5.005/i686-linux
----->

vi $ORACLE_HOME/Apache/Apache/bin/apachectl
<-----
PERL5LIB=/uxdb/ora9i/product/9.2/Apache/perl/lib/5.00503:/uxdb/ora9i/product/9.2/Apache/perl/lib/site_perl/5.005/i686-linux; export PERL5LIB
----->

#-------------------------------------------------------------------------

4.2) 启动 Apache 时候报错,环境变量 DISPLAY 问题。

设置好 PERL5LIB 后,系统依然提示错误,查了一下资料,要设置 DISPLAY。

http://www.cublog.cn/u/15347/?u=http://www.cublog.cn/u/15347/showart.php?id=89853
xfly.t的一点个人体会 --> oracle 9.2.0.4安装问答

Q: http server start failed
   oracle# apachectl start  
OR
   oracle# ./startJServ.sh
   oracle apachectl start: httpd could not be started

A: goto ${ORACLE_HOME}/Apache/Apache/logs and look at the log files there to see
   the exact error message and cause of not starting. If error message is

[Tue Oct 22 23:09:38 2002] [crit] (2)No such file or directory: Apache JServ enc
ountered a fatal error; check your ApJServLogFile for details if none are presen
t in this file. Exiting.

   then

   1. Set DISPLAY environment variable. e.g. From command line execute command:
      $ export DISPLAY=IP address:0.0
   2. Start the HTTP Server. e.g. apachectl start.

#-------------------------------------------------------------------------

5) 使用 dbstart 启动数据库的时候,系统提示 TNS 服务名不正确导致失败。

[oracle@rebeca oracle]$ dbstart

SQL*Plus: Release 9.2.0.4.0 - Production on Sun Apr 2 22:41:05 2006

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

SQL> ERROR:
ORA-12162: TNS:service name is incorrectly specified

SQL> ORA-12162: TNS:service name is incorrectly specified
SQL>
Database "" warm started.

经检查,是因为我太早去修改 /etc/oratab 了。Oracle结束安装自动写内容
进去,导致变成下面这样,dbstart 脚本不能够识别 * 是哪个数据库的 SID。
cat /etc/oratab
<-----
*:/uxdb/ora9i/product/9.2:Y
ora9i:/uxdb/ora9i/product/9.2:N
----->

改成正确内容,再用 dbstart 能启动。通常装完Oracle再改就不会配置错了。
vi /etc/oratab
<-----
# *:/uxdb/ora9i/product/9.2:N
ora9i:/uxdb/ora9i/product/9.2:Y
----->

#-------------------------------------------------------------------------

6.1) dbstart 不能启动,通过修改 dbstart 增加 SPFILE 文件的处理来完成启动。

http://www.itpub.net/476591.html
我用dbstart启动时,提示can't find init file...?

msnch said: ----->

search了一下,说是bug, 按eygle大师的修改已OK

http://www.itpub.net/showthread.php?s=&threadid=222347
一个关于开机时能同时自动启动三个INSTANCE和监听程序的问题(很急)

eygle said: ----->

some bugs in dbstart when you using spfile in oracle9i
You can do the following step to solve it:

- edit the dbstart script
  - add the following line:
       SPFILE=${ORACLE_HOME}/dbs/spfile${ORACLE_SID}.ora
   after this line:
       PFILE=${ORACLE_HOME}/dbs/init${ORACLE_SID}.ora

      - change:
        if [ -f $PFILE ] ; then     
       to:
        if [ -f $PFILE -o -f $SPFILE ] ;

http://www.net130.com/CMS/Pub/oracle/oracle_tech/oracle_tech_course/202228.htm
Oracle 9i新特性研究四(延续性初始化参数文件)

http://searchdatabase.techtarget.com.cn/tips/481/2333481.shtml
案例学习:Oracle的还原

重新创建spfile
SQL>create spfile from pfile = '参数文件的位置';

#-------------------------------------------------------------------------

6.2) dbstart 不能启动,通过拷贝现成的 init$ORACLE_SID.ora 文件来完成启动。

http://oracle.chinaitlab.com/install/367463.html
RedHat AS 4.0最新安装Oracle9204手记

http://www.chinaunix.net/jh/19/591185.html
[保留] RedHat AS 4.0最新安装Oracle9204手记

四,开始安装oracle9iR2
(一)开始安装:
5, 数据库创建完成后,修改/etc/oratab,把boss那一行最后的N改成Y,然后执行
dbstart启动数据库数据库可能无法启动,报告Can‘t find init file …的错误,
需要复制一个初始化文件:
cp /u01/app/oracle/admin/oradb/pfile/init.ora.* /u01/app/oracle/product/9.2.0/dbs/initoradb.ora
重新执行dbstart就可以了。

http://www.chinaunix.net/jh/19/650937.html
[原创] 红旗高级服务器Linux 4.1 最新安装Oracle9204 改记!

红旗高级服务器Linux 4.1 最新安装Oracle9204 改记
参照(RedHat AS 4.0最新安装Oracle9204手记)内容,部分我改了改。

需要复制一个初始化文件:  
cp /u01/app/oracle/admin/oradb/pfile/init.ora.*  /u01/app/oracle/product/9.2.0/dbs/initoradb.ora
重新执行dbstart就可以了。

http://www.chinaunix.net/jh/19/365977.html
[原创] RedHatLinux AS3 U2 安装 oracle9204 成功 笔录

**************************************************
如果出现错误信息:
ORA-01078:failucr in processing system parameters
      LRM-00109:could not open parametet file/opt/ora9/product/9.2/dbs/initora9i.or
执行:
#cp  /opt/ora9/admin/orcl/pfile/init.ora.613200412101  /opt/ora9/product/9.2/dbs/initora9.ora
*****************************************************

http://www.net130.com/2004/9-16/231043.html
关于数据库名(db_name)、实例名(instance_name)、ORACLE_SID

在数据库安装之后,ORACLE_SID被用于定义数据库参数文件的名称。如:
$ORACLE_BASE/admin/DB_NAME/pfile/init$ORACLE_SID.ora。

http://www.chinaunix.net/jh/19/348162.html
[精华] 关于数据库名(db_name)、实例名(instance_name)、ORACLE_SID

#-------------------------------------------------------------------------

7) 说明:下面这个安装指南是我看过各种版本里比较好的,图文并茂,问题处理详细。

http://www.gbunix.com/htmldata/2004_08/2/5/article_643_1.html
在Redhat9上安装Oracle 9.2

运行了一会以后,出现了"ins_oemagent.mk"的错误提示,如下(图四)

这时我们可以暂时选择"ignore",安装完成以后再来解决这个问题.

接下来又会出现"ins_ctx.mk"的问题,如图五

现在编辑 $ORACLE_HOME/ctx/lib/env_ctx.mk文件,在 "INSO_LINK =" 行(第1365行)加入 "$(LDLIBFLAG)dl"

修改后如下:

INSO_LINK = -L$(CTXLIB) $(LDLIBFLAG)m $(LDLIBFLAG)dl $(LDLIBFLAG)
sc_ca $(LDLIBFLAG)sc_fa $(LDLIBFLAG)sc_ex $(LDLIBFLAG)sc_da
$(LDLIBFLAG)sc_ut $(LDLIBFLAG)sc_ch $(LDLIBFLAG)sc_fi
$(LLIBCTXHX) $(LDLIBFLAG)c -Wl,-rpath,$(CTXHOME)
lib $(CORELIBS) $(COMPEOBJS)

按"retry"键即可继续。

最后,还需要根据提示,用root用户执行一次 $ORACLE_HOME/root.sh,Oracle软件就初步安装完了。

安装完成以后的工作。

我们回头来解决上边的那个ins_oemagent.mk问题。以Oracle用户执行:

cd $ORACLE_HOME/network/lib
make -f ins_net_client.mk install
编辑$ORACLE_HOME/ctx/lib/ins_ctx.mk文件的第13-14行,由:
ctxhx: $(CTXHXOBJ)
$(LINK) $(CTXHXOBJ) $(INSO_LINK)
改为
ctxhx: $(CTXHXOBJ)
$(LINK) -ldl $(CTXHXOBJ) $(INSO_LINK)
然后执行
make -f $ORACLE_HOME/ctx/lib/ins_ctx.mk install

现在,Oracle 软件已经完全安装成功,你可以用dbca命令来建立数据库,或者执行其他DBA命令。

#-------------------------------------------------------------------------

8) 说明:其实是编译时链接库的问题,可以通过打补丁解决,不过手工修改也可以的。

http://www.chinalinuxpub.com/bbs/archive/index.php/t-27498.html
Oracle9i在Redhat9上安装报错,请帮助!

iinhf said: ----->

我又重新进行了安装,前面除了文档中的两错外,都没有报错。然后就开始执行如下的命令:
$ /opt/ora9/product/9.2/bin/agentctl start

DBSNMP for Linux: Version 9.2.0.1.0 - Production on 26-AUG-2003 10:54:13

Copyright (c) 2002 Oracle Corporation. All rights reserved.

Starting Oracle Intelligent Agent...
/opt/ora9/product/9.2/bin/dbsnmpwd:
line 153: 11747 Segmentation fault nohup $ORACLE_HOME/bin/dbsnmp $* >>$DBSNMP_WDLOGFILE 2>&1
/opt/ora9/product/9.2/bin/dbsnmpwd:
line 153: 11760 Segmentation fault nohup $ORACLE_HOME/bin/dbsnmp $* >>$DBSNMP_WDLOGFILE 2>&1

冷风 said: ----->

修改系统:
以oracle用户的身份登入,执行以下命令:
[oracle@miniroko oracle]$ cd $ORACLE_HOME/network/lib
[oracle@miniroko lib]$ make -f ins_net_client.mk install

然后编辑这个文件:
oracle@miniroko lib]$vi $ORACLE_HOME/ctx/lib/ins_ctx.mk找到第13行、第14行由ctxhx: $(CTXHXOBJ)
$(LINK) $(CTXHXOBJ) $(INSO_LINK)

改为:
ctxhx: $(CTXHXOBJ)
$(LINK) -ldl $(CTXHXOBJ) $(INSO_LINK)
存盘退出,执行以下命令:
[oracle@miniroko lib]$ make -f $ORACLE_HOME/ctx/lib/ins_ctx.mk install

现在可以重新启动agents了。
[oracle@miniroko lib]$ /opt/ora9/product/9.2/bin/agentctl start

#-------------------------------------------------------------------------

9) Oracle 9206 和 9207 的 installer 是 10g 风格的,乱码的解决方案同下。

http://www.pconline.com.cn/pcedu/empolder/db/oracle/0507/655871.html
Redhat RHEL AS3 下安装 Oracle DB 10g 中文乱码问题

  2. cd Disk1/stage/Components/oracle.swd.jre/1.4.2.0.0/1/DataFiles/
  unzip all_except_bin.jar (这时生成一个 jre 的目录)
  cd jre/1.4.2/lib/
  mv font.properties font.properties.bak
  cp font.properties.zh_CN.Redhat8.0 font.properties
  cd ../../../
  zip -r all_except_bin.jar.new jre/
  mv all_except_bin.jar.new all_except_bin.jar
  (其实就是把 font.properties 文件换掉. 这样安装时汉字显示就没有问题了)

#-------------------------------------------------------------------------

[ 本帖最后由 wwashington 于 2006-4-7 12:20 编辑 ]

论坛徽章:
0
2 [报告]
发表于 2006-04-07 12:52 |只看该作者
太棒了

论坛徽章:
0
3 [报告]
发表于 2006-04-07 13:14 |只看该作者
值得借鉴学学

论坛徽章:
0
4 [报告]
发表于 2008-01-14 16:06 |只看该作者

太好了,学习一下

顶!!!!!!!!!!!!!!!!!!!!!!!!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP