Home > Operation and Maintenance > Linux Operation and Maintenance > How to install oracle client on linux?

How to install oracle client on linux?

coldplay.xixi
Release: 2020-06-13 11:33:33
Original
7479 people have browsed it

How to install oracle client on linux?

#How to install oracle client on linux?

How to install the Oracle client on Linux:

1. First, download the installation package from Oracle’s official website:

http:// www.oracle.com/technetwork/database/features/instant-client/index-097480.html

Download the corresponding client according to the version of the accessed data. Each package is divided into two formats: .zip and .rpm. The zip package is equivalent to the installation-free version after decompression, while the rpm package requires the installation version.

How to install oracle client on linux?

2, install and extract to /usr/local/oracle

unzip instantclient-basic-linux.x64 -11.2.0.4.0.zip

unzip instantclient-sqlplus-linux.x64-11.2.0.4.0.zip

Generate directory /usr/local/oracle/instantclient_11_2

3, create a new directory in the above directory mkdir -p ./network/admin

Generate directory/usr /local/oracle/instantclient_11_2/network/admin

<br>

4. Create a new tnsnames.ora file in the above directory and edit the database connection information.

history_162 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.1.197.1)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SID =xxx)
    )
  )
Copy after login

5, Configure environment variables

vi .bash_profile

export ORACLE_HOME=/usr/local/oracle/instantclient_11_2
export TNS_ADMIN=$ORACLE_HOME/network/admin
##export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
export NLS_LANG=AMERICAN_AMERICA.AL32UTF8
export LD_LIBRARY_PATH=$ORACLE_HOME
export PATH=$ORACLE_HOME:$PATH
Copy after login

source .bash_profile

6, Test database connection

sqlplus username/passwd@history_162
Copy after login

Recommended Tutorial: "linux tutorial"

The above is the detailed content of How to install oracle client on linux?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
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
Latest Issues
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template