程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 數據庫知識 >> Oracle數據庫 >> Oracle教程 >> CentOS oracle Clinet客戶端安裝,centosclinet

CentOS oracle Clinet客戶端安裝,centosclinet

編輯:Oracle教程

CentOS oracle Clinet客戶端安裝,centosclinet


CentOS客戶端安裝方法如下:

1.安裝客戶端 

   rpm -ivh /當前目錄/oracle-instantclient12.1-basic-12.1.0.2.0-1.x86_64.rpm 

   rpm -ivh /當前目錄/oracle-instantclient12.1-devel-12.1.0.2.0-1.x86_64.rpm
 rpm -ivh /當前目錄/oracle-instantclient12.1-odbc-12.1.0.2.0-1.x86_64.rpm
 rpm -ivh /當前目錄/oracle-instantclient12.1-sqlplus-12.1.0.2.0-1.x86_64.rpm


填加tnsanme信息:
創建文件夾nework/admin,整個路徑如:/usr/lib/oracle/12.1/client64/network/admin 加入tnsnames.ora
#tnames.ora Network Configuration File: /opt/oracle/app/product/11.2.0/dbhome_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.14.31)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)

 

2、配置環境信息:

請打開 /etc/profile 文件,在這個文件裡面追加如下內容:
export ORACLE_BASE=/usr/lib/oracle/12.1
export ORACLE_HOME=$ORACLE_BASE/client64
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
export NLS_LANG=AMERICAN_AMERICA.AL32UTF8
export SQLPATH=/usr/lib/oracle/12.1/client64/network/admin
export TNS_ADMIN=/home/oracle/network/admin

 

運行 #> source /etc/profile 命令使該profile立即生效
再次運行vi .bash_profile ,加入下面這個:
export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin

3、驗證是否登陸成功
sqlplus xxx/[email protected]:1521/orcl

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved