Download the installation package from the following website and choose your own version
Http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html
Download the client and Sqlplus programs from the Oracle official website.
Take 11g as an example
Install as root user
RPM-IVH oracle-instantclient-basic-11.1.0.1-1.x86_64.rpm
RPM-IVH oracle-instantclient-sqlplus-11.1.0.1-1.x86_64.rpm
You can use RPM-QPL oracle-instantclient-sqlplus-11.1.0.1-1.x86_64.rpm to view the installation path when you are finished installing
Default in/usr/lib/oracle directory
Configuration
Vim/etc/profile add
Export Oracle_home=/usr/lib/oracle/11.1.0.1/client64
Export oracle_base=/usr/lib/oracle/11.1.0.1
Export ld_library_path= $ORACLE _home/lib: $LD _library_path
Export Nls_lang=american_america. Al32utf8
Setting the environment variable requires rebooting the machine or source/etc/profile the configuration to take effect.
Creating a configuration file
Create the following directory Network/admin under the Oracle_home directory and create the file Tnsnames.ora as follows:
Vim/usr/lib/oracle/11.1.0.1/client64/network/admin/tnsnames.ora
ORCL = (DESCRIPTION = (Address_list = (address = (PROTOCOL = TCP) (host = host) (PORT = 1521)) (Connec T_data = (service_name = ORCL)))
Test
To the Oracle_home/bin directory, execute the command:
[Yleesun@centos bin]$./sqlplus zxd/zxd@111
Sql*plus:release 11.2.0.3.0 Production on Mon June 9 19:14:25 2012
Copyright (c) 1982, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition release 11.2.0.1.0-64bit Production
With the partitioning, OLAP, Data Mining and real application testing options
Sql>
The test was successful.
Note:
If the following error occurs:
Sqlplus:error while loading shared libraries:libsqlplus.so:cannot open Shared object file:no such file or directory
Indicates that the environment variable is not in effect or that the package needs to be installed
Yum install libaio* is done.