[Oracle]: SQL*Plus Client installation (sqlplus)

[root@ip-10-0-0-67 ~]# cd /home/ec2-user/
[root@ip-10-0-0-67 ec2-user]# ll -lhtr
total 100M
-rw-r–r–. 1 root root 95M Feb 24 2012 ycsb-0.1.4.tar.gz
-rw-rw-r–. 1 ec2-user ec2-user 809K Jul 7 03:57 oracle-instantclient11.2-sqlplus-11.2.0.4.0-1.x86_64.rpm
[root@ip-10-0-0-67 ec2-user]#
[root@ip-10-0-0-67 ec2-user]#
[root@ip-10-0-0-67 ec2-user]#
[root@ip-10-0-0-67 ec2-user]#
[root@ip-10-0-0-67 ec2-user]#
[root@ip-10-0-0-67 ec2-user]#
[root@ip-10-0-0-67 ec2-user]#
[root@ip-10-0-0-67 ec2-user]# rpm -ivh oracle-instantclient11.2-sqlplus-11.2.0.4.0-1.x86_64.rpm
error: Failed dependencies:
oracle-instantclient11.2-basic >= 11.2.0.4.0 is needed by oracle-instantclient11.2-sqlplus-11.2.0.4.0-1.x86_64
[root@ip-10-0-0-67 ec2-user]#
[root@ip-10-0-0-67 ec2-user]#
[root@ip-10-0-0-67 ec2-user]# ll -lhtr
total 157M
-rw-r–r–. 1 root root 95M Feb 24 2012 ycsb-0.1.4.tar.gz
-rw-rw-r–. 1 ec2-user ec2-user 809K Jul 7 03:57 oracle-instantclient11.2-sqlplus-11.2.0.4.0-1.x86_64.rpm
-rw-rw-r–. 1 ec2-user ec2-user 58M Jul 8 05:38 oracle-instantclient11.2-basic-11.2.0.4.0-1.x86_64 (2).rpm
[root@ip-10-0-0-67 ec2-user]#
[root@ip-10-0-0-67 ec2-user]# rpm -ivh oracle-instantclient11.2-basic-11.2.0.4.0-1.x86_64\ \(2\).rpm
error: Failed dependencies:
libaio is needed by oracle-instantclient11.2-basic-11.2.0.4.0-1.x86_64
[root@ip-10-0-0-67 ec2-user]#
[root@ip-10-0-0-67 ec2-user]# yum install libaio
Loaded plugins: amazon-id, rhui-lb
Resolving Dependencies
–> Running transaction check
—> Package libaio.x86_64 0:0.3.109-12.el7 will be installed
–> Finished Dependency Resolution

Dependencies Resolved

========================================================================================================================================================================
Package Arch Version Repository Size
========================================================================================================================================================================
Installing:
libaio x86_64 0.3.109-12.el7 rhui-REGION-rhel-server-releases 24 k

Transaction Summary
========================================================================================================================================================================
Install 1 Package

Total download size: 24 k
Installed size: 38 k
Is this ok [y/d/N]: y
Downloading packages:
libaio-0.3.109-12.el7.x86_64.rpm | 24 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : libaio-0.3.109-12.el7.x86_64 1/1
Verifying : libaio-0.3.109-12.el7.x86_64 1/1

Installed:
libaio.x86_64 0:0.3.109-12.el7

Complete!
[root@ip-10-0-0-67 ec2-user]#
[root@ip-10-0-0-67 ec2-user]#
[root@ip-10-0-0-67 ec2-user]# rpm -ivh oracle-instantclient11.2-basic-11.2.0.4.0-1.x86_64\ \(2\).rpm
Preparing… ################################# [100%]
Updating / installing…
1:oracle-instantclient11.2-basic-11################################# [100%]
[root@ip-10-0-0-67 ec2-user]#
[root@ip-10-0-0-67 ec2-user]#
[root@ip-10-0-0-67 ec2-user]#
[root@ip-10-0-0-67 ec2-user]# rpm -ivh oracle-instantclient11.2-sqlplus-11.2.0.4.0-1.x86_64.rpm
Preparing… ################################# [100%]
Updating / installing…
1:oracle-instantclient11.2-sqlplus-################################# [100%]
[root@ip-10-0-0-67 ec2-user]#
[root@ip-10-0-0-67 ec2-user]#
[root@ip-10-0-0-67 ec2-user]#
[root@ip-10-0-0-67 ec2-user]# sqlplus
bash: sqlplus: command not found
[root@ip-10-0-0-67 ec2-user]#
[root@ip-10-0-0-67 ec2-user]# ll -lhtr /usr/lib/oracle/11.2/client64/lib/
total 182M
-rw-r–r–. 1 root root 114M Aug 24 2013 libociei.so
-rw-r–r–. 1 root root 7.7M Aug 24 2013 libnnz11.so
-rw-r–r–. 1 root root 1.9M Aug 24 2013 libocci.so.11.1
-rw-r–r–. 1 root root 52M Aug 24 2013 libclntsh.so.11.1
-rw-r–r–. 1 root root 66K Aug 24 2013 xstreams.jar
-rw-r–r–. 1 root root 2.7M Aug 24 2013 ojdbc6.jar
-rw-r–r–. 1 root root 2.0M Aug 24 2013 ojdbc5.jar
-rw-r–r–. 1 root root 162K Aug 24 2013 libocijdbc11.so
-rw-r–r–. 1 root root 1.5M Aug 24 2013 libsqlplus.so
-rw-r–r–. 1 root root 1.5M Aug 24 2013 libsqlplusic.so
-rw-r–r–. 1 root root 368 Aug 24 2013 glogin.sql
[root@ip-10-0-0-67 ec2-user]#
[root@ip-10-0-0-67 ec2-user]#
[root@ip-10-0-0-67 ec2-user]#
[root@ip-10-0-0-67 ec2-user]# cd /usr/lib/oracle/11.2/client64/lib
[root@ip-10-0-0-67 lib]# ll -lhtr
total 182M
-rw-r–r–. 1 root root 114M Aug 24 2013 libociei.so
-rw-r–r–. 1 root root 7.7M Aug 24 2013 libnnz11.so
-rw-r–r–. 1 root root 1.9M Aug 24 2013 libocci.so.11.1
-rw-r–r–. 1 root root 52M Aug 24 2013 libclntsh.so.11.1
-rw-r–r–. 1 root root 66K Aug 24 2013 xstreams.jar
-rw-r–r–. 1 root root 2.7M Aug 24 2013 ojdbc6.jar
-rw-r–r–. 1 root root 2.0M Aug 24 2013 ojdbc5.jar
-rw-r–r–. 1 root root 162K Aug 24 2013 libocijdbc11.so
-rw-r–r–. 1 root root 1.5M Aug 24 2013 libsqlplus.so
-rw-r–r–. 1 root root 1.5M Aug 24 2013 libsqlplusic.so
-rw-r–r–. 1 root root 368 Aug 24 2013 glogin.sql
[root@ip-10-0-0-67 lib]#
[root@ip-10-0-0-67 lib]# cd ..
[root@ip-10-0-0-67 client64]# ll -lhtr
total 4.0K
drwxr-xr-x. 2 root root 45 Jul 8 05:41 bin
drwxr-xr-x. 2 root root 4.0K Jul 8 05:41 lib
[root@ip-10-0-0-67 client64]#
[root@ip-10-0-0-67 client64]#
[root@ip-10-0-0-67 client64]# cd bin/
[root@ip-10-0-0-67 bin]#
[root@ip-10-0-0-67 bin]#
[root@ip-10-0-0-67 bin]# ll -lhtr
total 48K
-rwxr-xr-x. 1 root root 32K Aug 24 2013 genezi
-rwxr-xr-x. 1 root root 8.0K Aug 24 2013 adrci
-rwxr-xr-x. 1 root root 4.8K Aug 24 2013 sqlplus
[root@ip-10-0-0-67 bin]#
[root@ip-10-0-0-67 bin]#
[root@ip-10-0-0-67 bin]#
[root@ip-10-0-0-67 bin]# pwd
/usr/lib/oracle/11.2/client64/bin
[root@ip-10-0-0-67 bin]#
[root@ip-10-0-0-67 bin]#
[root@ip-10-0-0-67 bin]#
[root@ip-10-0-0-67 bin]# cat ~/.bashrc
# .bashrc

# User specific aliases and functions

alias rm=’rm -i’
alias cp=’cp -i’
alias mv=’mv -i’

# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi

export LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client64/lib
export SQLPATH=/usr/lib/oracle/11.2/client64
export PATH=$PATH:$SQLPATH/bin

[root@ip-10-0-0-67 bin]#
[root@ip-10-0-0-67 bin]# source ~/.bashrc
[root@ip-10-0-0-67 bin]#
[root@ip-10-0-0-67 bin]#
[root@ip-10-0-0-67 bin]# sqlplus

SQL*Plus: Release 11.2.0.4.0 Production on Wed Jul 8 06:07:39 2015

Copyright (c) 1982, 2013, Oracle. All rights reserved.

Enter user-name:
^

[root@ip-10-0-0-67 bin]#
Connection string : sqlplus hr/your_password@//mymachine.mydomain:port/MYDB
==================

[root@ip-10-0-0-67 bin]# sqlplus oracledb/oracledb@//oracledb.cwns0ftnokao.us-east-1.rds.amazonaws.com:1521/oracledb

SQL*Plus: Release 11.2.0.4.0 Production on Wed Jul 8 06:10:11 2015

Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Release 11.2.0.4.0 – 64bit Production

SQL>
SQL>
For more details : http://docs.oracle.com/cd/B19306_01/server.102/b14357/ape.htm#CHDJCDFA

  • Ask Question