UBUNTU
Steps:
1. you need to install alien package.
sudo apt-get install alien
2. You need to download Instant Client Downloads , you choose the current version on page (basic*.rpm, sqlplus.rpm and devel*.rmp). you run command with your version.
sudo alien -i oracle-instantclient*-basic*.rpm
sudo alien -i oracle-instantclient*-sqlplus*.rpm
sudo alien -i oracle-instantclient*-devel*.rpm
sudo alien -i oracle-instantclient*-sqlplus*.rpm
sudo alien -i oracle-instantclient*-devel*.rpm
3. Create Oracle configuration file:
sudo sensible-editor /etc/ld.so.conf.d/oracle.conf
sudo sensible-editor /etc/ld.so.conf.d/oracle.conf
4. Add the next line, depends if your machine 32 or 64 bit.
#for 32 bits
/usr/lib/oracle/<your version>/client/lib/
#for 64 bits
/usr/lib/oracle/<your version>/client64/lib/
sudo ldconfig
6. Try to connect using:
# if you have 32 bits
sqlplus username/password@//dbhost:1521/SID
# if you have 64 bits
sqlplus64 username/password@//dbhost:1521/SID
CENTOS 8
Steps:
1. You need to download Instant Client Downloads , you choose the current version on page (basic*.rpm, sqlplus.rpm and devel*.rmp). you run command with your version.
sudo yum localinstall oracle-instantclient*-basic*.rpm
sudo yum localinstall oracle-instantclient*-sqlplus*.rpm
sudo yum localinstall oracle-instantclient*-devel*.rpm
1. You need to download Instant Client Downloads , you choose the current version on page (basic*.rpm, sqlplus.rpm and devel*.rmp). you run command with your version.
sudo yum localinstall oracle-instantclient*-basic*.rpm
sudo yum localinstall oracle-instantclient*-sqlplus*.rpm
sudo yum localinstall oracle-instantclient*-devel*.rpm
2. Run the next command
sudo yum install libnsl
3. Create Oracle configuration file:
sudo nano /etc/ld.so.conf.d/oracle.conf
sudo nano /etc/ld.so.conf.d/oracle.conf
4. Add the next line, depends if your machine 32 or 64 bit.
#for 32 bits
/usr/lib/oracle/32/client/lib/
#for 64 bits
/usr/lib/oracle/64/client64/lib/
5. Update the configuration
sudo ldconfig
6. Try to connect using:
# if you have 32 bits
sqlplus username/password@//dbhost:1521/SID
# if you have 64 bits
sqlplus64 username/password@//dbhost:1521/SID
#for 32 bits
/usr/lib/oracle/32/client/lib/
#for 64 bits
/usr/lib/oracle/64/client64/lib/
5. Update the configuration
sudo ldconfig
6. Try to connect using:
# if you have 32 bits
sqlplus username/password@//dbhost:1521/SID
# if you have 64 bits
sqlplus64 username/password@//dbhost:1521/SID
That is it.
References: https://askubuntu.com/questions/159939/how-to-install-sqlplus/207145
Awesome man! You really saved me! Many thanks
ReplyDeleteThank you buddy
ReplyDeletesudo: Idconfig: command not found
ReplyDeletesudo alien -i oracle-instantclient*-basic*.rpm
ReplyDeleteoracle-instantclient*-basic*.rpm" not found.
Where can I set up my username and password?
ReplyDeleteThanks!