文逸首页 小文论坛 文逸博客 精华文章
 首页 | 新闻 | 论坛 | 博客 | 专题 | FTP | 金融 | 微博 | 图库 | MyHome | 搜索 | 登陆 | 注册 | 帮助 | 设为首页  ·在线人数: 1932

发表新帖 我的主页  用户登陆 返回上页 收藏本帖 文友爬行榜

标题:REDHAT9下安装Oracle9.2.0的成功方法
[作者] dsj [发表时间] 2003/5/21 14:49:53  [回复] 3  [点击] 2954

 [作者] dsj   [头衔] 论坛坛主  [经验] 220862  [等级] 大主帅   [发帖] 15642   [回帖] 1366  [登陆] 7956
[发表时间] 2003/5/21 14:49:53  [楼主]
标题: REDHAT9下安装Oracle9.2.0的成功方法
 
REDHAT9下安装Oracle9.2.0的成功方法! 
最近redhat推出了新版本9,但是oracle9i还没有在上面认证过,大家最近总在问一些关于这个安装方面的问题。昨天我安装了一下,感觉和以前的7.3下安装差不多,有点点小的区别,现把我的具体过程贴出来和大家共享之。 
1.先安装好Redhat9,我选的是英文,全部安装,这样要求硬盘空间比较大,要大约4.5G的空间。如果空间不够,可以自定义安装,development是一定要安装的。 
2.安装JDK1.3,可以去SUN的网站下载。 
$ chmod a+x j2sdk1_3_1_03-linux-i386-rpm.bin 
$ j2sdk1_3_1_03-linux-i386-rpm.bin 
##下面的指令是一个脚本,它先要问你是否同意,输入Y,然后它会自行安装 
$ rpm -ivh jdk-1.3.1_03.i386.rpm 
##jdk会安装在/usr/java下 
##为当前的JDK版本建立一个符号连接,这样做的目的是将来如果有新的版本安装到系统上,##可以将新的目录连接为/usr/local/java,这样就无需修改很多配置文件 
$ ln –s /usr/java/jdk1.3.1_03 /usr/local/java 
3.准备Oracle9i安装程序: 
从Oracle网站上下载9i后,你可以刻录在光碟上,也可以释放打包文件到硬盘上,为了免除安装过程中换碟的麻烦,如果硬盘够大(完全安装大约2.1G左右),建议采取后种方法。 
##解开压缩文件: 
$gunzip Linux9i_Disk1.cpio.gz Linux9i_Disk2.cpio.gz Linux9i_Disk3.cpio.gz 
##解开打包文件(你下载的文件文件名字可能和我的有少许不同): 
cpio -idmv < Linux9i_withjre_Disk1.cpio 
cpio -idmv < Linux9i_nojre_Disk2.cpio 
cpio -idmv < Linux9i_nojre_Disk3.cpio 
#解开后,会生成Disk1、Disk2、Disk3三个目录 
4.建立用户及用户组 
$ groupadd dba 
$ useradd -G dba 
$ passwd oracle //设置密码 
建立Oracle9i安装点 
$ mkdir /oracle 
chown –R oracle:dba /oracle 
chmod 755 /oracle 
5.设置环境变量 
umask 022 
TERM=xterm; export TERM 
TMPDIR=/tmp; export TMPDIR 
export ORACLE_SIDorcl//Oracle9i数据库 实例名 
export ORACLE_BASE=/oracle 
export ORACLE_HOME=/oracle/product/9.2.0 
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib 
export TNS_ADMIN=$ORACLE_HOME/network/admin 
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK 
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data 
export ORACLE_TERM=xterm 
PATH=$ORACLE_HOME/bin:/opt/bin:/bin 
PATH=$PATH:/usr/bin:/usr/local/bin:/usr/sbin:/usr/X11R6/bin:/usr/local/java/bin:. 
export PATH 
export JAVA_HOME=/usr/local/java 
CLASSPATH=$CLASSPATH:$ORACLE_HOME/jdbc/lib/classes12.zip 
CLASSPATH=$CLASSPATH:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib 
CLASSPATH=$CLASSPATH:network/jlib 
export CLASSPATH 
export LD_ASSUME_KERNEL=2.4.1 
6.安装glibc软件包 
如果不是完全安装(Full Install)的RedHat,则可能需要安装以下几个glibc包,如果版本高于下列软件包,建议降级到Oracle推荐的版本. 
##安装软件包,请按顺序 
$ rpm -ivh compat-glibc-6.2-2.1.3.2.i386.rpm 
$ rpm -ivh compat-egcs-6.2-1.1.2.14.i386.rpm 
$ rpm -ivh compat-libs-6.2-3.i386.rpm 
7.安装低版本binutils 
##”降级”服务器上的 binutil : 
rpm -Uvh --force --nodeps binutils-2.10.0.18-1.i386.rpm 
#安装完 Oracle 后,别忘了把 binutil 升级回去。 
8.设置kernel 
cd /proc/sys/kernel 
echo 4294967295 > shmmax 
9.开始安装 
xhost + 
$ ./runInstaller 
此时会要报错 
Initializing Java Virtual Machine from /tmp/OraInstall2002-12-16_02-09-29PM/jre/bin/java. Please wait... 
/tmp/OraInstall2002-12-16_02-09-29PM/jre/bin/i386/native_threads/java: error while loading shared libraries: libstdc++-libc6.1-1.so.2: cannot open shared object file: No such file or directory 
然后发现图形界面起不来,此时要把compat-libstdc++-7.3-2.96.110.i386.rpm打进去重新运行就可以了。 
rpm –ivh compat-libstdc++-7.3-2.96.110.i386.rpm 
如果安装过程中遇到 
“Error in invoking target install of makefile/oracle/product/9.2.0/ctx/lib/ins_ctx.mk.” 
的错误提示,解决方法如下: 
$ cd /oracle/product/9.2.0/ctx/lib 
$ vi env_ctx.mk 
INSO_LINK = -L$(CTXLIB) $(LDLIBFLAG)m $(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)$(LINKLDLIBS) 
##回到安装窗口,”retry” 即可! 
以前大家常常在安装的过程中碰到在初始化java运行环境的时候就停住了的情况,这是由于核心太高的问题,老版本的JDK不支持新的核心,在.profile文件中降低了就可以了。 
顺利安装完成然后建库成功。 


在redhat7.3以后的版本都可以用这个方法安装oracle9i,但是别的linux上我只用过suse,有些小的差别,我希望大家能够把自己在linux上安装的经验共享之,我这里算是先抛块砖吧。



分享到:

我的QQ群:500人财富群11470502;投资群5920530;资源群6648659;交友群5713862;娱乐群6925950。
我的博客:http://104508155.qzone.qq.com/

 [作者]dsj [头衔]论坛坛主 [经验]220862 [等级]大主帅  [发帖]15642  [回帖]1366 [登陆]7956
[发表时间]2003/5/24 12:30:38 [1楼]
更具体的:
http://codah.net/install-oracle9iR2-on-redhat9.html

1. touch /etc/rac_on 
可以修复dbca不能创建数据库的问题 
2.关于"Error in invoking target install of makefile /opt/oracle/product/9.2.0/ctx/lib/ins_ctx.mk" 的错误用下面的方法更佳 

Edit $ORACLE_HOME/ctx/lib/env_ctx.mk and go to "INSO_LINK =", add a "$(LDLIBFLAG)dl" to the line and save it. 

Here is the full line with the added "$(LDLIBFLAG)dl" flag: 
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) 
 


我的QQ群:500人财富群11470502;投资群5920530;资源群6648659;交友群5713862;娱乐群6925950。
我的博客:http://104508155.qzone.qq.com/
dsj 2003/5/24 12:31:23

 [作者]dsj [头衔]论坛坛主 [经验]220862 [等级]大主帅  [发帖]15642  [回帖]1366 [登陆]7956
[发表时间]2003/5/24 12:34:01 [2楼]
Installing Oracle 9i R2 (9.2.0.1.0) on Red Hat 9
This is the installation HOWTO for Oracle 9.2 on RedHat Linux 9. Please remember that Oracle 9.2 is not certified for RedHat 9 and this combination should not be endorsed in production environments. For a full list of Oracle certified environments, check out the Oracle certification matrix. 

1. Creating users and groups:
-------------------------
Become root and execute the following commands


[roko@miniroko] su -

[root@miniroko]# groupadd oinstall
[root@miniroko]# groupadd dba
[root@miniroko]# useradd -g oinstall -G dba oracle
[root@miniroko]# passwd oracle

2. Creating directories.
--------------------------
Oracle recommends OFA - Optimal Flexible Architecture directory structure, but we will install everything under /opt/ora9:


[root@miniroko]# mkdir -p /opt/ora9/product/9.2
[root@miniroko]# mkdir /var/opt/oracle
[root@miniroko]# chown oracle.dba /var/opt/oracle
[root@miniroko]# chown -R oracle.dba /opt/ora9

3. Preinstallation (system configuration):
---------------------------


3.1 Install these compatibility libraries: 


compat-gcc-7.3-2.96.118.i386.rpm
compat-libgcj-7.3-2.96.118.i386.rpm
compat-libgcj-devel-7.3-2.96.118.i386.rpm
nss_db-compat-2.2-20.i386.rpm


I found them all using Synaptic, a graphical tool for updating your RH system. To install synaptic, first download Apt binary RPM package for RH9 from http://apt.freshrpms.net/ ;and then do (as root):

[root@miniroko]# rpm -Uvh apt-0.5.5cnc5-fr2.i386.rpm
[root@miniroko]# apt-get update
[root@miniroko]# apt-get install synaptic

3.2 Set kernel params to be correct at startup: 

Append these lines to /etc/sysctl.conf 
You might want to change these values if you have more RAM:


kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.shmall = 2097152
kernel.sem = 250 32000 128 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000

Append these lines into /etc/security/limits.conf 


oracle soft nofile 65536
oracle hard nofile 65536
oracle soft nproc 16384
oracle hard nproc 16384

REBOOT the system so the kernel changes can take effect, or if rebooting is not an option, you can change the kernel params at runtime by issuing:


[root@miniroko]# echo 250 32000 100 128 > /proc/sys/kernel/sem
[root@miniroko]# echo 536870912 > /proc/sys/kernel/shmmax
[root@miniroko]# echo 4096 > /proc/sys/kernel/shmmni
[root@miniroko]# echo 2097152 > /proc/sys/kernel/shmall
[root@miniroko]# echo 65536 > /proc/sys/fs/file-max
[root@miniroko]# echo 1024 65000 > /proc/sys/net/ipv4/ip_local_port_range

4. Preinstallation (oracle environment):
----------------------------
Login as oracle user:


su - oracle

Put the following lines in ~/.bashrc:

#oracle 9i
export ORACLE_BASE=/opt/ora9
export ORACLE_HOME=/opt/ora9/product/9.2
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/Apache/Apache/bin:$PATH
export ORACLE_OWNER=oracle
export ORACLE_SID=ora9i
export ORACLE_TERM=vt100
export LD_ASSUME_KERNEL=2.4.1
export THREADS_FLAG=native
export LD_LIBRARY_PATH=/opt/ora9/product/9.2/lib:$LD_LIBRARY_PATH
export PATH=/opt/ora9/product/9.2/bin:$PATH
#
# change this NLS settings to suit your country:
# example:
# german_germany.we8iso8859p15, american_america.we8iso8859p2 etc.
#
export NLS_LANG='croatian_croatia.ee8iso8859p2'


If you want other national settings (these are croatian), consult the supported settings here, and change the NLS_LANG variable accordingly. 

5. Installation:
------------------------

Login as root and allow user oracle to write to X display:


su -
xhost +

Login to oracle user:


su - oracle

Start the installation. Do not switch to your CD-ROM mount directory because you will not be able to unmount the 1st Cd to insert others when asked. 

/mnt/cdrom/install/linux/runInstaller

During the installation, Oracle will ask you to insert other disks. Open up a new console, unmount the current disk with umount /dev/cdrom (as root), replace the disk. If Redhat9 does not mount it automagically, mount it yourself with mount /dev/cdrom 
Your installation will produce two errors.


First, you will see an error dialog informing about problems with ins_oemagent.mk. Choose ignore on this one, we will fix it in postinstallation.

Second dialog will inform you about an "Error in invoking target install of makefile $ORACLE_HOME/ctx/lib/ins_ctx.mk".
When that happens, open up a new console and login as oracle user. Execute the following commands:

[oracle@miniroko oracle]$ cd $ORACLE_HOME/install
[oracle@miniroko install]$ tail make.log

You will see a line such as this: 
gcc -o ctxhx -L/opt/ora9/product/9.2/ctx/lib/ -L/opt/ora9/product/9.2/lib/
-L/opt/ora9/product/9.2/lib/stubs/  /opt/ora9/product/9.2/ctx/lib/ctxhx.o
-L/opt/ora9/product/9.2/ctx/lib/ -lm -lsc_ca -lsc_fa -lsc_ex -lsc_da -lsc_ut
-lsc_ch -lsc_fi -lctxhx -lc -Wl,-rpath,/opt/ora9/product/9.2/ctx/lib -lnls9
-lcore9 -lnls9 -lcore9 -lnls9 -lxml9 -lcore9 -lunls9 -lnls9

Copy this line, add -ldl at the end and run it in $ORACLE_HOME/bin 
[oracle@miniroko]$ cd $ORACLE_HOME/bin
[oracle@miniroko bin]$ gcc -o ctxhx -L/opt/ora9/product/9.2/ctx/lib/ 
-L/opt/ora9/product/9.2/lib/ -L/opt/ora9/product/9.2/lib/stubs/  
/opt/ora9/product/9.2/ctx/lib/ctxhx.o -L/opt/ora9/product/9.2/ctx/lib/ 
-lm -lsc_ca -lsc_fa -lsc_ex -lsc_da -lsc_ut -lsc_ch -lsc_fi -lctxhx -lc 
-Wl,-rpath,/opt/ora9/product/9.2/ctx/lib -lnls9 -lcore9 -lnls9 -lcore9 
-lnls9 -lxml9 -lcore9 -lunls9 -lnls9 -ldl

Now hit the ignore button on the dialog and the installation will continue.
At the end Oracle installation will probably inform you that agents failed to start. Choose ignore on this one, we will fix it later 

6. Postinstall
---------------------------
Open up a console and login as oracle user. Execute these lines:


[oracle@miniroko oracle]$ cd $ORACLE_HOME/network/lib
[oracle@miniroko lib]$ make -f ins_net_client.mk install

Then edit the $ORACLE_HOME/ctx/lib/ins_ctx.mk file so that lines 13-14 change from: 
ctxhx: $(CTXHXOBJ)
$(LINK) $(CTXHXOBJ) $(INSO_LINK)

to 
ctxhx: $(CTXHXOBJ)
$(LINK) -ldl $(CTXHXOBJ) $(INSO_LINK)

Then do a 
[oracle@miniroko lib]$ make -f $ORACLE_HOME/ctx/lib/ins_ctx.mk install

Now you should be able to start your agents with 
[oracle@miniroko lib]$  /opt/ora9/product/9.2/bin/agentctl start

7. Starting the database
------------------------------
The easiest way is to create a startup/shutdown script as such
-- 
#!/bin/bash
#
# (c) denis.klaric@in2.hr
#
# name: /etc/rc.d/init.d/ora9
# description:  starts and stops oracle 9i database, TNS listener
#               http server, and fixes kernel parameters for oracle


#oracle environment
export ORACLE_HOME=/opt/ora9/product/9.2
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/Apache/Apache/bin:$PATH
export NLS_LANG='croatian_croatia.ee8iso8859p2'
export ORACLE_SID=tis

export DISPLAY=:0
oracle_user=oracle
                                                                                                                                          
# see how we're called
                                                                                                                                          
case $1 in
  start)
  # fix kernel parameters
  echo 250 32000 100 128 > /proc/sys/kernel/sem
  echo 536870912 > /proc/sys/kernel/shmmax
  echo 4096 > /proc/sys/kernel/shmmni
  echo 2097152 > /proc/sys/kernel/shmall
  echo 65536 > /proc/sys/kernel/fs/file-max
  echo 1024 65000 > /proc/sys/net/ipv4/ip_local_port_range

  # start listener, apache and database
  su - "$oracle_user"<<EOO
    lsnrctl start
    apachectl start
    sqlplus /nolog<<EOS
      connect / as sysdba
      startup
EOS
EOO
 ;;
                                                                                                                                          
 stop)
  # stop listener, apache and database
  su - "$oracle_user"<<EOO
    lsnrctl stop
    apachectl stop
    sqlplus /nolog<<EOS
      connect / as sysdba
      shutdown immediate
EOS
EOO
  ;;
                                                                                                                                          
  *)
  echo "Usage: ora9 [start|stop]"
  ;;
                                                                                                                                          
esac

-- 
Just make sure you change the ORACLE_SID to your SID.
You can copy that script to your /etc/rc.d/init.d directory or link it from your runlevel startup directory (e.g. /etc/rc.d/rc5.d) to make sure Oracle is started upon booting the machine, and stopped before shutting down. 
Alternativly you can start and stop it directly with /etc/rc.d/init.d/ora9 start|stop


That's it, good luck 



--
Roko Roic
roko@codah.net
http://codah.net ;
 


我的QQ群:500人财富群11470502;投资群5920530;资源群6648659;交友群5713862;娱乐群6925950。
我的博客:http://104508155.qzone.qq.com/

2 条回复; 10 条/页;  1 / 1     第    ↑到页首
您未登陆,发帖前请填写:用户名  密码   注册新用户  
 回复: REDHAT9下安装Oracle9.2.0的成功方法
排版
粗体斜体下划线居中飞翔文字移动文字发光文字阴影文字插入超级链接插入网页插入下载地址插入Email地址插入图片插入Flash插入RealPlay文件插入Media文件插入QuickTime影片插入背景音乐插入代码插入引用
插入表情:表情符号   使用帮助
内容 (8000字以内)
 
  关闭窗口  
[论坛列表]

小文诊所 创业经验
金融创新 家庭理财
居家旅行 国内资源
职业生活 配置应用
饮食文化 实盘记录
温情一刻 国外资源
法律频道 红旗社区
妇幼天地 商标标准
站务处理 蓝总看盘
奖励认证 开源软件
故障咨询 求助中心
公益活动 手机软件
网络经济 文史研究
期货专版 代理试用
网页制作 人才交流
分类广告 房产观澜
体育资讯 雅瑟风流
初学园地 美术贴图
股海风云 听风茶轩
管理学院

[今日热帖]

关于文逸 | 小文论坛 | 文逸博客 | 文逸金融 | 精华文章网站地图 | 联系我们 | 隐私保护
 Copyright© WWW.WONYEN.NET 2003 - 2021  闽ICP备09016518号-16   本站最高 10508 人同时在线,发生时间 2005-5-17 5:09:15 
 文逸科技 制作维护