Install the oracle client in linux

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.