1. Download the following RPM file
Oracle-instantclient12. 1-basic-12.1. 0.2. 0-1. X86_64.rpmoracle-instantclient12. 1-devel-12.1. 0.2. 0-1. x86_64.rpm Oracle-instantclient12. 1-sqlplus-12.1. 0.2. 0-1. x86_64.rpm
2. Install rpm
Yum-y Localinstall oracle*--/usr/lib/oracle/12.1/client64/network/admin-p
3. Edit Tnsnames.ora
Go to directory:/usr/lib/oracle/12.1/client64/network/admin
Cd/usr/lib/oracle/12.1/client64/network/admin
Write the following into the Tnsnames.ora file
Vim Tnsnames.ora
Database name = == 1521)) = (service_name= database name )))
Modify the following: database name and database server IP address for the data information you want to access
4. Configure Environment variables
Vim/etc/profile
Export oracle_home=/usr/lib/oracle/12.1/client64export PATH= $PATH: $ORACLE _home/binexport LD _library_path= $ORACLE _home/libexport tns_admin= $ORACLE _home/network/admin
Make environment variables effective
Source/etc/profile
Ldconfig
5. Running Sqlplus
The command line format is as follows:
Sqlplus username/password @ database server name (name configured in Tnsnames.ora)
centos6.5 under Installation Sqlplus