测试在CENTOS X64 6.2 上安装ORACLE 11g client
1、Mini Desktop 安装系统,选择开发包。
2、检测oracle客户端需要的包(灰色表示系统中已存在,红色需要另安装到系统中)以下必装包是官上列出来的
binutils-2.17.50.0.6
compat-libstdc++-33-3.2.3
compat-libstdc++-33-3.2.3 (32 bit)
yum install compat-libstdc++-33* compat-libstdc++-33*68*
elfutils-libelf-0.125
elfutils-libelf-devel-0.125
gcc-4.1.2
gcc-c++-4.1.2
glibc-2.5-24
glibc-2.5-24 (32 bit)
glibc-common-2.5
glibc-devel-2.5
glibc-devel-2.5 (32 bit)
1
|
yum install glibc-devel-
2
.*
68
*
|
libaio-0.3.106
libaio-0.3.106 (32 bit)
1
|
yum install libaio-
0
*
68
*
|
libaio-devel-0.3.106
libaio-devel-0.3.106 (32 bit)
1
|
yum install libaio-devel-
0
*
68
*
|
libgcc-4.1.2
libgcc-4.1.2 (32 bit)
libstdc++-4.1.2
需用YUM升级成 libstdc++ 4.4.7-4.el6
否则4.4.6版与686版4.4.7有冲突
Error: Protected multilib versions: libstdc++-4.4.7-4.el6.i686 != libstdc++-4.4.6-3.el6.x86_64
libstdc++-4.1.2 (32 bit)
1
|
yum install libstdc++-
4
*
68
*
|
libstdc++-devel 4.1.2
make-3.81
sysstat-7.0.2
unixODBC-2.2.11
unixODBC-2.2.11 (32 bit)
unixODBC-devel-2.2.11
unixODBC-devel-2.2.11 (32 bit)
1
2
3
|
yum
install
unixODBC-2*6*
yum
install
unixODBC-2*68*
yum
install
unixODBC-devel-2*68*
|
3、更改主机名(必须,否则会出现问题,更改两个文件/etc/hosts和/etc/sysconfig/network)
否则安装到一半时会出现Oracle Net Services错误,无法安装完毕。
或者运行netca时出现以下错误:
配置:
#
# An unexpected error has been detected by HotSpot Virtual Machine:
# SIGSEGV (0xb) at pc=0xa43ea4d4, pid=4341, tid=3086784720
# Java VM: Java HotSpot(TM) Client VM (1.5.0_17-b02 mixed mode)
Problematic frame:
C [libnnz11.so+0x3c4d4]
## An error report file with more information is saved as hs_err_pid4341.log
## If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
#/u01/oracle/bin/netca: line 178: 4341 已放弃 JREJRE_OPTIONS -classpath CLASSPATHoracle.net.ca.NetCA*
4、建立相关用户及相应的目录
1
2
3
4
5
6
7
8
|
# /usr/sbin/groupadd oinstall
# /usr/sbin/groupadd dba
# /usr/sbin/useradd -g oinstall -G dba oracle
# id oracle ( 检查用户名)
# passwd oracle (设置Oracle用户的密码)
# mkdir -p /u01/app
# chown -R oracle:oinstall /u01/app/
# chmod -R 775 /u01/app
|
5、编辑.bash_profile (oracle HOME目录下)
1
2
3
4
5
6
7
|
export
NLS_LANG=AMERICAN_AMERICA.UTF8
export
LANG=en_US.UTF-8 (目的是防止sqlplus乱码)
ORACLE_BASE=
/u01/app/oracle
ORACLE_HOME=$ORACLE_BASE
/product/11
.2.0
/client_1
DISPLAY=:0.0
PATH=$ORACLE_HOME
/bin
:$PATH
export
ORACLE_BASE ORACLE_HOME DISPLAY PATH
|
6、测试并进行安装
1
2
3
4
5
6
7
8
9
|
[oracle@sevencentos ~]$
source
.bash_profile
[oracle@sevencentos ~]$
echo
$ORACLE_HOME 检查一下变量是否生效
/u01/app/oracle/product/11
.2.0
/client_1
解压linux.x64_11gR2_client.zip
$unzip linux.x64_11gR2_client.zip
$
cd
client
[oracle@sevencentos client]$
ls
[oracle@sevencentos client]$ .
/runInstaller
完装完后,运行netca进行远程数据库配置
|