Solaris10 x86 u1 下安装 Oracle 10g Release 2

本文详细介绍了在Solaris10 x86环境下安装Oracle 10g Release 2的过程,包括系统环境检查、软件包安装、用户及目录配置、内核参数调整等关键步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Solaris10 x86 u1 下安装 Oracle 10g Release 2

操作环境
Dell 2850
Solaris 10 x86 u1
Oracle 10g Release 2
Bash shell

综合知识
Solaris 10 x86 u1会在Dell 2850下以64位模式运行。
Oracle 10g Release 2就是64位架构

参考资料
安装文件10201_database_solx86_64.zip内的帮助文档
http://www.dbspecialists.com/presentations/oracle10gsolaris.html
http://download-west.oracle.com/docs/html/B13972_01/toc.htm

下载文件
http://www.oracle.com/technology/software/products/database/oracle10g/index.html
注册后点击
Oracle Database 10g Release 2 (10.2.0.1.0) for Solaris Operating System (x86-64)
下载
10201_database_solx86_64.zip

检查系统环境
确保系统可以运行图形界面或可以远程运行图形界面,在此使用的远程桌面是X Manager 2.0
打开XBrowser,输入服务器的IP地址即可连上。

查看系统版本(要求5.10 64-bit)
# uname -a
SunOS javasvr 5.10 Generic_118844-26 i86pc i386 i86pc
# isainfo -kv
64-bit amd64 kernel modules

查看物理内存(要求512MB以上,按具体情况)
# /usr/sbin/prtconf | grep "Memory size"
Memory size: 2048 Megabytes

查看交换文件(要求1G以上)
# /usr/sbin/swap -l
swapfile dev swaplo blocks free
/dev/dsk/c0t0d0s1 55,65 8 4192952 4192952

临时文件空间(要求400M以上)
# df -h /tmp
Filesystem size used avail capacity Mounted on
swap 3.1G 8K 3.1G 1% /tmp

这里的物理内存为2G,理论上为2G*1.5=3G合适,这里再添加512MB

创建一个512MB的交换文件:
# mkfile 512M /export/home/swapone

添加刚创建的交换文件:
# swap -a /export/home/swapone

检查一下:
# swap -l
swapfile dev swaplo blocks free
/dev/dsk/c0d0s1 102,1 8 1056376 1056376
/export/home/swapone - 8 1048568 1048568

下面设置交换文件在重启后自动加载使用:
# vi /etc/vfstab
/export/home/swapone - - swap - no -

查看硬盘空间(要求3.7G以上)
df -h
Filesystem size used avail capacity Mounted on
/dev/dsk/c0t0d0s0 29G 3.1G 25G 12% /
......
swap 3.1G 636K 3.1G 1% /etc/svc/volatile
......
/dev/dsk/c0t0d0s7 27G 6.3G 20G 24% /export/home

查看以下软件包是否存在
# 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 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
ERROR: information for "SUNWi1cs" was not found
ERROR: information for "SUNWi15cs" was not found

这里需要安装两个包:SUNWi1cs和SUNWi15cs

这里从下载的安装镜像文件安装

加载存放镜像文件分区
# mkdir /mnt/storage
# mount -F pcfs /dev/dsk/c0t0d0p4:1 /mnt/storage

以块设备加载镜像文件
# lofiadm -a /mnt/storage/solaris10/sol-10-u1-ga-x86-dvd.iso
/dev/lofi/1
# mount -F hsfs -o ro /dev/lofi/1 /mnt/isoimg

安装这两个包
# pkgadd -d /mnt/isoimg/Solaris_10/Product SUNWi1cs
# pkgadd -d /mnt/isoimg/Solaris_10/Product SUNWi15cs

卸载加载的文件
# umount /mnt/isoimg/
# lofiadm -d /dev/lofi/1
# umount /mnt/storage/

由于使用的Solaris 10 u1比较新,就不打补丁了。


创建用户和组

需要创建两个组oinstall和dba,两个用户oracle和nobody

先查看是否已存在
# grep oinstall /etc/group
# grep dba /etc/group
# id -a oracle
# id -a nobody
uid=60001(nobody) gid=60001(nobody) groups=60001(nobody)

创建组
# groupadd oinstall
# groupadd dba

创建用户
# useradd -g oinstall -G dba -d /export/home/oracle -s /usr/bin/bash -c 'Oracle software owner' -m oracle
# id -a oracle
uid=107(oracle) gid=104(oinstall) groups=105(dba)

设置密码
# passwd oracle
***

创建所需目录

需要创建两个目录oracle和oradata,一个用来存储程序文件,一个用来存储数据文件

查看磁盘空间
# df -kh

创建目录oracle(需要3G以上)
# mkdir -p /opt/oracle
# chown -R oracle:oinstall /opt/oracle
# chmod -R 775 /opt/oracle

创建目录oradata(需要1.2G以上)
# mkdir -p /export/home/oradata
# chown -R oracle:oinstall /export/home/oradata
# chmod -R 775 /export/home/oradata

调整内核参数

备份配置文件
# cp /etc/system /etc/system.orig

修改配置文件,添加如下几行
# vi /etc/system
* for install oracle 10g
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

重启系统
# reboot

准备安装文件

解压安装文件:
# unzip 10201_database_solx86_64.zip
得到文件夹database

配置环境参数

用oracle登录
# su - oracle

设置环境参数
# vi .profile
umask 022
ORACLE_BASE=/opt/oracle
ORACLE_SID=cdtdb
export ORACLE_BASE ORACLE_SID

重新登录查看
-bash-3.00$ umask
0022
# env | more
-bash-3.00$ env | more
......
ORACLE_SID=cdtdb
ORACLE_BASE=/opt/oracle
......

开始安装过程

用Xmanager登录到服务器
用oracle用户

运行database目录下的runInstaller

Select Installation Method
Advanced Installation

Specify Inventory directory and credentials
/opt/oracle/oraInventory
oinstall

Select Installation Type
Enterprise Edition

Sepcify Home Details
Name: OraDb10g_home1
Path: /opt/oracle/oracle/product/10.2.0/db_1

Product-Specific Prerequisite Checks
全部通过即可!

Select Configuration Option
Create a database

Select Database Configuration
General Purpose

Specify Database Configuration Options
Global Database Name:cdtdb SID:cdtdb
Select Database Character set: Simplified Chinese ZHS16GBK
选中Create database with sample schemas

Select Database Management Option
选中Use Database Control for Database Management
Enable Email Notification
61.144.43.235
chenliqun@pyp.edu.cn

Specify Database Storage Option
选中File System
location:/export/home/oradata

Specify Backup and Recovery Options
选中Do not enable Automated backups

Specify Database Schema Passwords
统一使用一个密码:***

Summary

Execute Configuration Scripts
按照提示,用root用户运行脚本

安装完成!

安装日志:
/opt/oracle/oracle/product/10.2.0/db_1/cfgtoollogs/dbca/cdtdb

iSQL*Plus URL:
http://192.168.200.11:5560/isqlplus

iSQL*Plus DBA URL:
http://192.168.200.11:5560/isqlplus/dba

Enterprise Manager 10g Database Control URL:
http://192.168.200.11:1158/em
用sys用户以sysdba身份登录

完成服务配置

用oracle登录
# su - oracle

修改配置文件
# vi .profile
stty istrip
PS1='# '
umask 022
MAIL=/usr/mail/${LOGNAME:#}
PATH=/usr/bin:/usr/sbin:/usr/sadm/bin:/usr/sfw/bin:/usr/local/bin:/usr/ucb:/etc:.
ORACLE_SID=cdtdb
ORAENV_ASK=NO
ORACLE_BASE=/opt/oracle
export PS1 PATH ORACLE_BASE ORACLE_SID ORAENV_ASK
. oraenv

正确配置数据库实例入口
# vi /var/opt/oracle/oratab
cdtdb:/opt/oracle/oracle/product/10.2.0/db_1:Y

创建自动运行脚本
# vi /etc/init.d/oracle
#!/bin/sh
ORA_HOME=/opt/oracle/oracle/product/10.2.0/db_1
ORA_OWNER=oracle
if [ ! -f $ORA_HOME/bin/dbstart ]
then
echo "Oracle startup: cannot start"
exit
fi
case "$1" in
'start') # Start the Oracle databases and listeners
su - $ORA_OWNER -c "$ORA_HOME/bin/dbstart"
su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl start"
su - $ORA_OWNER -c "$ORA_HOME/bin/emctl start dbconsole"
su - $ORA_OWNER -c "$ORA_HOME/bin/isqlplusctl start"
;;
'stop') # Stop the Oracle databases and listeners
su - $ORA_OWNER -c "$ORA_HOME/bin/isqlplusctl stop"
su - $ORA_OWNER -c "$ORA_HOME/bin/emctl stop dbconsole"
su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl stop"
su - $ORA_OWNER -c "$ORA_HOME/bin/dbshut"
;;
esac

建立符号连接
# ln -s /etc/init.d/oracle /etc/rc2.d/S99oracle
# ln -s /etc/init.d/oracle /etc/rc0.d/K10oracle
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值