<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[沧海一粟]]></title> 
<link>http://www.dzhope.com/index.php</link> 
<description><![CDATA[Web系统架构与服务器运维,php开发]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[沧海一粟]]></copyright>
<item>
<link>http://www.dzhope.com/post//</link>
<title><![CDATA[在redhat Linux9下安装Oracle9.2.0的一点经验]]></title> 
<author>jed &lt;jed521@163.com&gt;</author>
<category><![CDATA[服务器技术]]></category>
<pubDate>Mon, 04 Sep 2006 23:54:31 +0000</pubDate> 
<guid>http://www.dzhope.com/post//</guid> 
<description>
<![CDATA[ 
	一直是在redhat Linux7.1环境下使用Oracle817的，前几天整理系统，干脆整体升级，要在redhat Linux9环境下安装Oracle9i。花了几天的时间，在网上查找了很多资料和若干帖子，归纳整理了一下，然后动手终于在redhat9上成功的安装了Oracle9.2.0（Oracle9i Enterprise Edition Release 9.2.0.1.0）。现在把安装过程记录一下，以备日后参考。<br/><br/><br/>一、基本情况介绍：<br/> &nbsp; 我的机器配置情况：<br/> &nbsp; &nbsp; &nbsp;CPU：P4 1.5G<br/> &nbsp; &nbsp; &nbsp;内存：256M<br/> &nbsp; &nbsp; &nbsp;硬盘：40GB<br/><br/> &nbsp; 硬盘分区情况：<br/> &nbsp; &nbsp; &nbsp;Windows分区C、D、E，共有25GB。<br/> &nbsp; &nbsp; &nbsp;Linux Swap：1.5GB<br/> &nbsp; &nbsp; &nbsp;Linux Ext2：12GB <br/><br/> &nbsp; 操作系统：radhat9（Linux Kernel 2.4.20-8）<br/><br/><br/> &nbsp; 在网上看到的介绍Oracle如何安装的文章说，Oracle对Linux的Swap分区的要求至少要有内存的2倍，即512M大小，当然越大越好。最初在Linux7.1下使用Oracle817的时候，我的Swap分区大小一直是512M，在这次安装Oracle9i的过程中发现，当到了创建数据库阶段的时候，提示“out of &nbsp;momery”的错误，安装过程被迫停止，估计是Swap有点小了，没有办法，又重新划分了磁盘空间，把Swap分区一下子增大到1.5GB，再次安装，果然安全的、顺利的、无误的通过。 ^_^ <br/><br/> &nbsp; Linux的文件分区最少需要7G。因为在Linux下安装Oracle的条件需求比较苛刻，所以在安装redhat Linux9的时候我选择是全部安装，这样在后面的Oracle9i安装中系统就不需要再安装这个包那个包了，省了很多的麻烦了，这个方法还是在redhat Linux7.1下安装Oracle817的时候学会的（在网上看到的文章中也有推荐说全部安装的）。redhat Linux9的全部安装大约需要4.5G的空间，而Oracle9i数据库大概需要2GB的空间（何致億在他的文章中说数据库系统需要2 ~ 2.5 GB的空间），所以一共下来差不多要7GB。<br/><br/> &nbsp; 以上数据仅供参考，一句话，给Linux的分区空间越大越好，对Oracle的操作越有利。 ^_^<br/><br/><br/><br/>二、准备工作：<br/> &nbsp; <br/> &nbsp; 1.Oracle 9i的获取<br/> &nbsp; &nbsp; Oracle920_for_Linux是我在 <a href="ftp://ftp.lib.tsinghua.edu.cn/" target="_blank">ftp://ftp.lib.tsinghua.edu.cn/</a> 这个站点上（清华的ftp服务器），花了一个晚上的时间来下载的，一共是3个压缩文件，名字分别为：<br/> &nbsp; &nbsp; <br/> &nbsp; &nbsp; lnx_920_disk1.cpio.gz &nbsp; 大小为527 MB (553,607,967 字节)<br/> &nbsp; &nbsp; lnx_920_disk2.cpio.gz &nbsp; 大小为561 MB (588,799,187 字节)<br/> &nbsp; &nbsp; lnx_920_disk3.cpio.gz &nbsp; 大小为421 MB (442,089,854 字节)<br/> &nbsp; <br/> &nbsp; 3个文件共有1.47 GB (1,584,497,008 字节)。<br/><br/><br/> &nbsp;2.备注信息<br/> &nbsp; &nbsp;看到网上的文章介绍，一般说是为考虑兼容性的问题，在安装前都需要对redhat系统进行安装或替换一些rpm包，还要确定rpm包的依赖关系，<br/><br/> &nbsp; &nbsp;如：<br/> &nbsp; &nbsp; &nbsp;glibc-2.3.2-5.i686.rpm <br/> &nbsp; &nbsp; &nbsp;glibc-common-2.3.2-5.i386.rpm <br/> &nbsp; &nbsp; &nbsp;glibc-devel-2.3.2-5.i386.rpm<br/> &nbsp; &nbsp;等。<br/><br/> &nbsp; &nbsp;我认为前面只要是选择了redhat Linux9的全部安装，不要再安装或替换这些rpm包了（这个没有深入的研究，不知道说的对不对，但至少是我在自己的机子上没有再安装替换这些rpm包。还有的文章说网上提供免费下载的Red Hat9是一个不完全的版本，它本身并不带有相应版本的glibc安装包，需要对glibc进行安装替换，也许是我下载的redhat Linux9是“完全的”，所以我也没有对glibc进行过任何操作。*_^ &nbsp;当然在redhat Linux7X下进行安装的时候要另当别论）。<br/><br/> &nbsp; &nbsp;另外，一些文章中介绍安装Oracle9i的时候需要选择JDK的版本进行安装，我也没有进行这方面的工作，是直接安装Oracle9i的（因为Oracle的安装程序是要有JDK支持的，估计redhat Linux9选择的是“全部安装”方式，development已经安装了。可能关于这一点，让曾经在redhat7x下安装过Oracle8i的朋友有点不解 *_* ）。<br/><br/><br/><br/>三、配置操作：<br/><br/> &nbsp; &nbsp;既然省却了前面那么一大堆烦人的预安装操作，那么下面就来进行一些实质的操作，从这里起，算是正式进入了Oracle9i的安装过程。<br/><br/> &nbsp; &nbsp;1.设置内核参数，调节信号灯及共享内存：<br/> &nbsp; &nbsp; &nbsp;Oracle9i使用Linux的共享内存、交换区等资源进行工作，如果系统的的内核参数设置不能满足Oracle的需求，那么在安装或使用过程就会出现各种问题，因此建议配置或修改这些系统内核的参数。<br/><br/> &nbsp; &nbsp;打开/etc/sysctl.conf 文件，将下列数据写入到sysctl.conf的末尾并保存：<br/><br/> &nbsp; &nbsp; kernel.shmmax = 536870912 &nbsp; &nbsp; &nbsp; &nbsp;<br/> &nbsp; &nbsp; kernel.shmmni = 4096 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br/> &nbsp; &nbsp; kernel.shmall = 2097152<br/> &nbsp; &nbsp; kernel.sem = 250 32000 100 128<br/> &nbsp; &nbsp; fs.file-max = 65536<br/> &nbsp; &nbsp; net.ipv4.ip_local_port_range = 1024 65000<br/><br/> &nbsp; &nbsp;其中，kernel.shmmax是共享内存段最大尺寸，kernel.shmmni是共享内存段最小尺寸。进入目录/proc/sys/kernel，可分别用命令：<br/> &nbsp; &nbsp;#cat shmmax<br/> &nbsp; &nbsp;#cat shmmni<br/> &nbsp; &nbsp;#cat shmall <br/> <br/> &nbsp; 查看 kernel.shmmax 、kernel.shmmni、kernel.shmall的数值。<br/><br/> &nbsp;我在一篇文章看到kernel.shmmax的计算方法为：<br/> &nbsp; &nbsp; &nbsp;kernel.shmmax = 1024*1024*RAM(M)/2 (至少)。<br/><br/> &nbsp; 用命令：<br/> &nbsp; &nbsp; &nbsp;#cat sem<br/> &nbsp;<br/> &nbsp; 可以查看kernel.sem的数值。其中, 250 是参数SEMMSL的值,32000是参数SEMMNS的值, 100是参数SEMOPM的值，而128则是参数SEMMNI的值。<br/><br/><br/> &nbsp; 接下来，打开/etc/security/limits.conf文件，将下列数据添加到 limits.conf的末尾并保存：<br/> &nbsp; &nbsp;oracle soft nofile 65536<br/> &nbsp; &nbsp;oracle hard nofile 65536<br/> &nbsp; &nbsp;oracle soft nproc 16384<br/> &nbsp; &nbsp;oracle hard nproc 16384<br/><br/> &nbsp; 这是设置Oracle对文件的要求。<br/><br/> &nbsp; 当对/etc/sysctl.conf 文件和/etc/security/limits.conf文件修改并保存完毕后，请重新启动（reboot）redhat Linux9系统，这样设置的这些参数才能生效。<br/><br/> &nbsp; 如果此时进入到/proc/sys/kernel路径，用上述的命令再次查看，就会看到设置的参数已经生效。<br/><br/><br/> &nbsp; 2.创建Oracle用户帐号和安装目录<br/> &nbsp; &nbsp; 如有以前安装过Oracle 8i for Linux的经验，应该知道在安装Oracle之前须先在Linux操作系统下新增一个名为oracle的用户，以及一个oracle DBA所专用的群组。Oracle在安装和使用中需要用特定用户（非root用户），按照Oracle的标准说明是需要添加三个专门用户和用户组。为了简单方便安装，我们建立两个组，一个负责安装，另一个负责管理，并把Oracle的安装和使用归到一个特定用户来完成。<br/><br/> &nbsp; &nbsp; 以root用户登录，进行如下操作，建立两个组（dba组与oinstall组）和一个Oracle用户，操作命令如下：<br/> &nbsp; &nbsp; &nbsp;#groupadd dba <br/> &nbsp; &nbsp; &nbsp;#groupadd oinstall <br/> &nbsp; &nbsp; &nbsp;#useradd –g oinstall –G dba oracle <br/> &nbsp; &nbsp; &nbsp;#passwd oracle <br/> &nbsp; &nbsp; &nbsp;设置oracle的密码。<br/> &nbsp; &nbsp;<br/> &nbsp; &nbsp;Oracle安装的位置应遵守OFA( Optimal Flexible Architecture )规范。Oracle9i的典型安装需要至少两个安装点：一个安装基本的运行程序，一个为存放数据库，并要确保oracle用户对这两个目录具有可写的权限。<br/><br/> &nbsp; &nbsp;运行下面的命令，创建Oracle的安装点(mount point)：<br/> &nbsp; &nbsp; <br/> &nbsp; &nbsp; #mkdir /opt/oracle9i <br/> &nbsp; &nbsp; #mkdir /opt/oracle9i/product <br/> &nbsp; &nbsp; #mkdir /opt/oracle9i/product/9.2.0 <br/> &nbsp; &nbsp; #chown –R oracle.oinstall /opt/oracle9i <br/> &nbsp; &nbsp; #mkdir /var/opt/oracle9i <br/> &nbsp; &nbsp; #chown oracle.dba /var/opt/oracle9i <br/> &nbsp; &nbsp; #chmod 755 /var/opt/oracle9i<br/><br/> &nbsp; 3.设置环境变量<br/> &nbsp; &nbsp; 以oracle用户身份登录，打开编辑/home/oracle/.bash_profile文件，在文件末尾添加如下数据行并保存：<br/> &nbsp; &nbsp; export LD_ASSUME_KERNEL=2.4.1 &nbsp;<br/> &nbsp; &nbsp; export ORACLE_BASE=/opt/oracle9i <br/> &nbsp; &nbsp; export ORACLE_HOME=/opt/oracle9i/product/9.2.0 <br/> &nbsp; &nbsp; export ORACLE_SID= ORCL （数据库SID，可以修改，建议字母要大写）<br/> &nbsp; &nbsp; export ORACLE_TERM=xterm <br/> &nbsp; &nbsp; export TNS_ADMIN=$ORACLE_HOME/network/admin <br/> &nbsp; &nbsp; export LANG=en_US<br/> &nbsp; &nbsp; export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data <br/> &nbsp; &nbsp; LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib <br/> &nbsp; &nbsp; LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib <br/> &nbsp; &nbsp; export LD_LIBRARY_PATH <br/> &nbsp; &nbsp; export PATH=$PATH:$ORACLE_HOME/bin <br/><br/> &nbsp; &nbsp; CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib <br/> &nbsp; &nbsp; CLASSPATH=$CLASSPATH:$ORACLE_HOME/network/jlib <br/> &nbsp; &nbsp; export CLASSPATH <br/> &nbsp; &nbsp; #export DISPLAY=hostIP:0.0 &nbsp;<br/><br/> &nbsp; &nbsp; 这样oracle用户每次登录时都带有这些环境变量。<br/><br/> &nbsp; &nbsp; 其中：ORACLE_HOME为系统软件的安装目录，ORACLE_SID 为数据库的SID，这里可以自行设置。<br/> &nbsp; &nbsp; 最后一句“export DISPLAY=hostIP:0.0”，在网上一些介绍安装Oracle的文章中提到过，我曾尝试加上它，但是以oracle身份登录的时候，会出现hostIP的错误提示，并且无法正常登录,我查了一些资料也没有解决（我对Linux知之有限，如果您知道原因所在请您告诉我：jrq@educast.com.cn，谢谢），所以在环境变量中将其注释掉了，所幸的是这并不影响Oracle9i的安装。<br/><br/> &nbsp; &nbsp;友情提示^_^：此处的环境变量的配置工作尤其重要。很多在Linux下安装Oracle失败的原因都是因为环境变量没有配置正确，环境变量的配置直接影响到下面Oracle9i的安装和配置。所以提醒您在设置环境变量的时候多留神。<br/><br/> &nbsp; &nbsp;编辑并保存/home/oracle/.bash_profile文件后，建议先注销退出oracle用户，然后再以oracle用户身份重新登录，这样可以测试一下配置的环境变量是否出错（例如在上面提到的hostIP的错误）。<br/><br/> &nbsp; &nbsp;接下来就可以进行Oracle9.2.0 for Linux 的安装工作了。<br/> &nbsp; <br/> <br/>四、安装过程： <br/><br/> &nbsp; 1.对安装文件进行解压<br/> &nbsp; &nbsp; 以root用户登录，新建目录/setup,将Oracle920_for_Linux 3个压缩文件：<br/> &nbsp; &nbsp; &nbsp; &nbsp; <br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;lnx_920_disk1.cpio.gz &nbsp; &nbsp;大小为527 MB (553,607,967 字节)<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;lnx_920_disk2.cpio.gz &nbsp; &nbsp;大小为561 MB (588,799,187 字节)<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;lnx_920_disk3.cpio.gz &nbsp; &nbsp;大小为421 MB (442,089,854 字节)<br/><br/> &nbsp; &nbsp; 复制到目录/setup中。（如果您没有建立/setup目录，请您最好建立一个 &_&）<br/><br/> &nbsp; &nbsp; 进入到/setup目录，对这3个文件进行解压缩，操作命令如下：<br/> &nbsp; &nbsp; &nbsp; &nbsp;#cd /setup<br/> &nbsp; &nbsp; &nbsp; &nbsp;#gunzip lnx_920_disk1.cpio.gz<br/> &nbsp; &nbsp; &nbsp; &nbsp;#gunzip lnx_920_disk1.cpio.gz<br/> &nbsp; &nbsp; &nbsp; &nbsp;#gunzip lnx_920_disk1.cpio.gz<br/><br/> &nbsp; &nbsp;等解压完成后便生成3个如下名字的文件：<br/> &nbsp; &nbsp; &nbsp; <br/> &nbsp; &nbsp; &nbsp; &nbsp;lnx_920_disk1.cpio<br/> &nbsp; &nbsp; &nbsp; &nbsp;lnx_920_disk1.cpio<br/> &nbsp; &nbsp; &nbsp; &nbsp;lnx_920_disk1.cpio<br/><br/> &nbsp; &nbsp;然后再解开cpio文件包，执行如下操作命令<br/> &nbsp; &nbsp; &nbsp; <br/> &nbsp; &nbsp; &nbsp; &nbsp;#cpio -idmv < lnx_920_disk1.cpio<br/> &nbsp; &nbsp; &nbsp; &nbsp;#cpio -idmv < lnx_920_disk2.cpio<br/> &nbsp; &nbsp; &nbsp; &nbsp;#cpio -idmv < lnx_920_disk3.cpio &nbsp;<br/><br/> &nbsp; &nbsp;等三个文件包全部解压完毕后,生成3个安装文件夹，名称分别为Disk1、Disk2、Disk3。然后注销退出root用户，以oracle用户登录进行安装。<br/><br/><br/> &nbsp; 2.安装过程<br/> &nbsp; &nbsp;<br/> &nbsp; &nbsp; &nbsp;以oracle用户登录，进行安装。进入到/setup/Disk1目录，执行如下命令：<br/> &nbsp; &nbsp;<br/> &nbsp; &nbsp; &nbsp; #cd /setup/Disk1<br/> &nbsp; &nbsp; &nbsp; #./runInstaller<br/><br/> &nbsp; &nbsp; 运行等一会后，就会出现Oracle Universal Installer（OUI）的图形界面，按照提示一步步点击“Next”安装即可。<br/><br/> &nbsp; &nbsp;可惜，安装的时候我没有把安装过程的界面截取成图片保存下来，也懒的再重新安装了，所以无法用图片做进一步的描述。下面就用文字做一些描述和说明，如有什么表达不清楚的地方，还请谅解。:(<br/><br/> &nbsp; &nbsp;前几步保持默认设置，当遇到输入“Unix Group Name”的时候，输入组名“dba”,点击“下一步”。<br/><br/> &nbsp; &nbsp;此时Oracle Universal Installer会生成一个建立Oracle Inventory所用的orainstRoot.sh文件，弹出一个提示框，需要用root身份来执行这个/orainstRoot.sh文件，此时可以再开启一个新的终端窗口（Terminal），按照提示窗口所写的目录路径来以root用户来执行orainstRoot.sh。等执行完毕后再回到提示窗口，按下“Continue”按钮继续安装。<br/> &nbsp;<br/> &nbsp; &nbsp;当遇到要输入“全局数据库名（Global Database Name）和数据库SID”的窗口时，会发现数据库的SID已经按照环境变量中的设置的ORACLE_SID=YOUR_SID显示出来了。只需要把全局数据库名输入即可。<br/><br/> &nbsp; &nbsp;接下来的安装均按照默认设置来进行。<br/><br/> &nbsp; &nbsp;当遇到设置数据库的字符集的窗体时，不要选择默认的数据库字符类型。字符集(Character Set)是建立Oracle数据库时最重要的一项设定，如果设定的不正确，很可能造成在使用中无法正常存取中文数据。在这里我们最好选择第三个选项的下拉框，选择Simplifiled Chinese ZHS16GBK，按Next进入下一步。<br/><br/> &nbsp; &nbsp;在Oracle Universal Installer开始复制安装文件之前，会显示要安装的Oracle9i产品摘要，在确认无误后按下“Install”按钮就会开始安装了，这将是一个较长时间的过程，当然了，这和你机器的配置、运算速度和内存空间大小等都有关系。<br/><br/> &nbsp; &nbsp;因为我的安装程序是在硬盘上的，所以没有象从光盘安装时候的那些麻烦（具体的从光盘安装的操作，请在网络查阅相关资料吧。^_^ 其实我也没有从光盘安装的经验 ^_^ ）。<br/><br/> &nbsp; &nbsp;在接下来的安装过程中会出现2个错误，我所看到的网上的文章中也都说到了，我在这里也描述一下：<br/> &nbsp; &nbsp;<br/> &nbsp; &nbsp;第一个错误是Linking阶段的，当安装进度到69%的时候出现的，Oracle Universal Installer提示关于这个文件“/soft/oracle/network/lib/ins_oemagent.mk”有问题，这时我们可以暂时不要去管它，选择“ignore”，将其忽略，等整个安装过程完成以后，再来解决这个问题。（我看了很多资料上都是这么干的，于是乎，我也这么干。唉，真搞不明白 :( &nbsp;在RH7下安装Oracle8i的时候也是会出现很多个错误提示的。）<br/><br/> &nbsp; &nbsp;第二错误也是Linking阶段，当安装进度到84%的时候出现的，Oracle Universal Installer提示“Error in invoking target install of makefile $ORACLE_HOME/ctx/lib/ins_ctx.mk”出现错误。<br/> &nbsp; &nbsp;这个时候就不要选择忽略了，可以修复这个错误，打开$ORACLE_HOME/ctx/lib/env_ctx.mk文件进行如下编辑，将光标定位到第1365行，也就是“INSO_LINK =”这一行，然后把“$(LDLIBFLAG)dl”这句加入到“INSO_LINK=-L$(CTXLIB)$ (LDLIBFLAG)m”的后面，修改后成为这个样子：<br/><br/>　INSO_LINK = -L$(CTXLIB) $(LDLIBFLAG)m $(LDLIBFLAG)dl <br/> &nbsp; &nbsp; &nbsp;$(LDLIBFLAG)sc_ca $(LDLIBFLAG)sc_fa $(LDLIBFLAG)sc_ex <br/> &nbsp; &nbsp; &nbsp;$(LDLIBFLAG)sc_da $(LDLIBFLAG)sc_ut $(LDLIBFLAG)sc_ch <br/> &nbsp; &nbsp; &nbsp;$(LDLIBFLAG)sc_fi $(LLIBCTXHX) $(LDLIBFLAG)c <br/> &nbsp; &nbsp; &nbsp;-Wl,-rpath,$(CTXHOME)lib $(CORELIBS) $(COMPEOBJS) <br/><br/> &nbsp; &nbsp;然后保存$ORACLE_HOME/ctx/lib/env_ctx.mk文件，回到错误提示窗口，按“retry”按钮即可继续安装。 <br/><br/> &nbsp; &nbsp;当数据库建立完毕，等安装程序将所有文件复制到系统之后，Oracle Universal Installer还会弹出一个提示信息窗口要求以root身分执行运行root.sh程序 ，root.sh位于 ORACLE_HOME 所指向的目录下。这个时候要再开启一个新的终端窗口（Terminal），以oracle用户的身份登录进去，运行以下的命令操作命令如下：<br/> <br/> &nbsp; &nbsp;#su root<br/> &nbsp; &nbsp;#cd /opt/oracle9i/product/9.2.0<br/> &nbsp; &nbsp;#./root.sh<br/><br/> &nbsp; 运行后系统会提示如下信息：<br/> &nbsp; &nbsp;Running Oracle9 root.sh script... <br/> &nbsp; &nbsp;&#92;nThe following environment variables are set as: <br/> &nbsp; &nbsp;ORACLE_OWNER= oracle <br/> &nbsp; &nbsp;ORACLE_HOME= /opt/Oracle9i/product/9.2.0<br/><br/> &nbsp; &nbsp;Enter the full pathname of the local bin directory: [/usr/local/bin]<br/><br/> &nbsp; &nbsp;这里填写默认的目录即：/opt/oracle9i/product/9.2.0/bin即可。<br/><br/><br/> &nbsp; &nbsp;等这里执行完毕后，如果一切正常，OUI会出现“The Installation Of Oracle9i Database Was successful.”的提示信息，此时说明Oracle920数据库在redhat Linux9上安装成功了！可真不容易啊！ &nbsp;*_^<br/><br/> &nbsp; &nbsp;如果此时还需要进行其它内容的安装，按下“Next Install”按钮可进行安装，否则，请按下“Exit”按钮退出OUI安装。<br/><br/> &nbsp; &nbsp;最后一步是修复一下刚才的那个错误，即Linking阶段安装到69%的时候出现的“/soft/oracle/network/lib/ins_oemagent.mk”这个错误。<br/><br/> &nbsp; &nbsp;以Oracle用户执行如下命令：<br/> &nbsp; &nbsp;　<br/> &nbsp; &nbsp; &nbsp; #cd $ORACLE_HOME/network/lib<br/> &nbsp; &nbsp; &nbsp; #make -f ins_net_client.mk install<br/>　<br/> &nbsp; &nbsp;然后编辑$ORACLE_HOME/ctx/lib/ins_ctx.mk 文件的第13-14行，由: <br/> &nbsp; &nbsp;<br/> &nbsp; &nbsp; &nbsp; ctxhx: $(CTXHXOBJ)<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$(LINK) $(CTXHXOBJ) $(INSO_LINK)<br/> &nbsp; &nbsp;改为：<br/> &nbsp; 　 &nbsp;ctxhx: $(CTXHXOBJ)<br/>　 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$(LINK) -ldl $(CTXHXOBJ) $(INSO_LINK)<br/>　<br/> &nbsp; &nbsp;保存$ORACLE_HOME/ctx/lib/ins_ctx.mk文件。<br/><br/> &nbsp; &nbsp;然后执行如下命令：<br/><br/> &nbsp; &nbsp; &nbsp;#make -f $ORACLE_HOME/ctx/lib/ins_ctx.mk install<br/><br/> &nbsp; &nbsp;将错误修复完成。<br/><br/> &nbsp; 到此为止，Oracle920数据库在redhat Linux9上已经完全安装成功了。<br/><br/> &nbsp; :)<br/><br/><br/><br/>五、Oracel9i的使用<br/><br/> &nbsp;安装完Oracle数据库后会自动启动，下面可以进行一下实际的操作。 <br/> &nbsp;以oracle用户身份登陆数据库，可一个终端窗口（Terminal），进行如下的操作：<br/><br/> &nbsp; &nbsp; [oracle@Linux oracle]$ sqlplus "/ as sysdba"//以sysdba用户登陆数据库 <br/><br/> &nbsp; 出现如下字符提示：<br/> &nbsp; ――――――――――――――――――――――――――――――<br/> &nbsp; SQL*Plus: Release 9.2.0.1.0 - Production on Thu Feb 26 15:53:31 2004 <br/> &nbsp; Copyright(c) 1982,2002, Oracle Corporation. All rights reserved. <br/><br/> &nbsp; Connected to: <br/> &nbsp; Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production <br/> &nbsp; With the Partitioning OLAP and Oracle Data Mining options <br/> &nbsp; JServer Release 9.2.0.1.0 – Production<br/><br/> &nbsp; SQL><br/> &nbsp; ――――――――――――――――――――――――――――――<br/> &nbsp; <br/> &nbsp; 运行shudown命令关闭数据库，操作如下：<br/> &nbsp; ――――――――――――――――――――――――――――――<br/> &nbsp; SQL> shutdown <br/> &nbsp; Database closed. <br/> &nbsp; Database dismounted. <br/> &nbsp; ORACLE instance shut down. <br/> &nbsp; SQL> &nbsp;<br/> &nbsp; ――――――――――――――――――――――――――――――<br/><br/> &nbsp; 启动Oracle 9i 数据库，操作如下:<br/> &nbsp; ――――――――――――――――――――――――――――――<br/> &nbsp; [oracle@Linux oracle]$ sqlplus "/ as sysdba" <br/><br/> &nbsp; SQL*Plus: Release 9.2.0.1.0 - Production on Thu Feb 26 16:00:59 2004 <br/> &nbsp; Copyright (c) 1982,2002, Oracle Corporation. All rights reserved. <br/> &nbsp; Connected to an idle instance. <br/><br/> &nbsp; SQL> startup <br/><br/> &nbsp; Oracle instance started. <br/><br/> &nbsp; Total System Global Area 235999352 bytes <br/> &nbsp; Fixed Size &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;450680 bytes <br/> &nbsp; Variable Size &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;201326592 bytes <br/> &nbsp; Database Buffers &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;33554432 bytes <br/> &nbsp; Redo Buffers &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;667648 bytes <br/> &nbsp; Database mounted. <br/> &nbsp; Database opened. <br/> &nbsp; SQL> <br/> &nbsp; ――――――――――――――――――――――――――――――<br/><br/> &nbsp;启动Oracle 9i监听程序,操作如下:<br/> &nbsp;说明：Oracle的监听程序主要是为客户端的连接提供接口的。<br/> &nbsp;――――――――――――――――――――――――――――――<br/> &nbsp; [oracle@Linux oracle]$ lsnrctl <br/><br/> &nbsp; LSNRCTL for Linux: Version 9.2.0.1.0 - Production on 26-FEB-2004 16:10:17 <br/> &nbsp; Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved. <br/> &nbsp; Welcome to LSNRCTL, type "help" for information.<br/> <br/> &nbsp; LSNRCTL> start<br/> &nbsp; Starting /opt/oracle9i/product/9.2.0/bin/tnslsnr: please wait...<br/><br/> &nbsp; TNSLSNR for Linux: Version 9.2.0.1.0 - Production<br/> &nbsp; System parameter file is /opt/oracle9i/product/9.2.0/network/admin/listener.ora<br/> &nbsp; Log messages written to /opt/oracle9i/product/9.2.0/network/log/listener.log<br/> &nbsp; Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC)))<br/> &nbsp; Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=Linux)(PORT=1521)))<br/><br/> &nbsp; Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC)))<br/> &nbsp; STATUS of the LISTENER<br/> &nbsp; ------------------------<br/> &nbsp; Alias &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;LISTENER<br/> &nbsp; Version &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TNSLSNR for Linux: Version 9.2.0.1.0 - Production<br/> &nbsp; Start Date &nbsp; &nbsp; &nbsp; &nbsp; 26-FEB-2004 15:28:23<br/> &nbsp; Uptime &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0 days 0 hr. 0 min. 0 sec<br/> &nbsp; Trace Level &nbsp; &nbsp; &nbsp; &nbsp;off<br/> &nbsp; Security &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OFF<br/> &nbsp; SNMP &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OFF<br/> &nbsp; Listener Parameter File &nbsp; /opt/oracle9i/product/9.2.0/network/admin/listener.ora<br/><br/> &nbsp; Listener Log File &nbsp; &nbsp; &nbsp; &nbsp; /opt/oracle9i/product/9.2.0/network/log/listener.log<br/><br/> &nbsp; Listening Endpoints Summary...<br/> &nbsp; &nbsp;(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC)))<br/> &nbsp; &nbsp;(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=Linux)(PORT=1521)))<br/> &nbsp; Services Summary...<br/> &nbsp; Service "ORCL.SOFT" has 1 instance(s).<br/> &nbsp; Instance "ORCL", status UNKNOWN, has 1 handler(s) for this service...<br/> &nbsp; Service "PLSExtProc" has 1 instance(s).<br/> &nbsp; Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...<br/> &nbsp; The command completed successfully<br/> &nbsp; LSNRCTL><br/> &nbsp;――――――――――――――――――――――――――――――<br/><br/><br/> &nbsp;关闭Oracle 9i监听程序,操作如下:<br/> &nbsp;――――――――――――――――――――――――――――――<br/> &nbsp; [oracle@Linux oracle]$ lsnrctl <br/><br/> &nbsp; &nbsp;LSNRCTL for Linux: Version 9.2.0.1.0 - Production on 26-FEB-2004 16:15:28 <br/> &nbsp; &nbsp;Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved. <br/> &nbsp; &nbsp;Welcome to LSNRCTL, type "help" for information.<br/><br/> &nbsp; &nbsp;LSNRCTL> stop<br/> &nbsp; &nbsp;Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC)))<br/> &nbsp; &nbsp;The command completed successfully <br/> &nbsp; &nbsp;LSNRCTL><br/> &nbsp;――――――――――――――――――――――――――――――<br/><br/><br/> &nbsp; 启动Oracle Web Server，操作如下:<br/> &nbsp; ――――――――――――――――――――――――――――――<br/> &nbsp; &nbsp;[oracle@Linux oracle]$cd $Oracle_HOME/Apache/Apache/bin <br/> &nbsp; &nbsp;[oracle@Linux oracle]$./startJServ.sh<br/> &nbsp; &nbsp;/opt/oracle9i/product/9.2.0/Apache/Apache/bin/apachectl start: httpd started <br/> &nbsp; &nbsp;――――――――――――――――――――――――――――――<br/><br/><br/> &nbsp; 启动Oracle Web Server后默认的端口号是7777，在客户端的浏览器地址栏中输入<br/> &nbsp; &nbsp; <br/> &nbsp; &nbsp; <a href="http://xxx.xx.xxx.xxx:7777/" target="_blank">http://xxx.xx.xxx.xxx:7777/</a><br/><br/> &nbsp; 其中，xxx.xx.xxx.xxx代表IP地址，或用网络机器名也可。如果浏览器出现 ORACLE HTTP Server的页面，则说明Oracle Web Server运行正常。<br/><br/><br/> &nbsp; 关闭Oracle Web Server, 操作如下:<br/> &nbsp; ――――――――――――――――――――――――――――――<br/> &nbsp; &nbsp;[oracle@Linux oracle]$cd $Oracle_HOME/Apache/Apache/bin <br/> &nbsp; &nbsp;[oracle@Linux oracle]$./stopJServ.sh<br/> &nbsp; &nbsp; /opt/oracle9i/product/9.2.0/Apache/Apache/bin/apachectl stop: httpd stopped<br/> &nbsp; ――――――――――――――――――――――――――――――<br/><br/> &nbsp; 启动Database Configuration Assistant，操作命令如下：<br/> &nbsp; ――――――――――――――――――――――――――――――<br/> &nbsp; &nbsp;[oracle@Linux oracle]$dbca&<br/> &nbsp; ――――――――――――――――――――――――――――――<br/><br/> &nbsp; 启动Oracle Net Configuration Assistant，操作命令如下：<br/> &nbsp; ――――――――――――――――――――――――――――――<br/> &nbsp; &nbsp;[oracle@Linux oracle]$netca&<br/> &nbsp; ――――――――――――――――――――――――――――――<br/><br/> &nbsp; 启动Enterprise Manager Configuration Assistant，操作命令如下：<br/> &nbsp; ――――――――――――――――――――――――――――――<br/> &nbsp; &nbsp;[oracle@Linux oracle]$emca&<br/> &nbsp; ――――――――――――――――――――――――――――――<br/><br/><br/><br/> &nbsp; oemapp相关命令，如下：<br/> &nbsp; ――――――――――――――――――――――――――――――<br/> &nbsp; [oracle@Linux oracle]$oemapp dbastudio<br/> &nbsp; [oracle@Linux oracle]$oemapp console <br/> &nbsp; [oracle@Linux oracle]$oemapp txtmgr<br/> &nbsp; [oracle@Linux oracle]$oemapp ocmcli<br/> &nbsp; [oracle@Linux oracle]$oemapp lmviewer<br/> &nbsp; [oracle@Linux oracle]$oemapp ocm<br/> &nbsp; [oracle@Linux oracle]$oemapp esmsrv<br/> &nbsp; [oracle@Linux oracle]$oemapp opm<br/> &nbsp; [oracle@Linux oracle]$oemapp cpta<br/> &nbsp; [oracle@Linux oracle]$oemapp esm<br/> &nbsp; [oracle@Linux oracle]$oemapp jdbctest<br/> &nbsp; [oracle@Linux oracle]$oemapp oemutil<br/> &nbsp; [oracle@Linux oracle]$oemapp topsess<br/> &nbsp; [oracle@Linux oracle]$oemapp dataguard<br/> &nbsp; [oracle@Linux oracle]$oemapp worksheet<br/> &nbsp; [oracle@Linux oracle]$oemapp cp<br/> &nbsp; [oracle@Linux oracle]$oemapp sdoadvisor<br/> &nbsp; [oracle@Linux oracle]$oemapp pm <br/> &nbsp; ――――――――――――――――――――――――――――――<br/><br/> 六、补充说明：<br/><br/> &nbsp; &nbsp;在网上看这样一句话，我摘抄下来：“请住记，Oracle9.2并不被Red Hat 9所认证的，而且这个结合也不是产品和环境配置所认可的。但是，作为一个工作站，它是完全稳定并可用的。” 当然了，具体情况，还得看各位的具体应用如何了。<br/><br/> &nbsp; &nbsp;写这个东东的所有的参考文章和参考数字及各种数据均来自互联网，我谨代表我个人对免费提供这些材料的作者表示由衷的感谢。当然，您也可以对我写的这个东东进行转贴，但是希望您能保留文章的完整。^_^<br/><br/> &nbsp; 由于水平有限，所写难免有错误或疏漏之处，说的不对的地方请您多多指正。表示感谢。<br/><br/>Tags - <a href="http://www.dzhope.com/tags/oracle9i/" rel="tag">oracle9i</a> , <a href="http://www.dzhope.com/tags/redhat/" rel="tag">redhat</a> , <a href="http://www.dzhope.com/tags/linux9/" rel="tag">linux9</a> , <a href="http://www.dzhope.com/tags/%25E5%2586%2585%25E6%25A0%25B8%25E5%258F%2582%25E6%2595%25B0/" rel="tag">内核参数</a> , <a href="http://www.dzhope.com/tags/%25E7%258E%25AF%25E5%25A2%2583%25E5%258F%2598%25E9%2587%258F/" rel="tag">环境变量</a>
]]>
</description>
</item><item>
<link>http://www.dzhope.com/post//#blogcomment</link>
<title><![CDATA[[评论] 在redhat Linux9下安装Oracle9.2.0的一点经验]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://www.dzhope.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>