First of all you need to download Instant Client Downloads. Install alien software so you can install rpm packages by typing following command in terminal.
sudo apt-get install alien
Once that is done, go to the folder where the rpm files are located and execute the following
alien -i oracle-instantclient-basic*.rpm
alien -i oracle-instantclient-sqlplus*.rpm
alien -i oracle-instantclient-devel*.rpm
You need to install libaio.so type following command to do it.
sudo apt-get install libaio1
Create oracle configuration file
sudo vi /etc/ld.so.conf.d/oracle.conf
then we add this:
/usr/lib/oracle/11
.2
/client/lib/
Update the configuration by running following command.
sudo ldconfig
Try to connect using
sqlplus username/password@//dbhost:1521/SID
or
sqlplus testuser/password
添加
/usr/lib/oracle/11
.2
/client/bin/
到环境变量