cyrus 发表于 2018-9-26 07:10:57

solaris 10安装Oracle10.2g

  1> 检查相关的安装包
  官方要求的包: SUNWarc SUNWbtool SUNWhea SUNWlibm SUNWlibms SUNWsprot SUNWtoo SUNWi1of SUNWi1cs SUNWi15cs SUNWxwfnt
  执行命令
  bash-3.00# pkginfo -i SUNWarc SUNWbtool SUNWhea SUNWlibm SUNWlibms SUNWsprot SUNWsprox SUNWtoo SUNWi1of SUNWi1cs SUNWi15cs SUNWxwfnt
  system SUNWarc Lint Libraries (usr)
  system SUNWbtool CCS tools bundled with SunOS
  system SUNWhea SunOS Header Files
  system SUNWi1of ISO-8859-1 (Latin-1) Optional Fonts
  system SUNWlibm Math & Microtasking Library Headers & Lint Files (Usr)
  system SUNWlibms Math & Microtasking Libraries (Usr)
  system SUNWsprot Solaris Bundled tools
  system SUNWtoo Programming Tools
  system SUNWxwfnt X Window System platform required fonts
  错误: 未发现"SUNWi1cs"的信息
  错误: 未发现"SUNWi15cs"的信息
  发现有2个包未安装,分别是: "SUNWi1cs" "SUNWi15cs"
  这2个包可以在solaris的安装包里找到。mount上光盘,把这些差的包装起来
  bash-3.00#cd /cdrom/sol_10_1009_x86/Solaris_10/Product/
  bash-3.00#ls ./SUNWi1*
  ./SUNWi13cs:

  archive install pkginfo pkgmap>  ./SUNWi13rf:

  archive install pkginfo pkgmap>  ./SUNWi15cs:

  archive install pkginfo pkgmap>  ./SUNWi15rf:

  archive install pkginfo pkgmap>  ./SUNWi1cs:

  archive install pkginfo pkgmap>  ./SUNWi1of:

  archive install pkginfo pkgmap>  确认这里有这些包。
  2> 安装所需要的软件包:
  bash-3.00#pkgadd -d . SUNWi1cs
  处理软件包范例来自
  X11 ISO8859-1 Codeset Support(i386) 2.0,REV=2004.10.17.15.04
  Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  Use is subject to license terms.
  使用作为包的基本目录
  ## 正在处理软件包信息.
  ## 正在处理系统信息.
  8软件包路径名已经正确地安装
  ## 检查软件包的依赖性
  ## 检查磁盘空间需求
  ## 检查同已经安装的软件包之间的冲突.
  ## 检查setuid/setgid程序。
  在这个软件包中包含了正文程序,只有具有超级-用户的权限才能在这个软件包
  的安装过程中执行它们.
  要继续安装 y
  安装X11 ISO8859-1 Codeset Support成为
  ##正在安装1部分- 1.
  232 块
  安装成功
  bash-3.00#pkgadd -d . SUNWi15cs
  处理软件包范例来自
  X11 ISO8859-15 Codeset Support(i386) 2.0,REV=2004.10.17.15.04
  Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  Use is subject to license terms.
  使用作为包的基本目录
  ## 正在处理软件包信息.
  ## 正在处理系统信息.
  6软件包路径名已经正确地安装
  ## 检查软件包的依赖性
  ## 检查磁盘空间需求
  ## 检查同已经安装的软件包之间的冲突.
  ## 检查setuid/setgid程序。
  在这个软件包中包含了正文程序,只有具有超级-用户的权限才能在这个软件包
  的安装过程中执行它们.
  要继续安装 y
  安装X11 ISO8859-15 Codeset Support成为
  ##正在安装1部分- 1.
  1460 块
  安装成功
  3> 调整内核参数
  bash-3.00# cp /etc/system /etc/system.org   //备份内核参数文件
  bash-3.00#vi /etc/system
  set noexec_user_stack=1
  set semsys:seminfo_semmni = 100
  set semsys:seminfo_semmns = 1024
  set semsys:seminfo_semmsl = 256
  set semsys:seminfo_semvmx = 32767
  set shmsys:shminfo_shmmax = 4294967295
  set shmsys:shminfo_shmmin = 1
  set shmsys:shminfo_shmmni = 100
  set shmsys:shminfo_shmseg = 10
  4> 创建用户与组:
  bash-3.00# groupadd dba
  bash-3.00# groupadd oinstall
  bash-3.00# useradd -g oinstall -G dba -d /u01/oracle -m oracle
  bash-3.00# passwd oracle
  bash-3.00# su - oracle
  #bash
  bash-3.00$ mkdir -p /u01/oracle/ora10g/product   //实例安装目录
  bash-3.00$ mkdir /u02/oradata                  //数据存放目录
  bash-3.00$ chown oracle:oinstall /u02/oradata
  5> 配置oracle用户的环境变量
  bash-3.00$ vi .profile
  export ORACLE_BASE=/u01/oracle/ora10g
  export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
  export ORACLE_SID=oradb
  export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
  export PATH=$ORACLE_HOME/bin:/bin:/sbin:/usr/ccs/bin:/usr/local/bin
  export TMPDIR=/var/tmp
  export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/network/lib:/lib64:/usr/local/lib
  export DISPLAY=127.0.0.1:0.0
  umask 022
  6> oracle 软件安装。
  bash-3.00# xhost +
  access control disabled, clients can connect from any host
  bash-3.00# su oracle
  $ bash
  bash-3.00$ cd /opt/database/
  bash-3.00$ ls
  doc         response      stage
  install       runInstallerwelcome.html
  bash-3.00$ ./runInstaller
  正在启动 Oracle Universal Installer...
  正在检查安装程序要求...
  检查操作系统版本: 必须是5.10。    实际为 5.10通过
  检查临时空间: 必须大于 250 MB。   实际为 1967 MB    通过
  检查交换空间: 必须大于 500 MB。   实际为 2291 MB    通过
  检查监视器: 监视器配置至少必须显示 256 种颜色。    实际为 16777216    通过
  所有安装程序要求均已满足。
  备从以下地址启动 Oracle Universal Installer /tmp/OraInstall2011-10-16_11-57-33PM. 请稍候...bash-3.00$ Warning: Missing charsets in String to FontSet conversion
  正在以高级模式启动安装程序...
  Oracle Universal Installer, 版本 10.2.0.2.0 正式版
  版权所有 (c) 1999, 2006, Oracle。保留所有权利。
  图形界面操作省略。。。。。。。。
  安装过程中出现的小问题:
  bash-3.00$ pwd
  /u01/oracle/ora10g/product/10.2.0/db_1/bin
  bash-3.00$ sqlplus /nolog
  Error 6 initializing SQL*Plus
  Message file sp1.msb not found
  SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory
  解决方法:
  bash-3.00#vi /etc/profile                            //添加以下内容
  ORACLE_BASE=/u01/oracle/ora10g
  ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
  ORACLE_SID=oradb
  NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
  PATH=$ORACLE_HOME/bin:/bin:/sbin:/usr/ccs/bin:/usr/local/bin
  LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/network/lib:/lib64:/usr/local/lib
  TMPDIR=/var/tmp
  DISPLAY=127.0.0.1:0.0
  export ORACLE_BASE
  export ORACLE_HOME
  export ORACLE_SID
  export NLS_LANG
  export PATH
  export TMPDIR
  export LD_LIBRARY_PATH
  export DISPLAY
  umask 022
  bash-3.00# source /etc/profile                      //使配置文件即使生效
  bash-3.00$ sqlplus / as sysdba

  SQL*Plus:>  Copyright (c) 1982, 2005, Oracle.All Rights Reserved.

  Connected to an>  SQL> startup
  ORACLE instance started.
  Total System Global Area289406976 bytes

  Fixed>
  Variable>  Database Buffers          184549376 bytes
  Redo Buffers                2912256 bytes
  Database mounted.
  Database opened.
  SQL> select instance_name from v$instance;
  INSTANCE_NAME
  ----------------
  oradb
  SQL> shutdown immediate;                         //关闭数据库
  Database closed.
  Database dismounted.
  ORACLE instance shut down.
  bash-3.00$ lsnrctl start                         //启动监听
  LSNRCTL for Solaris: Version 10.2.0.2.0 - Production on 17-OCT-2011 23:46:39
  Copyright (c) 1991, 2005, Oracle.All rights reserved.
  Starting /u01/oracle/ora10g/product/10.2.0/db_1/bin/tnslsnr: please wait...
  TNSLSNR for Solaris: Version 10.2.0.2.0 - Production
  System parameter file is /u01/oracle/ora10g/product/10.2.0/db_1/network/admin/listener.ora
  Log messages written to /u01/oracle/ora10g/product/10.2.0/db_1/network/log/listener.log
  Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
  Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=liuxiong.com)(PORT=1521)))
  Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
  STATUS of the LISTENER
  ------------------------
  Alias                     LISTENER
  Version                   TNSLSNR for Solaris: Version 10.2.0.2.0 - Production
  Start Date                17-OCT-2011 23:46:41
  Uptime                  0 days 0 hr. 0 min. 0 sec
  Trace Level               off
  Security                  ON: Local OS Authentication
  SNMP                      OFF
  Listener Parameter File   /u01/oracle/ora10g/product/10.2.0/db_1/network/admin/listener.ora
  Listener Log File         /u01/oracle/ora10g/product/10.2.0/db_1/network/log/listener.log
  Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=liuxiong.com)(PORT=1521)))
  Services Summary...
  Service "PLSExtProc" has 1 instance(s).
  Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
  The command completed successfully
  bash-3.00# poweroff                                              //关闭主机

页: [1]
查看完整版本: solaris 10安装Oracle10.2g