本次演示是在linux环境下安装oracle11gR2客户端的操作
环境: VBox + rhel6.3+ oracle11gR2客户端
Rhel6安装包: rhel-server-6.3-x86_64-dvd.iso
oracle11gR2客户端安装包:p13390677_112040_Linux-x86-64_4of7.zip
oracle客户端安装包目录为: /oracle
一:安装linux
1)linux安装包
- Base System > Base
- Base System > Client management tools
- Base System > Compatibility libraries
- Base System > Hardware monitoring utilities
- Base System > Large Systems Performance
- Base System > Network file system client
- Base System > Performance Tools
- Base System > Perl Support
- Servers > Server Platform
- Servers > System administration tools
- Desktops > Desktop
- Desktops > Desktop Platform
- Desktops > Fonts
- Desktops > General Purpose Desktop
- Desktops > Graphical Administration Tools
- Desktops > Input Methods
- Desktops > X Window System
- Development > Additional Development
- Development > Development Tools
- Applications > Internet Browser
二:安装准备
1)建立Oracle用户和组
[root@sxclient ~]# groupadd oinstall
[root@sxclient ~]# useradd -g oinstall oracle
[root@sxclient ~]# passwd oracle
2)建立安装目录并赋权限
[root@sxclient ~]# mkdir /oracle
[root@sxclient ~]# chown -R oracle:oinstall /oracle
[root@sxclient ~]# chmod -R 775 /oracle
3)添加Oracle环境变量
[root@sxclient ~]# su – oracle
[oracle@sxclient ~]$ vi .bash_profile
export ORACLE_BASE=/oracle/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/client_1
export TNS_ADMIN=$ORACLE_HOME/network/admin
export PATH=$PATH:$ORACLE_HOME/bin
三:安装Oracle客户端
1)解压Oracle客户端,然后开始安装
[oracle@sxclient oracle]$ unzip p13390677_112040_Linux-x86-64_4of7.zip
[oracle@sxclient oracle]$ cd client/
[oracle@sxclient client]$ ./runInstaller
以管理员模式安装
跳过更新
添加了简体中文
安装路径目录
交换分区的问题,这里测试可以忽略
检查完毕,可以安装
四:配置和测试连接一台数据库服务器
1)配置$TNS_ADMIN的tnsnames.ora,连接数据库服务器
[oracle@sxclient ~]$ vi $TNS_ADMIN/tnsnames.ora
orcl =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.56.56)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = orcl)
)
)
2)测试连接成功
[oracle@sxclient ~]$ sqlplus system/xxxxxx@orcl
SQL*Plus: Release 11.2.0.4.0 Production onWed Aug 10 09:38:51 2016
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise EditionRelease 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Miningand Real Application Testing options
SQL>