linux安装oracleclient

1、准备好所须要的安装包,http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html这个网址有各种操作系统的客户端

oracle-instantclient-basic-10.2.0.5-1.i386.rpm
oracle-instantclient-devel-10.2.0.5-1.i386.rpm
oracle-instantclient-jdbc-10.2.0.5-1.i386.rpm
oracle-instantclient-sqlplus-10.2.0.5-1.i386.rpm

先安装oracle-instantclient-basic-10.2.0.5-1.i386.rpm。其它依次安装

2、创建用户、组和文件夹

[root@wxcs-2 oracle]# groupadd oinstall
[root@wxcs-2 oracle]# groupadd dba
[root@wxcs-2 oracle]# useradd -g oinstall -G dba oracle    
[root@wxcs-2 oracle]# passwd oracle
Changing password for user oracle.
New UNIX password:
BAD PASSWORD: it is based on a dictionary word
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
[root@wxcs-2 oracle]# mkdir -p /home/oracle/network/admin
[root@wxcs-2 oracle]# chown -R oracle:oinstall /home/oracle
[root@wxcs-2 oracle]# chmod -R 755 /home/oracle

// 3、将oracleserver上面的tnsnames.ora拷贝出来。放到/home/oracle/network/admin文件夹以下。

这一步骤能够不须要
4、改动环境变量

[oracle@wxcs-2 ~]$ vi .bash_profile

export ORACLE_HOME=/home/oracle
export SQLPATH=/home/oracle/network/admin
export TNS_ADMIN=/home/oracle/network/admin
export NLS_LANG="SIMPLIFIED CHINESE_CHINA.ZHS16GBK"
export LD_LIBRARY_PATH=/usr/lib/oracle/10.2.0.5/client/lib/:/usr/lib/oracle/10.2.0.5/client/lib:$LD_LIBRARY_PA
TH
export PATH=$PATH:$ORACLE_HOME:$LD_LIBRARY_PATH

[oracle@wxcs-2 ~]$ source .bash_profile 环境变量马上生效

5、能够正常连接oracleserver了

[oracle@wxcs-2 ~]$ sqlplus zhgy/zhgy@192.168.4.36/orcl

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值