Install the Oracle client separately in Linux

Source: Internet
Author: User

From: http://meviso.javaeye.com/blog/726448

Javama: Summary

First of all, the information searched by Baidu is junk and examples are replicated to each other. There is no reference value,

The most annoying thing is that you need to install the Oracle remote client. These dummies are mainly local.

Installing Oracle will also install the client, which does not require useless information such as group idiots, wasting people's time.

1. to remotely use Oracle, download the following three files. Note that the versions are best consistent.

 

Oracle-instantclient-basic-10.2.0.4-1.i386.zip

Oracle-instantclient-devel-10.2.0.4-1.i386.zip // This is SDK, there is no description on the file name, it is hereby stated

Oracle-instantclient-sqlplus-10.2.0.4-1.i386.zip



// Check the SQL statement of Oracle. If you cannot go up, you can only ask the remote ORACLE administrator.

Select * from V $ version;

For different versions or operating systems, go to the official website to download them, which provides detailed instructions.

Http://www.oracle.com/technology/tech/oci/instantclient/index.html

2. Create three Client installation directories, which can be customized, but must be consistent when configuring environment variables.

Mkdir-P/opt/Oracle/lib

Mkdir-P/opt/Oracle/SDK

Mkdir-P/opt/Oracle/Network/admin // configure the listener and network environment.

3. decompress the three files downloaded above.

Unzip oracle-instantclient-basic-10.2.0.4-1.i386.zip

Unzip oracle-instantclient-sqlplus-10.2.0.4-1.i386.zip

 

Both files are decompressed to the same directory in the current directory: instantclient_10_2

CD instantclient_10_2

Move all files in this directory to/opt/Oracle/lib



Decompress oracle-instantclient-devel-10.2.0.4-1.i386.zip to decompress/opt/Oracle/SDK

4. Configure environment variables.

 

VI/etc/profile // note that this is the environment variable for all users. If you want to restrict a user, you can only configure the user's configuration file.

Join

Export ORACLE_HOME =/opt/Oracle

Export LD_LIBRARY_PATH =/opt/Oracle/lib

Save and exit.

[Root @ localhost TMP] # source/etc/profile // make the configuration file take effect immediately

[Root @ localhost TMP] # echo $ ORACLE_HOME // check whether the configured environment variable is successful.

/Opt/Oracle

5. Configure the listener and network environment.

Because the Oracle database is not installed locally, you need to get three files from the directory where the Oracle database is installed.

[Root @ localhost admin] # pwd

/Opt/Oracle/Network/admin

[Root @ localhost admin] # ls

Listener. ora sqlnet. ora tnsnames. ora// Put the three files in this directory.

6. Edit three files

VI tnsnames. ora
bossdata =
(description =
(address = (Protocol = TCP) (host = 192.168.1.107) (Port = 1521) // 192.168.1.107 IP address, Port: 1521
(CONNECT_DATA =
(Server = dedicated)
(SERVICE_NAME = bossdata) // bossdata global data name
)

Extproc_connection_data =

(Description =

(Address_list =

(Address = (Protocol = IPC) (Key = extproc1 ))

)

(CONNECT_DATA =

(SID = plsextproc)

(Presentation = Ro)

)

)

VI listener. ora

Sid_list_listener =

(Sid_list =

(Sid_desc =

(Sid_name = plsextproc)

(ORACLE_HOME = \ opt \ oracle) // note that this is the $ ORACLE_HOME

(Program = EXTPROC)

)

)

Listener =

(Description_list =

(Description =

(Address = (Protocol = IPC) (Key = extproc1 ))

(Address = (Protocol = TCP) (host = 192.168.1.107) (Port = 1521) // The description above

)

)

7. Completed. Test.

 

CD \ opt \ oraclelib

[Root @ localhost lib] # sqlplus

Sqlplus: Error while loading shared libraries: libsqlplus. So: cannot open shared object file: no such file or directory

// If the above problem occurs, it means that your environment variables are not set properly. Refer to: fourth point.

[Root @ localhost lib] # sqlplus system/javama @ bossdata

SQL * Plus: Release 10.2.0.4.0-production on Sun Aug 1 12:20:08 2010

Copyright (c) 1982,200 7, Oracle. All rights reserved.

Connected:

Oracle Database 10g Enterprise Edition Release 10.2.0.1.0-Production

With the partitioning, OLAP and Data Mining options

SQL>

In this way, the test client is okay, and then install the Perl DBD.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.