Linux installs Oracle client separately (Oracle clients)
- Updated: 2013-10-17 18:30
- |
- Tags:linux oracle
1. To use Oracle remotely, download the following three files first, and note that the best version is the same.
Oracle-instantclient-basic-10.2.0.4-1.i386.ziporacle-instantclient-devel-10.2.0.4-1.i386.zip//This is the SDK, the file name does not indicate , it is hereby stated that oracle-instantclient-sqlplus-10.2.0.4-1.i386.zip//looks at Oracle's SQL statements, but if you cannot go up, ask the remote Oracle Administrator. SELECT * from V$version;
Different versions, or different operating systems, please go to the official website to download, there are detailed instructions.
Http://www.oracle.com/technology/tech/oci/instantclient/index.html
:
Http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html
2. Create the installation directory for the client, these three directories can be customized, but when configuring environment variables, you need to be consistent.
Mkdir-p/home/oracle/oracleclient
3. Unzip the three files downloaded above. Unzip Oracle-instantclient-basic-10.2.0.4-1.i386.zipunzip Oracle-instantclient-sqlplus-10.2.0.4-1.i386.zip
Of these, all three files are extracted to the same directory under the current directory: INSTANTCLIENT_10_2CD instantclient_10_2 move all files under this directory to/home/oracle/oracleclient
Finally unzip the Oracle-instantclient-devel-10.2.0.4-1.i386.zip to extract the files/home/oracle/sdk
4. Configure the environment variables.
Vi/etc/profile//Note that this is an environment variable for all users, and if you want to restrict a user, you can only configure the user's profile. Join
Export Ld_library_path=/home/oracle/oracleclient
Export Oracle_home=/home/oracle/oracleclient
Export Tns_admin=/home/oracle/oracleclient
Nls_lang=american_america. Zhs16gbk
Export Nls_lang
Save and exit. [[email protected] tmp]# source/etc/profile//Make configuration file effective immediately [[email protected] tmp]# echo $ORACLE _home Check to see if the configured environment variable is successful/home/oracle/oracleclient
5. Configure the Listener and network environment. because you do not have an Oracle database installed locally, you need to get three files from the directory where you installed the Oracle database.
[Email protected] admin]# Lslistener.ora Sqlnet.ora Tnsnames.ora//For these three files, put it in the/home/oracle/oracleclient directory
6. Edit three files
VI Tnsnames.ora
Bossdata = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST =172.16.0.73) (PORT = 1521))// 172.16.0.73 IP Address, port number: 1521 (Connect_data = (SERVER = dedicated) (service_name = bossdata) Bossdata global Data name))
Extproc_connection_data = (DESCRIPTION = (Address_list = (ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC1))) (Connect_data = (SID = P Lsextproc) (PRESENTATION = RO)))
VI Listener.orasid_list_listener = (Sid_list = (Sid_desc = (Sid_name = plsextproc) (Oracle_home =/home/oracle/ OracleClient)//Note that this is the $oracle_home (program = Extproc) that was just configured)
LISTENER = (Description_list = (DESCRIPTION = (address = (PROTOCOL = IPC) (KEY = EXTPROC1)) (address = (PROTOC OL = TCP) (HOST = 172.16.0.73) (PORT = 1521))//(this is indicated above))
Baidu Library, install Oracle client under Linux