Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to build oracle client on linux

2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article focuses on "how to build an oracle client on linux". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to build an oracle client on linux.

Sometimes we need to build an oracle client under the linux operating system through the following steps:

(1) download the rpm package of oracle-instantclient:

Oracle-instantclient19.3-basic-19.3.0.0.0-1.x86_64.rpm

Oracle-instantclient19.3-sqlplus-19.3.0.0.0-1.x86_64.rpm

Download address: https://www.oracle.com/database/technologies/instant-client/linux-x86-64-downloads.html

(2) install rpm package:

Rpm-ivh oracle-instantclient19.3-basic-19.3.0.0.0-1.x86_64.rpm

Rpm-ivh oracle-instantclient19.3-sqlplus-19.3.0.0.0-1.x86_64.rpm

After installation, the oracle client is installed under / usr/lib/oracle by default.

(3) set environment variables and directories.

Edit the. bash_profile file for the root user:

PATH=$PATH:$HOME/bin

Export ORACLE_HOME=/usr/lib/oracle/19.3/client64/

Export ORACLE_BASE=/usr/lib/oracle/19.3/

Export TNS_ADMIN=$ORACLE_HOME/network/admin

Export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH

PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin

Export PATH

Take effect as soon as the compilation is complete:

Source .bash _ profile

Create a directory that does not exist:

Mkdir-p $ORACLE_HOME/network/admin

(4) add tns service name

Vim $ORACLE_HOME/network/admin/tnsnames.ora

Yun_119 =

(DESCRIPTION =

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.XX.XX) (PORT = 1521))

)

(CONNECT_DATA =

(SERVER = DEDICATED)

(SERVICE_NAME = orcl)

)

)

(5) verify whether it is successful

You can also connect directly to the database:

At this point, I believe you have a deeper understanding of "how to build an oracle client on linux". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report