一、CentOS oracle过程安装选择Server类型,安装的的包:
1、Development Tools
2、Legacy Software Development
把包全部选上;
及一些 config tools
没有安装X windows等(在下面需要另外安装 xorg-x11)
二、安装所需的包,按顺序先后:
rpm -ihv xorg-x11-xfs-utils-1.0.2-4.i386.rpm
rpm -ihv alsa-lib-devel-1.0.17-1.el5.i386.rpm
rpm -ihv zlib-devel-1.2.3-3.i386.rpm
rpm -ihv freetype-devel-2.2.1-21.el5_3.i386.rpm
rpm -ihv fontconfig-devel-2.4.1-7.el5.i386.rpm
rpm -ihv audiofile-devel-0.2.6-5.i386.rpm
rpm -ihv esound-devel-0.2.36-3.i386.rpm
rpm -ihv libaio-devel-0.3.106-3.2.i386.rpm
rpm -ihv libXp-1.0.0-8.1.el5.i386.rpm
rpm -ihv libXau-devel-1.0.1-3.1.i386.rpm
rpm -ihv libXp-devel-1.0.0-8.1.el5.i386.rpm
rpm -ihv glib-1.2.10-20.el5.i386.rpm
rpm -ihv glib-devel-1.2.10-20.el5.i386.rpm
rpm -ihv openmotif21-2.1.30-9.RHEL3.8.i386.rpm
rpm -ihv compat-libcwait-2.1-1.i386.rpm
rpm -ihv compat-gcc-32-3.2.3-47.3.i386.rpm.rpm
rpm -ihv compat-gcc-32-c++-3.2.3-47.3.i386.rpm.rpm
rpm -ihv compat-db-4.2.52-5.1.i386.rpm
rpm -ihv compat-libgcc-296-2.96-138.i386.rpm
rpm -ihv compat-oracle-rhel4-1.0-5.i386.rpm
三,建组和用户
groupadd oinstall
groupadd dba
useradd -g oinstall -G dba oracle
passwd oracle 新建密码
四,设置初始化
1、进入oracle
su - oracle
vi .bash_profile
内容如下:
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
export ORACLE_BASE=/data/oracle9i
export ORACLE_OWNER=oracle
export ORACLE_HOME=/data/oracle9i/product/9.2.0
export ORACLE_SID=oracle
export ORACLE_TERM=xterm
export TNS_ADMIN=$ORACLE_HOME/network/admin
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib
export PATH=$PATH:$ORACLE_HOME/bin
CLASSPATH=$CLASSPATH:$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib:
$ORACLE_HOME/network/jlib
export CLASSPATH
PATH=$PATH:$HOME/bin
export PATH
2,source .bash_profile;
3,在root账户下mkdir -p /data/oracle9i/product/9.2.0/
4,解压安装包并放在/home/oracle/setup/下:
zcat ship_9204_linux_disk1.cpio.gz | cpio -idmv
zcat ship_9204_linux_disk2.cpio.gz | cpio -idmv
zcat ship_9204_linux_disk3.cpio.gz | cpio -idmv
5,设置vnc登陆安装
在oracle帐号下执行:vncserver
会生成 .vnc文件夹
修改里面的xstartup文件
内容如下:
#!/bin/sh
# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#twm &
/usr/bin/gnome-session &
保存
kill掉现有vncserver
重新输入vncserver
就可以了;
五,安装oracle
用vnc以oracle帐号连入,进入Disk1,执行runInstaller
通常情况会出现以下错误:
Initializing java Virtual Machine from /tmp/OraInstall2011-06-17_11-22-33PM/jre/bin/java. Please wait...
/tmp/OraInstall2011-06-17_11-22-33PM/jre/bin/i386/native_threads/java: error while loading shared libraries: libstdc++-libc6.1-1.so.2: cannot open shared object file: No such file or directory
解决办法:
rpm -Uvh compat-libstdc++-33-3.2.3-61.i386.rpm
warning: compat-libstdc++-33-3.2.3-61.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
package compat-libstdc++-33-3.2.3-61 is already installed
因为java需要
libstdc++-libc6.1-1.so.2动态库,于是在
linux下边做了个ln:
ln -s /usr/lib/libstdc++-libc6.2-2.so.3 /usr/lib/libstdc++-libc6.1-1.so.2
继续安装,
./runInstaller
[oracle@localhost Disk1]$ Initializing Java Virtual Machine from /tmp/OraInstall2008-02-26_11-49-10PM/jre/bin/java. Please wait...
Error occurred during initialization of VM
Unable to load native library: /tmp/OraInstall2008-02-26_11-49-10PM/jre/lib/i386/libjava.so: symbol __libc_wait, version GLIBC_2.0 not defined in file libc.so.6 with link time reference
到http://www.opennet.ru/soft/ora_inst/下载
p3006854_9204_LINUX.zip
开始安装9.2.0
运行runInstaller之前,需要打补丁3006854: 注意,必须以root身份运行.
# unzipp3006854_9204_LINUX.zip
会在当前目录下创建一个目录,进入到该目录中
# cd 3006854
# ./rhel3_pre_install.sh
如果报告如下错误:
-bash: ./rhel3_pre_install.sh: Permission denied
修改一下权限就可以了:
# chmod +x *.sh
然后就可以运行runInstaller安装. 操作过程
1、执行runInstaller
2、
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,进入:/data/oracle9i/product/9.2.0/bin
执行 ./dbca
出现错误:
解决方法:
rm -rf /data/oracle9i/product/9.2.0/JRE
ln -s /data/oracle9i/jre/1.3.1 /data/oracle9i/product/9.2.0/JRE
ln -s /data/oracle9i/jre/1.3.1/ /data/oracle9i/JRE
ln -s /data/oracle9i/JRE/bin/java /data/oracle9i/JRE/bin/jre
ln -s /data/oracle9i/JRE/bin/i386/native_threads/java /data/oracle9i/JRE/bin/i386/native_threads/jre
好了,继续: ./dbca
出来了:
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
本文出自 “mojo” 博客,谢绝转载!