|
Download the following files from the Oracle Instant Client.
- Choose Version: Version 11.1.0.6.0
- Instant Client Package - Basic: basic.zip
- Instant Client Package - SQL*Plus: sqlplus.zip
- Instant Client Package - SDK: sdk.zip
Login to the Monitor Server
Setting Environment variables:
Create a new file in /etc/profile.d call it check_oracle.sh
check_oracle.sh:
ORACLE_HOME=/opt/oracle/instantclient_11_1
TNS_ADMIN=/opt/oracle/instantclient_11_1/network/admin
LD_LIBRARY_PATH=/opt/oracle/instantclient_11_1
export ORACLE_HOME TNS_ADMIN LD_LIBRARY_PATH
Disconnect from the server and login again or type:
<shell># . /etc/profile.d/check_oracle.sh
Verify that your environment parameters is correct:
<shell># echo $ORACLE_HOME
<shell># echo $TNS_ADMIN
<shell># echo $LD_LIBRARY_PATH
If everything is looking OK we install "Oracle Instant Client"
<shell># mkdir -p $TNS_ADMIN
<shell># cd /opt/oracle
<shell># unzip /root/basic.zip
<shell># unzip /root/sqlplus.zip
<shell># unzip /root/sdk.zip
<shell># ln -s $ORACLE_HOME/sqlplus /usr/bin/sqlplus
<shell># touch $TNS_ADMIN/sqlnet.ora
<shell># touch $TNS_ADMIN/tnsnames.ora
Edit your tnsnames.ora according to your Oracle Environment. (Ask your Oracle Admin for help)
sample tnsnames.ora:
OP5= (DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)
(HOST = oracle.int.op5.se)(PORT = 1521)))
(CONNECT_DATA =
(SID = op5)))
If everything works OK you should be able to connect to you db with the following command.
<shell># sqlplus <user>/<password>@op5
|