微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Solaris10上安装Oracle 11g

平台: Solaris 10 X86 (在VM下测试)@H_404_1@

RDBMS: 11.2.0.4 for solaris X86平台,64位@H_404_1@

参考文档(官方文档写的很详细): https://docs.oracle.com/cd/E11882_01/install.112/e24351/toc.htm#i1010738@H_404_1@

因为工作需要,在Solaris10上安装11g。@H_404_1@

首先,看Oracle 11g官方是否支持Solaris平台。支持X86平台下的solaris10.@H_404_1@

@H_404_1@@H_404_1@

在VM上安装solaris 。(略)@H_404_1@

-- 查看solaris版本@H_404_1@

# showrev
Hostname: sun11g
Hostid: 184a8c54
Release: 5.10
Kernel architecture: i86pc
Application architecture: i386
Hardware provider: 
Domain: 
Kernel version: SunOS 5.10 Generic_147148-26
# uname
SunOS
# cat /etc/release
                    Oracle Solaris 10 1/13 s10x_u11wos_24a X86
  copyright (c) 1983, 2013, Oracle and/or its affiliates. All rights reserved.
                            Assembled 17 January 2013
# 
# uname -r
5.10
# 

查看solaris的位数@H_404_1@

# isainfo -v
64-bit amd64 applications
        avx xsave pclmulqdq aes sse4.2 sse4.1 ssse3 amd_lzcnt popcnt amd_sse4a 
        tscp cx16 sse3 sse2 sse fxsr amd_mmx mmx cmov amd_sysc cx8 tsc fpu bmi1 
        f16c fma rdrand 
32-bit i386 applications
        avx xsave pclmulqdq aes sse4.2 sse4.1 ssse3 amd_lzcnt popcnt amd_sse4a 
        tscp cx16 sse3 sse2 sse fxsr amd_mmx mmx cmov amd_sysc cx8 tsc fpu bmi1 
        f16c fma rdrand 
# 

-- solaris10上所需的package@H_404_1@

Oracle Solaris 10

    SUNWarc
    SUNWbtool
    SUNWhea
    SUNWlibC
    SUNWlibm
    SUNWlibms
    SUNWsprot
    SUNWtoo
    SUNWi1of
    SUNWi1cs (ISO8859-1)
    SUNWi15cs (ISO8859-15)
    SUNWxwfnt
    SUNWcsl

--检查Solaris是否已经安装了这些包,检查结果,是有2个包没有安装,需要安装@H_404_1@

# pkginfo -i SUNWarc SUNWbtool SUNWhea SUNWlibC SUNWlibm SUNWlibms SUNWsprot SUNWtoo SUNWi1of SUNWi1cs SUNWi15cs SUNWxwfnt SUNWcsl 

# pkginfo -i SUNWarc SUNWbtool SUNWhea SUNWlibC SUNWlibm SUNWlibms SUNWsprot SUNWtoo SUNWi1of SUNWi1cs SUNWi15cs SUNWxwfnt SUNWcsl
system      SUNWarc   Lint Libraries (usr)
system      SUNWbtool CCS tools bundled with SunOS
system      SUNWcsl   Core Solaris, (Shared Libs)
system      SUNWhea   SunOS Header Files
system      SUNWi1of  ISO-8859-1 (Latin-1) Optional Fonts
system      SUNWlibC  Sun Workshop Compilers Bundled libC
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
ERROR: @R_96_4045@ion for "SUNWi1cs" was not found
ERROR: @R_96_4045@ion for "SUNWi15cs" was not found
# 

把solaris安装光盘mount上,进行安装@H_404_1@

cd /cdrom/sol_10_113_x86/Solaris_10/Product
pkgadd -d ./ SUNWi1cs SUNWi15cs

# pkgadd -d ./ SUNWi1cs SUNWi15cs

Processing package instance <SUNWi1cs> from </cdrom/sol_10_113_x86/Solaris_10/Product>

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.
Using </> as the package base directory.
## Processing package @R_96_4045@ion.
## Processing system @R_96_4045@ion.
   8 package pathnames are already properly installed.
## Verifying package dependencies.
## Verifying disk space requirements.
## Checking for conflicts with packages already installed.
## Checking for setuid/setgid programs.

This package contains scripts which will be executed with super-user
permission during the process of installing this package.

Do you want to continue with the installation of <SUNWi1cs> [y,n,?] y

Installing X11 ISO8859-1 Codeset Support as <SUNWi1cs>

## Installing part 1 of 1.
232 blocks

Installation of <SUNWi1cs> was successful.

Processing package instance <SUNWi15cs> from </cdrom/sol_10_113_x86/Solaris_10/Product>

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.
Using </> as the package base directory.
## Processing package @R_96_4045@ion.
## Processing system @R_96_4045@ion.
   6 package pathnames are already properly installed.
## Verifying package dependencies.
## Verifying disk space requirements.
## Checking for conflicts with packages already installed.
## Checking for setuid/setgid programs.

This package contains scripts which will be executed with super-user
permission during the process of installing this package.

Do you want to continue with the installation of <SUNWi15cs> [y,n,?] y

Installing X11 ISO8859-15 Codeset Support as <SUNWi15cs>

## Installing part 1 of 1.
1460 blocks

Installation of <SUNWi15cs> was successful.
# 

再次查看包是否已经安装,所有的包已经安装过了。@H_404_1@

pkginfo -i SUNWarc SUNWbtool SUNWhea SUNWlibC SUNWlibm SUNWlibms SUNWsprot SUNWtoo SUNWi1of SUNWi1cs SUNWi15cs SUNWxwfnt SUNWcsl
# pkginfo -i SUNWarc SUNWbtool SUNWhea SUNWlibC SUNWlibm SUNWlibms SUNWsprot SUNWtoo SUNWi1of SUNWi1cs SUNWi15cs SUNWxwfnt SUNWcsl
system      SUNWarc   Lint Libraries (usr)
system      SUNWbtool CCS tools bundled with SunOS
system      SUNWcsl   Core Solaris, (Shared Libs)
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      SUNWlibC  Sun Workshop Compilers Bundled libC
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
# 

-- 安装操作系统patch@H_404_1@

4.5.1 Operating system-specific patches@H_404_1@

Installation Type or ProductRequirement
All installationsPatches for Oracle Solaris 10:
  • 120754-06: SunOS 5.10_x86 libmtsk@H_404_1@

  • 119961-05: SunOS 5.10_x86: Assembler@H_404_1@

  • 119964-14: SunOS 5.10_x86 Shared library patch for C++_x86@H_404_1@

  • 137104-02@H_404_1@

  • 139575-03@H_404_1@

  • 139556-08@H_404_1@

  • 141415-04@H_404_1@

  • 141445-09@H_404_1@

Database Smart Flash Cache (An Enterprise Edition only feature.)The following patches are required for Oracle Solaris on x86-64 (64-bit) if you are using the flash cache feature:
140797-01
140900-01
141017-01
141415-10
141737-05

查看操作系统patch是否安装 ,这里显示结果,都已经全部安装过了。如果没有的话,需要在MOS上下载。@H_404_1@

patchadd -p | grep 141445

@H_404_1@@H_404_1@

-- 创建操作系统组 和 用户@H_404_1@

# groupadd oinstall
# groupadd dba
useradd -d /export/home/oracle -m -s /bin/bash -g oinstall -G dba oracle

# id oracle
uid=100(oracle) gid=100(oinstall)
# 

修改oracle用户密码,这里碰到的错误@H_404_1@

passwd -r files oracle

碰到了错误
passwd: Password cannot be circular shift of logonid.
解决方法
修改/etc/default/passwd     NAMECHECK=NO   
passwd: The password must contain at least 1 numeric or special character(s).
解决方法
MINSPECIAL=0
MINDIGIT=0@H_404_1@

# passwd -r files oracle
New Password: 
Re-enter new Password: 
passwd: password successfully changed for oracle
# 

# id -p oracle
uid=100(oracle) gid=100(oinstall) projid=3(default)
# 

这里是default,则需要添加proj配置
创建oracle用户的project
#projadd group.dba
在/etc/user_attr文件添加一行
oracle::::project=group.dba@H_404_1@

修改后的结果@H_404_1@

# id -p oracle
uid=100(oracle) gid=100(oinstall) projid=100(group.dba)
# 

修改资源限制 ,修改max-shm-memory 到 6 GB,修改max-sem-ids 到 256@H_404_1@

-bash-3.2$ id -p
uid=100(oracle) gid=100(oinstall) projid=100(group.dba)
prctl -n project.max-shm-memory -v 6gb -r -i project group.dba
prctl -n project.max-sem-ids -v 256 -r -i project group.dba

设置最大共享内存为2G@H_404_1@

# projmod -sK "project.max-shm-memory=(privileged,2G,deny)" group.dba
# 

确认最大共享内存@H_404_1@

-bash-3.2$ prctl -n project.max-shm-memory -i process $$
process: 1242: -bash
NAME    PRIVILEGE       VALUE    FLAG   ACTION                       RECIPIENT
project.max-shm-memory
        privileged      2.00GB      -   deny                                 -
        system          16.0EB    max   deny                                 -
-bash-3.2$ 

-- 查看shell limit@H_404_1@

# ulimit -s
10240
# ulimit -n
256
# 

-- 设置环境变量,使用的是bash环境变量,需要设置.bash_profile@H_404_1@

-bash-3.2$ echo $SHELL
/bin/bash
-bash-3.2$

vi .bash_profile 
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1; export ORACLE_HOME
ORACLE_SID=test; export ORACLE_SID
PATH=$ORACLE_HOME/bin:$PATH; export PATH

-- 创建安装目录@H_404_1@

mkdir -p /u01/app/oracle
#mkdir /u02/oradata
chmod -R 775 /u01/app/oracle
# chown -R oracle:oinstall /u02/oradata
chmod -R 775 /u01/app/oracle
# chmod -R 775 /u02/oradata

-- 开始安装(和在Linux下安装是一样的),这里几个参数有警告,可以修复下。@H_404_1@

@H_404_1@@H_404_1@

@H_404_1@@H_404_1@

@H_404_1@@H_404_1@

安装后,dbca建库(略)@H_404_1@

登录数据库@H_404_1@

-bash-3.2$ sqlplus /nolog

sql*Plus: Release 11.2.0.4.0 Production on Sat Dec 26 10:59:30 2020

copyright (c) 1982, 2013, Oracle.  All rights reserved.

sql> conn / as sysdba
sConnected.
sql> elect banner from v$version;

BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
PL/sql Release 11.2.0.4.0 - Production
CORE    11.2.0.4.0      Production
TNS for Solaris: Version 11.2.0.4.0 - Production
NLSRTL Version 11.2.0.4.0 - Production

sql> 

END@H_404_1@

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐