Downloads from http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html
oracle-instantclient11.2-basic-11.2.0.3.0-1.x86_64.rpm
oracle-instantclient11.2-sqlplus-11.2.0.3.0-1.x86_64.rpmand setup this. Create /etc/profile.d/oracle.sh with:
export ORACLE_HOME="/usr/lib/oracle/11.2/client64" export LD_LIBRARY_PATH=$ORACLE_HOME/lib export TNS_ADMIN=$ORACLE_HOME export PATH=$PATH:$ORACLE_HOME/bincreate "tnsnames.ora" file in $TNS_ADMIN folder, with:
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.5)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
Setup rlwrap:
sudo yum install rlwrapand add this line to ~/.bashrc
alias sqlplus="rlwrap sqlplus"Test:
sqlplus user_name@orclIf you get error:
sqlplus: error while loading shared libraries: libsqlplus.so: cannot open shared object file: No such file or directorythen check $ORACLE_PATH and $LD_LIBRARY_PATH and grants:
chmod -R 755 $ORACLE_HOMEIf you get this error:
sqlplus: error while loading shared libraries: libsqlplus.so: cannot open shared object file: No such file or directorythen add local machine to /etc/hosts :
127.0.0.1 localhost [machine_name]