Home>Article>Operation and Maintenance> How to install oracle client on linux?
#How to install oracle client on linux?
How to install the Oracle client on Linux:
1. First, download the installation package from Oracle’s official website:
http:// www.oracle.com/technetwork/database/features/instant-client/index-097480.html
Download the corresponding client according to the version of the accessed data. Each package is divided into two formats: .zip and .rpm. The zip package is equivalent to the installation-free version after decompression, while the rpm package requires the installation version.
2, install and extract to/usr/local/oracle
unzip instantclient-basic-linux.x64 -11.2.0.4.0.zip
unzip instantclient-sqlplus-linux.x64-11.2.0.4.0.zip
Generate directory/usr/local/oracle/instantclient_11_2
3, create a new directory in the above directorymkdir -p ./network/admin
Generate directory/usr /local/oracle/instantclient_11_2/network/admin
4. Create a new tnsnames.ora file in the above directory and edit the database connection information.
history_162 = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.1.197.1)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SID =xxx) ) )
5, Configure environment variables
vi .bash_profile
export ORACLE_HOME=/usr/local/oracle/instantclient_11_2 export TNS_ADMIN=$ORACLE_HOME/network/admin ##export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK export NLS_LANG=AMERICAN_AMERICA.AL32UTF8 export LD_LIBRARY_PATH=$ORACLE_HOME export PATH=$ORACLE_HOME:$PATH
source .bash_profile
6, Test database connection
sqlplus username/passwd@history_162
Recommended Tutorial: "linux tutorial"
The above is the detailed content of How to install oracle client on linux?. For more information, please follow other related articles on the PHP Chinese website!