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> 
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章