Home > Database > Mysql Tutorial > body text

Linux上安装Oracle 10g客户端

WBOY
Release: 2016-06-07 17:14:52
Original
1062 people have browsed it

Linux的下的oracle客户端加起来也还不到40M,安装起来十分方便快捷。

Linux的下的Oracle客户端加起来也还不到40M,安装起来十分方便快捷。

1.首先,先看下下载完后,目录结构:

将其拷贝到linux系统里。


2.在命令行窗口里用root用户,在rpm所在目录进行操作:

rpm -ivh ....rpm

rpm -ivh ....rpm

rpm -ivh ....rpm

rpm -ivh ....rpm

(把四个rpm分别安装,先装basic的那个,其他三个随便顺序安装都可以)

3.修改tansnames.ora文件

# tnsnames.ora Network Configuration File: /home/oracle/orahome/product/10.1.0/db_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.

orcl =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.0.0)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = orcl)
    )
  )

注意:这几个地方填写的是你oracle服务器的实例名,IP为你oracle服务器的IP。

3.然后输入以下命令:

 

cd /

 

 

mkdir oracle

 

cd oracle

 

mkdir 10g

 

cd 10g

 

mkdir network

 

cd network

mkdir admin

cd amdin

(拷贝修改好的 tnsnames.ora 到这里)

4.编写一个文件,例如oracle10.profile往文件插入如下语句:

export ORACLE_HOME=/oracle/10g

export LD_LIBRARY_PATH=/usr/lib/oracle/10.1.0.3/client/lib

PATH=$PATH:$ORACLE_HOME:$LD_LIBRARY_PATH

5. source oracle10.profile(使新更改的环境变量生效),完成配置。

检验: 

  输入:sqlplus zhang/zhang@orcl   来检验是否能连接上oracle服务器。

  其中:zhang/zhang为用户名和密码   orcl为oracle服务器的实例名

linux

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template