Install the oracle client in linux and the linuxoracle Client

Source: Internet
Author: User

Install the oracle client in linux and the linuxoracle Client

1. Prepare the required installation package.


Install oracle-instantclient-basic- 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 LD_LIBRARY_PATH =/usr/lib/oracle/ $ LD_LIBRARY_PA

[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@


After installing the oracle server in linux, you can also install the client

You have installed the corresponding client tool by default when installing the server, but it is also possible to install the client again.

How to install the Oracle client in linux

Install as root user
Rpm-ivh oracle-instantclient-basic-
Rpm-ivh oracle-instantclient-sqlplus- Configuration
Add vim/etc/profile
Export ORACLE_HOME =/usr/lib/oracle/
Export ORACLE_BASE =/usr/lib/oracle/
To set environment variables, restart the machine!
Create a configuration file
Create the following network/admin directory in the ORACLE_HOME directory and create the tnsnames. ora file. The content is as follows:
Vim/usr/lib/oracle/ ora
# Tnsnames. ora Network Configuration File:/opt/oracle10g/u01/network/admin/tnsnames. ora
# Generated by Oracle configuration tools.111 =
(ADDRESS = (PROTOCOL = TCP) (HOST = (PORT = 1521 )))
(SERVICE_NAME = dmsdb) test
Go to the ORACLE_HOME/bin directory and run the following command:
[Yleesun @ centos bin] $./sqlplus zxd/zxd @ 111
Copyright (c) 1982,201 1, Oracle. All rights reserved.
Oracle Database 11g Enterprise Edition Release Production
With the Partitioning, OLAP, Data Mining and Real Application Testing optionsSQL test successful! Note:
If the following error occurs:
The environment variable does not take effect!

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: 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.