首页 > 数据库 > Oracle > 正文

我在RH9下安装Oracle8.1.7经历

2024-08-29 13:31:19
字体:
来源:转载
供稿:网友


我的环境:
机器 c1200m、128m 
软件 redhat linux release 9, kernel 2.4.20-8。

我是参照别人的笔记安装的(但我省了几步)

我的linux是完全安装的所对其它情况不做详解了

1,安装准备 //这些我都放在/home/root/oracle目录下(我把这个目录的权限修改成了wrx
  glibc-2.1.3-stubs.tar.gz              //oracle的linux补丁
  j2sdk-1_4_2_06-linux-i586-rpm.bin     //sun 的jdk
  linux81701.tar                        //oracle的安装盘

2,安装jdk和创建符号连接(也就是windows的快捷方式,,用户root)
  图形界面的安装我就不说了^_^
 #./j2sdk-1_4_2_06-linux-i586-rpm.bin         //执行后会得到 j2sdk-1_4_2_06-linux-i586-rpm安装包
 #rpm -uvh   j2sdk-1_4_2_06-linux-i586-rpm    //安jdk
 #ln -s /usr/local/j2sdk-1_4_2_06 /usr/local/java

3 创建用户oracle,组oinstall各oracle的安装路径 (用户root,提示符是#的用户是root )
 
  #groupadd oinstall
  #groupadd dba
  #useradd -g oinstall -g dba oracle
  #passwd oracle
    new password:[oracle]     //[]里是我输入的密码
    bad password: it is based on a dictionary word
    retype new password:[oralce]
    passwd: all authentication tokens updated successfully.

  #mkdir -p /u01/oracle/product/8.1.7                         //创建oracle安装路径
  #chown -r /oracle.oinstall /u01/oracle                     //由于现在使用的是root
                                                             //创建的目录不改变他的权限
      //等下用oracle安装时会无权限对此目录的操作
 
4,修改oracle用户的profile文件(当前工作目录是:/home/oracle/下 ,用户oracle 它的shell提示符变成$)
  $vi .bash_profile                 //建议使用emacs  如图形界面的使用gedit
        //emacs .bash_profile或gedit .bash_profile
  
  加入以下内容:
   # stuff for 8.1.7 install
   export ld_assume_kernel=2.2.5
   export oracle_base=/u01/oracle
   export oracle_home=$oracle_base/product/8.1.7
   export path=$path:$oracle_home/bin
   unset lang

   # java development kit for 8.1.7
   java_home=/usr/local/java; export java_home
   classpath=${java_home}/lib/classes.zip; export classpath

   #need to point to init*.ora
   oracle_sid=orcl; export oracle_sid

   # need shared libraries ie for lsnrctl
   if [ "${ld_library_path:-}" == "" ]; then
      ld_library_path=${oracle_home}/lib:/usr/lib:/usr/local/lib
   else
      ld_library_path=${oracle_home}/lib:${ld_library_path}
   fi
   export ld_library_path
  完成后退现vi(先保存)^_^
  为使刚刚修改的shell配置文件生效执行source命令
  $source .bash_profile
 
5,解压从oracle下载的安装盘(操作用户,oracle,我的工作目录是/home/root/oracle/  你的下载下来的
 oracle安装盘放在哪儿就到那儿解压吧^_^
 
  $tar -xvf linux81701.tar

6,用oracle用户登陆到图形界面 进入上一步解压出来的disk1目录双击runinstaller跳出一个窗口你点击运行
  这时便启动了oracle的图形安装界面 点 install按钮接着往下走 碰到unix group name 填入oinstall 


7,oracle的安装程序在准备好了安装后会弹出一个小窗口,告诉你要求你用root用户执行一个叫做orainsroot.sh的脚本

8,这时你打开一个终端窗(如果你已经打开也就不要了)
   这时终端的提示符是'$'这是普通用户的shell提示符现在要切换到root(超级用户)
  $ su
  password:[输入你的root用户的密码]
         //这时你shell提示符会变成'#'   你已经拥有了超级用户的权限了
  #cd /u01/oracle/product/8.1.7
  #./orainstroot.sh        //也可以使用 sh orainstroot.sh
   creating oracle inventory pointer file (/etc/orainst.loc)
   changing groupname of /u01/oracle/orainventory to oinstall.
   //这是执行那个sh脚本的系统的提示^_^
  回到oracle的安装程序点击ok
9,接着往下走
  select product to install: 选择 oracle enterprise

  installation types: 选择 typical (837mb)

  verify jdk home directory: 填入 /usr/local/java

  database identification: 填入 orcl

 sid: 填入 orcl 即根你的 .bash_profile 里面的要一致

10、继续往下走,会出现若干次 make 错误,别管他,选择 ignore

11、到达 100% 的时候会跳出一个小窗口,提示要 root 用户执行一个脚本 root.sh ,
     先等一下,在 执行 root.sh 之前先打一个补丁。
 回到终端窗口转到从oracle下载下来的linux补丁包所在的目录下把补丁拷贝到$oracle_home /*oracle的安装目录*/(我的补丁包在/home/root/orale/目示下
 #cd /home/root/oracle/
 #cp glibc-2.1.3-stubs.tar.gz  $oracle_home
     //这两条命令也可用下命令 # cp /home/root/oracle/glibc-2.1.3.stubs.tar.gz /u01/oracle/product/8.1.7
 
 #tar xzvf glibc-2.1.3-stubs.tar.gz
 #sh  setup_stubs.sh

 //这时你慢慢等一下吧
  最后你会看见以下提示:
 relinking executables:
 running 'ins_rdbms.mk'...done.
 running 'ins_net_client.mk'...done.  
 running 'ins_cman.mk'...done.
 running 'ins_names.mk'...done.
 running 'ins_oemagent.mk'...done.
 running 'ins_net_server.mk'...done.
 running 'ins_nau.mk'...done.
 running 'ins_plsql.mk'...done.
 running 'ins_precomp.mk'...done.
 running 'ins_ldap.mk'...done.
 running 'ins_sqlplus.mk'...done.
 running 'ins_otrace.mk'...done.
 running 'ins_ctx.mk'...done.
 done. the links have been fixed!
  执行完后修改一下root.sh
 #vi root.sh

 rmf=/bin/rm -f

 少了2 个双引号,要改为

 rmf="/bin/rm -f"

 还有第 156 行, 靠近末尾少了一个单引号,小心别改错了

 ruid=
 `/usr/bin/id|$awk -f/( '{print $2}'|$awk -f/) '{print $1}`

 要改为

 ruid=
 `/usr/bin/id|$awk -f/( '{print $2}'|$awk -f/) '{print $1}'`

 存盘退出,现在可以执行 root.sh

 [[email protected] 8.1.7]# sh root.sh   //运行这个root.sh shell脚本

  有一个地方要输入,直接敲回车。
 最后结果如下:
 enter the full pathname of the local bin directory: [/usr/local/bin]:
 /ncreating /etc/oratab file...
 entry will be added to the /etc/oratab file by
 database configuration assistant when a database is created
 finished running generic part of root.sh script.
 now product-specific root actions will be performed.

12、接着往下走,应该就没什么问题了。
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表