Solaris10上安装Oracle 11g
作者:互联网
平台: Solaris 10 X86 (在VM下测试)
RDBMS: 11.2.0.4 for solaris X86平台,64位
参考文档(官方文档写的很详细): https://docs.oracle.com/cd/E11882_01/install.112/e24351/toc.htm#i1010738
因为工作需要,在Solaris10上安装11g。
首先,看Oracle 11g官方是否支持Solaris平台。支持X86平台下的solaris10.
在VM上安装solaris 。(略)
-- 查看solaris版本
# 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的位数
# 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
Oracle Solaris 10
SUNWarc
SUNWbtool
SUNWhea
SUNWlibC
SUNWlibm
SUNWlibms
SUNWsprot
SUNWtoo
SUNWi1of
SUNWi1cs (ISO8859-1)
SUNWi15cs (ISO8859-15)
SUNWxwfnt
SUNWcsl
--检查Solaris是否已经安装了这些包,检查结果,是有2个包没有安装,需要安装
# 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: information for "SUNWi1cs" was not found
ERROR: information for "SUNWi15cs" was not found
#
把solaris安装光盘mount上,进行安装
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 information.
## Processing system information.
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 information.
## Processing system information.
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.
#
再次查看包是否已经安装,所有的包已经安装过了。
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
4.5.1 Operating system-specific patches
Installation Type or Product | Requirement |
---|---|
All installations | Patches for Oracle Solaris 10:
|
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: |
查看操作系统patch是否安装 ,这里显示结果,都已经全部安装过了。如果没有的话,需要在MOS上下载。
patchadd -p | grep 141445
-- 创建操作系统组 和 用户
# 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用户密码,这里碰到的错误
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
# 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
修改后的结果
# id -p oracle
uid=100(oracle) gid=100(oinstall) projid=100(group.dba)
#
修改资源限制 ,修改max-shm-memory 到 6 GB,修改max-sem-ids 到 256
-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
# projmod -sK "project.max-shm-memory=(privileged,2G,deny)" group.dba
#
确认最大共享内存
-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
# ulimit -s
10240
# ulimit -n
256
#
-- 设置环境变量,使用的是bash环境变量,需要设置.bash_profile
-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
-- 创建安装目录
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下安装是一样的),这里几个参数有警告,可以修复下。
安装后,dbca建库(略)
登录到数据库
-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
标签:11g,Solaris,package,##,system,Solaris10,oracle,Oracle,bash 来源: https://blog.csdn.net/xxzhaobb/article/details/111723357