Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2388800
  • 博文数量: 384
  • 博客积分: 10193
  • 博客等级: 上将
  • 技术积分: 3785
  • 用 户 组: 普通用户
  • 注册时间: 2005-06-09 18:02
文章分类

全部博文(384)

文章存档

2011年(10)

2010年(29)

2009年(39)

2008年(36)

2007年(43)

2006年(198)

2005年(29)

分类: Oracle

2006-07-19 09:36:38

Solaris 10u1下安装Oracle 10g

作者: blue_sotne@CU
E-mail: blue_stone@xinhuanet.com
转载请注明出处

1 Solaris操作系统及安装Oracle需要的操作系统软件包的安装

操作系统版本为solaris10u1 for x86, 安装时选择了“整个群组”,大小为4551.5 MB, 硬盘分了两个区
    c0t0d0s0     8.89G     用做root分区
    c0t0d0s1     1G        用做swap分区
操作系统安装完成后后使用format查看分区状况, 结果如下:

Current partition table (original):
Total disk cylinders available: 1302 + 2 (reserved cylinders)

Part      Tag    Flag     Cylinders        Size            Blocks
  0       root    wm     132 - 1292        8.89GB    (1161/0/0) 18651465
  1       swap    wu       1 -  131        1.00GB    (131/0/0)   2104515
  2     backup    wm       0 - 1301        9.97GB    (1302/0/0) 20916630
  3 unassigned    wm       0               0         (0/0/0)           0
  4 unassigned    wm       0               0         (0/0/0)           0
  5 unassigned    wm       0               0         (0/0/0)           0
  6 unassigned    wm       0               0         (0/0/0)           0
  7 unassigned    wm       0               0         (0/0/0)           0
  8       boot    wu       0 -    0        7.84MB    (1/0/0)       16065
  9 unassigned    wm       0               0         (0/0/0)           0


Oracle需要的两个软件包SUNWi1cs SUNWi15cs并没有包含在"整个群组"中, 需要手工安装. 将solaris安装光盘插入光驱后, 光盘自动挂载到/cdrom/sol1_10_106_x86目录下, 进入目录/cdrom/sol_10_106_x86/Solaris_10/Product, 运行

pkgadd -d . SUNWi1cs SUNWi15cs

安装SUNWi1cs SUNWi15cs两个软件包.

2 Oracle软件下载

下载Oracle Database 10g Release 1(10.1.0.3) for Solaris x86, 文件名为solarisx86_DB_10_1_0_3_Disk1.cpio.gz. 下载后上传到solaris服务器上, 用

gunzip solarisx86_DB_10_1_0_3_Disk1.cpio.gz
cpio -idcmv < solarisx86_DB_10_1_0_3_Disk1.cpio


解压缩, 解开cpio文档, oracle安装程序在当前目录的Disk1目录下.


3 ssh服务器端设置(可选, 如果不需要从别的机器登陆solaris机器, 则不需要进行设置)
修改Solaris机器上的/etc/ssh/sshd_config文件,将

PermitrootLogin no

修改为

PermitrootLogin yes

然后重新启动ssh服务

svcadm disable ssh
svcadm enable ssh

这样允许从别的机器上使用ssh以root身份登陆到服务器. 


4 安装前的检查

检查系统内存, 安装Oracle数据库需要至少512M, 我的机器只有400M内存, 也可以正常安装.

# /usr/sbin/prtconf | grep "Memory size"
Memory size: 400 Megabytes

检查swap分区, 需要1G或更多

# swap -s
total: 46012k bytes allocated + 7668k reserved = 53680k used, 1312412k available

检查磁盘空间, /tmp上需要至少400M, 放置oracle程序文件和数据文件的分区至少有3G空闲空间.

# df -h
Filesystem             size   used  avail capacity  Mounted on
/dev/dsk/c1t0d0s0      8.8G   3.0G   5.7G    35%    /
/devices                 0K     0K     0K     0%    /devices
ctfs                     0K     0K     0K     0%    /system/contract
proc                     0K     0K     0K     0%    /proc
mnttab                   0K     0K     0K     0%    /etc/mnttab
swap                   1.2G   624K   1.2G     1%    /etc/svc/volatile
objfs                    0K     0K     0K     0%    /system/object
/usr/lib/libc/libc_hwcap1.so.1
                       8.8G   3.0G   5.7G    35%    /lib/libc.so.1
fd                       0K     0K     0K     0%    /dev/fd
swap                   1.2G     0K   1.2G     0%    /tmp
swap                   1.2G    24K   1.2G     1%    /var/run

检查操作系统版本, oracle 10gR1 for solaris (x86)支持solaris 8, 9, 目前solaris 10还没有通过认证.

# uname -r
5.10

检查需要的软件包, 使用的命令

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

运行过程:

#  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


5 设置Solaris 内核变量
将如下内容添加到/etc/system文件末尾, 并重新启动机器

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_shmmni=100

6 创建Oracle需要的用户组, 用户, 软件安装目录

groupadd oinstall
groupadd dba
useradd -g oinstall -G dba -d /oracle -s /usr/bin/bash oracle
mkdir /oracle
chown -R oracle:oinstall /oracle
mkdir -p /u01/app/oracle
chown -R oracle:oinstall /u01/app/oracle
passwd oracle

创建完成后使用id -a 检查oracle用户和nobody用户

# id -a oracle
uid=100(oracle) gid=100(oinstall) groups=101(dba)
# id -a nobody
uid=60001(nobody) gid=60001(nobody) groups=60001(nobody)

7 设置oracle用户环境变量.
以oracle用户登陆, 在/oracle目录下建立文件.profile, 内容如下

ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=$ORACLE_BASE/product/10.1.0/db
PATH=$PATH:$ORACLE_HOME/bin
ORACLE_SID=orcl
export ORACLE_BASE ORACLE_HOME ORACLE_SID PATH 


8 安装Oracle 10g

由于oracle 10g 不支持solaris 10, 我们需要修改Disk1/install下的 oraparam.ini和oraparam.var文件,在将

Solaris=5.8,5.9

修改为

Solaris=5.8,5.9,5.10


以oracle用户登陆, 运行runInstaller安装Oracle数据库. 安装过程与其他平台基本相同.


阅读(2873) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~