天道酬勤

Oracle and My Life

Install oracle 10.2 on Solaris10

leave a comment

通过自己做的实验在安装之前我觉得有必要介绍一下solaris分区:
/
swap (=/tmp 参考Solaris 下Swap分区介绍)
/export/home
/u01
1.记录一下10R2在Solaris10上的安装步骤:
系统需求检查:

# /usr/sbin/prtconf | grep "Memory size"
Memory size: 16384 Megabytes
# /usr/sbin/swap -s
total: 56936k bytes allocated + 4840k reserved = 61776k used, 32556464k available
# df -h /tmp
Filesystem size used avail capacity Mounted on
swap 31G 0K 31G 0% /tmp
# df -h /u01
Filesystem size used avail capacity Mounted on
/dev/dsk/c1t1d0s0 134G 65M 133G 1% /ora10g

内存最小要求是1G。
swap的最小空间与内存大小有关,内存1G,则swap为内存的2倍,内存小于2G,则swap为内存的1.5倍,内存小于8G,swap和内存相等,内存大于8G,则swap为内存的0.75倍。
/tmp目录需要至少400M以上的空间。
安装目录至少需要2G以上的空间来安装软件。

2.检查系统和系统包、字体包的安装情况:

# /bin/isainfo -kv
64-bit sparcv9 kernel modules
# uname -r
5.10

根据oracle的官方安装文档,要先安装package:SUNWi1cs,SUNWi15cs。在solaris的安装光盘上找到安装包之后,然后复制到/var/spool/pkg ,用命令:
#pkgadd -d /var/spool/pkg SUNWi15cs
出现以下错误:
pkgadd: ERROR: no packages were found in
直接使用pkgadd指令後,找到要裝的SUNWi1cs,SUNWi15cs直接安裝即可。

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

3.满足安装Oracle的最小要求后,就可以创建使用root用户来设置系统参数并创建Oracle用户了。
在/etc/system文件后面添加下面内容:

set semsys:seminfo_semmni=100
set semsys:seminfo_semmsl=256
set semsys:seminfo_semmns=1024
set semsys:seminfo_shmmax=1024000000
set semsys:seminfo_shmmni=100
set semsys:seminfo_shmmni=100
set semsys:seminfo_shmseg=10
set semsys:seminfo_shmmin=1
set noexec_user_stack=1

这是对系统内存参数的调整,修改完毕后重新操作系统。

-bash-3.00# more /etc/hosts
# Internet host table
::1     localhost
127.0.0.1       localhost      localhost.localdomain
192.168.0.34    sunDB          sunDB.net
# mkdir /export/home/oracle
# groupadd oinstall
# groupadd dba
# useradd -g oinstall -G dba -d /export/home/oracle -m -s /usr/bin/bash oracle
# passwd oracle
New Password:
Re-enter new Password:
passwd: password successfully changed for oracle
# chown -R oracle:oinstall /export/home/oracle
# chown –R oracle:oinstall /u01
# chmod –R 775 oracle:oinstall /export/home/oracle
#chmod –R 775 /u01
# id nobody
uid=60001(nobody) gid=60001(nobody)

4.创建完用户、组,并对相应的目录进行授权后,root用户的工作结束,切换到oracle用户。注意,如果nobody用户不存在,可以通过useradd增加用户。

# su - oracle
$ vi .profile

编辑.prifle文件,添加下列内容:

/usr/bin/stty erase ^H
umask 022
ORACLE_HOSTNAME=sunDB.net
export ORACLE_HOSTNAME
ORACLE_SID=sol10g
export ORACLE_SID
ORACLE_BASE=/u01/oracle
export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/10.2.0
export ORACLE_HOME
ORACLE_TERM=xterm
export ORACLE_TERM
PATH=$PATH:$ORACLE_HOME/bin:/usr/bin:/usr/ccs/bin:/etc:/usr/openwin/bin
export PATH
NLS_LANG="SIMPLIFIED CHINESE_CHINA.ZHS16GBK"
export NLS_LANG
DISPLAY=192.168.0.34:0.0
export DISPLAY

由于使用XManager,因此设置DISPLAY为IP:0.0。然后建立所需安装路径:

$ mkdir -p /u01/oracle/product/10.2.0
$chown -R  oracle:oinstall /u01/oracle
$chmod -R 775 /u01/oracle
$chown -R oracle:oinstall /u01/oracle/product/10.2.0
$chmod -R 775 /u01/oracle/product/10.2.0

使用XManager用root登陆,执行

# xhost 192.168.0.34
192.168.0.34 being added to access control list
# su - oracle

进入disk1目录,执行./runInstaller,进入Oracle的安装图形界面提示输入相应的信息一路NEXT就可以了。
当软件安装结束后,会提示以root执行$ORACLE_BASE/oraInventory/orainstRoot.sh和$ORACLE_HOME/root.sh脚本,执行后,点击ok,Oracle软件部分就安装完成了。
dbca在建库时出现ora-27102 out of memory的错误的解决办法:
更改一下建库条件则可,SGA不要选“按作用内存的比例”分配
sga大小为160m
当sql>startup时出现:
Re: Solaris 10, Oracle 10g and ORA-27102 out of memory
vi $ORACLE_HOME/dbs/init.ora.*
把sga的值改为270 即可

TNSNAME和LISTENER配置步骤很简单,就不描述了。

Written by ochef

March 4th, 2009 at 9:57 pm

Posted in Database,Operating System

Tagged with , , ,

Leave a Reply

无觅相关文章插件,快速提升流量