分类: Oracle
2013-04-25 08:57:32
rpm -ivh kernel-headers-2.6.18-308.el5.x86_64.rpm
rpm -ivh glibc-headers-2.5-81.x86_64.rpm
rpm -ivh glibc-devel-2.5-81.x86_64.rpm
rpm -ivh gcc-4.1.2-52.el5.x86_64.rpm
rpm -ivh compat-db-4.2.52-5.1.x86_64.rpm
rpm -ivh compat-gcc-34-3.4.6-4.1.x86_64.rpm
rpm -ivh compat-gcc-34-c++-3.4.6-4.1.x86_64.rpm
rpm -ivh libXp-1.0.0-8.1.el5.x86_64.rpm
rpm -ivh libXp-1.0.0-8.1.el5.i386.rpm
rpm -ivh glibc-devel-2.5-81.i386.rpm
ORACLE_SID=orcl
ORACLE_BASE=/oracle
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
export ORACLE_SID ORACLE_BASE ORACLE_HOME
PATH=$PATH:$ORACLE_HOME/bin:$HOME/bin
export PATH
export TNS_ADMIN=$ORACLE_HOME/network/admin
export NLS_LANG="American_America.ZHS16GBK"
1、检查所有的必须包是否安装:
rpm -q gcc make binutils openmotif setarch compat-db compat-gcc compat-gcc-c++ compat-libstdc++ compat-libstdc++-devel
没有安装的找到并安装上。
rpm -Uvh *
安装完成后仍然提示部分包没有安装,不过不影响使用
package compat-gcc is not installed
package compat-gcc-c++ is not installed
package compat-libstdc++ is not installed
package compat-libstdc++-devel is not installed
2、修改/ect/sysctl.conf
kernel.shmall = 268435456
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 4194304
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 262144
sysctl -p使设置生效
3、创建ORACLE用户及组
groupadd oinstall
groupadd dba
useradd -g oinstall -G dba oracle //属于oinstall组并支持dba组
passwd oracle
4、创建相关的目录,并确定环境变量:
[root@amd64 rh]# cd /
[root@amd64 /]# mkdir oracle
[root@amd64 /]# chown -R oracle:oinstall /oracle
[oracle@amd64 ~]$ cat .bash_pro*
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
ORACLE_SID=orcl
ORACLE_BASE=/oracle
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
export ORACLE_SID ORACLE_BASE ORACLE_HOME
PATH=$PATH:$ORACLE_HOME/bin:$HOME/bin
export PATH
DISPLAY=10.18.11.177:0.0
export DISPLAY
5、vi /etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
6、vi /etc/pam.d/login
session required /lib/security/pam_limits.so
session required /lib64/security/pam_limits.so //X86_64内核
---------------------------------------------
7、vi /etc/profile
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
8、这次runinstall非常艰苦,鼓捣了一个中午,也没休息,汗
由于redhat5默认不支持oracle10G的安装,需要修改/etc/redhat_release的版本5.5为4,即能跳过版本检查错误。
错误如下:
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2010-10-28_01-14-57PM. Please wait ...[oracle@amd64 database]$ Exception in thread "main" java.lang.UnsatisfiedLinkError: /tmp/OraInstall2010-10-28_01-14-57PM/jre/1.4.2/lib/i386/libawt.so: libXp.so.6: cannot open shared object file: No such file or directory
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(Unknown Source)
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at sun.security.action.LoadLibraryAction.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.awt.NativeLibLoader.loadLibraries(Unknown Source)
at sun.awt.DebugHelper.
at java.awt.Component.
虽然是64位的操作系统,但是安装libXp库的64位是无法解决问题的,最后试了下32位的libXp库,ok了,汗!
在安装数据库软件时,一路检测正常,但是在link时出了几个错误,continue不管,出问题时再说。
9、顺利安装完,执行dbca建库时,直接错误:
[oracle@amd64 database]$ dbca
UnsatisfiedLinkError exception loading native library: njni10
Exception in thread "main" java.lang.UnsatisfiedLinkError: get
at oracle.net.common.NetGetEnv.get(Native Method)
at oracle.net.config.Config.getNetDir(Unknown Source)
at oracle.net.config.Config.initConfig(Unknown Source)
at oracle.net.config.Config.
at oracle.sysman.assistants.util.NetworkUtils.
at oracle.sysman.assistants.util.step.StepContext.
at oracle.sysman.assistants.dbca.backend.Host.
at oracle.sysman.assistants.dbca.ui.UIHost.
at oracle.sysman.assistants.dbca.ui.InteractiveHost.
at oracle.sysman.assistants.dbca.Dbca.getHost(Dbca.java:160)
at oracle.sysman.assistants.dbca.Dbca.execute(Dbca.java:94)
at oracle.sysman.assistants.dbca.Dbca.main(Dbca.java:180)
网上搜索下,发现错误的根源在于glibc等库也需要安装32的,汗死了,先补一个glibc,再重新install软件,这次link时没有出错,ok,之后dbca正常了。经验,如果再不行,可能还需要补充其他的32位的运行库。这个oracle真够折腾人的,测试严重不足!