Install the oracle client in linux
1. Prepare the required installation package.
Oracle-instantclient-basic-10.2.0.5-1.i386.rpm
Oracle-instantclient-devel-10.2.0.5-1.i386.rpm
Oracle-instantclient-jdbc-10.2.0.5-1.i386.rpm
Oracle-instantclient-sqlplus-10.2.0.5-1.i386.rpm
Install oracle-instantclient-basic-10.2.0.5-1.i386.rpm first, install other
2. Create users, groups, and directories
[Root @ wxcs-2 oracle] # groupadd oinstall
[Root @ wxcs-2 oracle] # groupadd dba
[Root @ wxcs-2 oracle] # useradd-g oinstall-G dba oracle
[Root @ wxcs-2 oracle] # passwd oracle
Changing password for user oracle.
New UNIX password:
Bad password: it is based on a dictionary word
Retype new UNIX password:
Passwd: all authentication tokens updated successfully.
[Root @ wxcs-2 oracle] # mkdir-p/home/oracle/network/admin
[Root @ wxcs-2 oracle] # chown-R oracle: oinstall/home/oracle
[Root @ wxcs-2 oracle] # chmod-R 755/home/oracle
3. Copy tnsnames. ora from the oracle server and put it under the/home/oracle/network/admin directory.
4. Modify Environment Variables
[Oracle @ wxcs-2 ~] $ Vi. bash_profile
Export ORACLE_HOME =/home/oracle
Export SQLPATH =/home/oracle/network/admin
Export TNS_ADMIN =/home/oracle/network/admin
Export NLS_LANG = "SIMPLIFIED CHINESE_CHINA.ZHS16GBK"
Export LD_LIBRARY_PATH =/usr/lib/oracle/10.2.0.5/client/lib/:/usr/lib/oracle/10.2.0.5/client/lib: $ LD_LIBRARY_PA
TH
Export PATH = $ PATH: $ ORACLE_HOME: $ LD_LIBRARY_PATH
[Oracle @ wxcs-2 ~] $ Source. bash_profile environment variables take effect immediately
5. You can connect to the oracle server normally.
[Oracle @ wxcs-2 ~] $ Sqlplus zhgy/zhgy@192.168.4.36/orcl