系统环境:Solaris 10 x86 oracle版本:oracle 10gR2
安装过程分以下四个步骤
一,安装准备 二,下载安装 三,相关设置 四,常见错误
一,安装准备 1,创建oracle用户 以root用户登录,创建oracle用户以及其所属的dba组
su -
# groupadd dba
# useradd -G dba -m -d /export/home/oracle -s /usr/bin/bash oracle
2,设置系统参数
编辑 /etc/system 文件添加下行
set noexec_user_stack=1
执行下面命令
# projadd -U oracle -K "project.max-shm-memory=(priv,4g,deny)" user.oracle
# projmod -sK "project.max-sem-nsems=(priv,256,deny)" user.oracle
# projmod -sK "project.max-sem-ids=(priv,100,deny)" user.oracle
# projmod -sK "project.max-shm-ids=(priv,100,deny)" user.oracle
可以通过"prctl -i project user.oracle" 命令对配置进行检查
3,创建oracle目录
# mkdir /opt/oracle
# mkdir /opt/oracle/102
# chown -R oracle:dba /opt/oracle
4,设置oracle环境变量
编辑 /home/oracle/.bash_profile 并添加下列行:
ORACLE_BASE=/opt/oracle
ORACLE_HOME=$ORACLE_BASE/102
ORACLE_SID=ORA10GR2
LD_LIBRARY_PATH=$ORACLE_HOME/lib
PATH=$PATH:/usr/local/bin:/usr/ccs/bin:/usr/sfw/bin:$ORACLE_HOME/bin
export ORACLE_BASE ORACLE_HOME ORACLE_SID LD_LIBRARY_PATH PATH
保存后通过下面命令是配置生效
su - oracle
cd /export/home/oracle
. .bash_profile
二,下载安装
1,下载并安装需要的rpm软件包
检查软件包安装情况:
pkginfo -i SUNWlibms SUNWtoo SUNWi1cs SUNWi15cs SUNWxwfnt SUNWxwplt SUNWmfrun SUNWxwplr SUNWxwdv SUNWgcc SUNWbtool SUNWi1of SUNWhea SUNWlibm SUNWsprot SUNWuiu8
安装软件包:
# pkgadd -d . SUNWlibms SUNWtoo SUNWi1cs SUNWi15cs SUNWxwfnt SUNWxwplt SUNWmfrun SUNWxwplr SUNWxwdv SUNWgcc SUNWbtool \
SUNWi1of SUNWhea SUNWlibm SUNWsprot SUNWuiu8
2,下载oracle 10g
下载地址:http://www.oracle.com/technology/software/products/database/oracle10g/htdocs/10202solx86soft.html 解压安装包
unzip 10202_database_solx86.zip
3,开始oracle的安装
cd database
./runInstaller
三,相关配置
1,以root用户执行下面脚本
# /opt/oracle/oraInventory/orainstRoot.sh
# /opt/oracle/102/root.sh
四,常见错误
1,错误:Unable to convert from “UTF-8” to “646” for NLS!
安装软件包 SUNWuiu8
2,错误:Checking monitor: must be configured to display at least 256 colors »> Could not execute auto check for display colors using command /usr/openwin/bin/xdpyinfo. Check if the DISPLAY variable is set. Failed «« Some requirement checks failed. You must fulfill these requirements before continuing with the installation,at which time they will be rechecked.
安装SUNWxwplt 软件包,并设置DISPLAY参数,并以root用户执行”xhost +“命令
3,错误:Exception in thread “main” java.lang.UnsatisfiedLinkError: … libmawt.so: ld.so.1: java: fatal: libXm.so.4: open failed: No such file or directory
安装SUNWmfrun软件包
4,错误:Can’t load ‘/usr/perl5/5.8.4/lib/i86pc-solaris-64int/auto/Sun/Solaris/Project/Project.so’ for module Sun::Solaris::Project: ld.so.1: perl: fatal: libpool.so.1: open failed: No such file or directory at /usr/perl5/5.8.4/lib/i86pc-solaris-64int/DynaLoader.pm line 230. at /usr/sbin/projadd line 19 Compilation failed in require at /usr/sbin/projadd line 19. BEGIN failed–compilation aborted at /usr/sbin/projadd line 19.
安装 SUNWpool SUNWpoolr 软件包