zoukankan      html  css  js  c++  java
  • Solaris 10上Oracle 10g安装步骤图解

    1. 说明

    32位模式下安装32的10g,不是正规的安装方法,只能作为自己测试使用。
    企业环境参考即可,请使用自己公司的标准化安装流程文档。
    等什么时候有时间在出一份正规的企业级的安装过程(估计有点久远)。

    2. 查看相关包

    [root@oracle:/]# pkginfo -i SUNWarc SUNWbtool SUNWhea SUNWlibm SUNWlibms SUNWsprot SUNWtoo  SUNWi1of  SUNWi1cs SUNWi15cs SUNWxwfnt
    system      SUNWarc   Lint Libraries (usr)
    system      SUNWbtool CCS tools bundled with SunOS
    system      SUNWhea   SunOS Header Files
    system      SUNWi15cs X11 ISO8859-15 Codeset Support
    system      SUNWi1cs  X11 ISO8859-1 Codeset Support
    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
    

    代表需求包全部都已经安装了。
    如果有未安装的包,使用如下方法安装:
    在这里插入图片描述
    把“已连接”勾上,确定,重启Solaris操作系统。
    接下来进去光盘的存放包的目录安装即可(不同OS路径名可能有区别)。

    [root@oracle:/cdrom/sol_10_113_x86/Solaris_10/Product]# cd /cdrom/sol_10_113_x86/Solaris_10/Product
    
    //按照这种格式安装:pkgadd -d . SUNWi1cs
    

    3. 添加用户和组

    [root@oracle:/]# groupadd oinstall
    [root@oracle:/]# groupadd dba
    [root@oracle:/]# useradd -g oinstall -G dba -s /usr/bin/bash -d /export/home/oracle oracle
    [root@oracle:/]# mkdir -p /export/home/oracle
    [root@oracle:/]# chown -R oracle:oinstall /export/home/oracle/
    [root@oracle:/]# passwd oracle
    New Password: 
    Re-enter new Password: 
    passwd: password successfully changed for oracle
    

    4. 设置oracle环境变量

    有个点是如果ORACLE_BASE和ORACLE_HOME最后边加了多个‘/’,比如
    ORACLE_BASE=/export/home/oracle/u01/app/oracle/
    会出现dbca后(数据库开了),sqlplus / as sysdba登进去后显示idle的问题。
    DISPLAY这个你们就不需要加了,或者根据你们的环境自己改掉ip。

    [root@oracle:/]# su - oracle
    Oracle Corporation      SunOS 5.10      Generic Patch   January 2005
    -bash-3.2$ vi .profile
    ORACLE_BASE=/export/home/oracle/u01/app/oracle
    ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
    DISPLAY=192.168.180.1:0.0
    LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib:/usr/sbin:/usr/bin:/usr/sfw/bin:/usr/local/bin
    PATH=$PATH:/usr/ccs/bin:$ORACLE_HOME/bin:/usr/sbin:/usr/sfw/bin:/usr/local/bin
    ORACLE_SID=zkm
    export ORACLE_BASE
    export ORACLE_HOME
    export LD_LIBRARY_PATH
    export PATH
    export ORACLE_SID
    export DISPLAY
    alias ll='ls -larth'
    PS1='[u@h:$PWD]# '
    export PS1
    -bash-3.2$ source .profile
    [oracle@oracle:/export/home/oracle]# 
    

    5. 创建Oracle软件目录

    [oracle@oracle:/export/home/oracle]# mkdir -p /export/home/oracle/u01/app/oracle
    

    6. 修改OS参数

    使用root,在文件/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
    

    7. 上传Oracle软件包并解压

    在这里插入图片描述
    更改权限:

    [root@oracle:/]# chown -R oracle:oinstall /soft
    

    使用oracle解压:

    [oracle@oracle:/soft]# unzip 10202_database_solx86.zip 
    

    8. 开始安装

    [oracle@oracle:/soft/database]# ./runInstaller 
    Starting Oracle Universal Installer...
    
    Checking installer requirements...
    
    Checking operating system version: must be 5.10.    Actual 5.10
                                          Passed
    
    Checking Temp space: must be greater than 250 MB.   Actual 3640 MB    Passed
    Checking swap space: must be greater than 500 MB.   Actual 3875 MB    Passed
    Checking monitor: must be configured to display at least 256 colors.    Actual 16777216    Passed
    
    All installer requirements met.
    
    Preparing to launch Oracle Universal Installer from /tmp/OraInstall2020-04-03_12-18-28PM. Please wait ...
    

    按照接下去截图,没特殊情况直接next即可。
    在这里插入图片描述
    注意目录要对的上。
    在这里插入图片描述
    在这里插入图片描述
    依然是目录要对的上。
    在这里插入图片描述
    我只有一个交换空间不足的警告,可以忽略。
    如果有其他的报错能不能忽略要看具体的报错。
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    出现BUG(如下图报错),在Solaris下安装32位oracle软件出现(64位模式下安装64位oracle软件我没遇到)。

    Bug 6791866 - ASSEMBLER CODE GENERATED BY GENNTTAB CAUSES LD ERROR IN LATEST SOLARIS BUILDS

    在这里插入图片描述
    需要做如下处理:

    步骤:

    1. cd $ORACLE_HOME/bin
    2. cp gennttab gennttab_orig
    3. vi gennttab
      将这段配置中的112改成96
    4. cd $ORACLE_HOME/network/lib
      /usr/ccs/bin/make -f ins_net_client.mk ntcontab.o
      $ORACLE_HOME/bin/genclntsh
    5. 现在点retry 就好了
    [root@oracle:/]# su - oracle
    Oracle Corporation      SunOS 5.10      Generic Patch   January 2005
    [oracle@oracle:/export/home/oracle]# cd $ORACLE_HOME/bin
    [oracle@oracle:/export/home/oracle/u01/app/oracle/product/11.2.0/db_1/bin]# cp gennttab gennttab_orig
    [oracle@oracle:/export/home/oracle/u01/app/oracle/product/11.2.0/db_1/bin]# grep 112 gennttab
            .size   ntcontab,112
    [oracle@oracle:/export/home/oracle/u01/app/oracle/product/11.2.0/db_1/bin]# vi gennttab
    //修改过程略
    [oracle@oracle:/export/home/oracle/u01/app/oracle/product/11.2.0/db_1/bin]# grep 96 gennttab
            .size   ntcontab,96
            .ident  "@(#)machtypes.h        1.7     96/05/23 SMI"
    [oracle@oracle:/export/home/oracle]# cd $ORACLE_HOME/network/lib
    [oracle@oracle:/export/home/oracle/u01/app/oracle/product/11.2.0/db_1/network/lib]# /usr/ccs/bin/make -f ins_net_client.mk ntcontab.o 
    //输出内容略
    [oracle@oracle:/export/home/oracle/u01/app/oracle/product/11.2.0/db_1/network/lib]# $ORACLE_HOME/bin/genclntsh
    

    点击retry继续下一步安装。
    先别点OK。
    在这里插入图片描述
    使用root用户跑完脚本。

    [root@oracle:/]# /export/home/oracle/u01/app/oracle/oraInventory/orainstRoot.sh
    Changing permissions of /export/home/oracle/u01/app/oracle/oraInventory to 770.
    Changing groupname of /export/home/oracle/u01/app/oracle/oraInventory to oinstall.
    The execution of the script is complete
    [root@oracle:/]# /export/home/oracle/u01/app/oracle/product/11.2.0/db_1/root.sh
    Running Oracle 10g root.sh script...
    
    The following environment variables are set as:
        ORACLE_OWNER= oracle
        ORACLE_HOME=  /export/home/oracle/u01/app/oracle/product/11.2.0/db_1
    
    Enter the full pathname of the local bin directory: [/usr/local/bin]: 
       Copying dbhome to /usr/local/bin ...
       Copying oraenv to /usr/local/bin ...
       Copying coraenv to /usr/local/bin ...
    
    
    Creating /var/opt/oracle/oratab file...
    Entries will be added to the /var/opt/oracle/oratab file as needed 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.
    [root@oracle:/]# 
    

    点’OK’结束,然后exit。
    在这里插入图片描述

    9. dbca建库

    库名字是zkm。

    [oracle@oracle:/soft/database]# dbca
    

    在这里插入图片描述
    在这里插入图片描述
    自己的测试库没那么多要求,默认就行。
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述

    在这里插入图片描述

    在这里插入图片描述

    在这里插入图片描述

    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述

    在这里插入图片描述
    在这里插入图片描述
    完成。

    [oracle@oracle:/export/home/oracle]# sqlplus / as sysdba
    
    SQL*Plus: Release 10.2.0.2.0 - Production on Fri Apr 3 12:52:29 2020
    
    Copyright (c) 1982, 2005, Oracle.  All Rights Reserved.
    
    
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
    With the Partitioning, OLAP and Data Mining options
    
    SQL> 
    
  • 相关阅读:
    数据结构的理解
    等价、偏序和全序
    等价、偏序和全序
    二叉树与树的理解
    SICP 习题 (2.10)解题总结: 区间除法中除于零的问题
    div:给div加滚动栏 div的滚动栏设置
    textarea文本域宽度和高度(width、height)自己主动适应变化处理
    OSX: 逻辑卷管理系统Core Storage(1)
    垂死挣扎还是涅槃重生 -- Delphi XE5 公布会归来感想
    string实现
  • 原文地址:https://www.cnblogs.com/PiscesCanon/p/12723496.html
Copyright © 2011-2022 走看看