oralce11g客户端如何安装

这篇文章主要介绍了oralce11g客户端如何安装,具有一定借鉴价值,感兴趣的朋友可以参考下,希望大家阅读完这篇文章之后大有收获,下面让小编带着大家一起了解一下。

创新互联是一家集网站建设,甘南企业网站建设,甘南品牌网站建设,网站定制,甘南网站建设报价,网络营销,网络优化,甘南网站推广为一体的创新建站企业,帮助传统企业提升企业形象加强企业竞争力。可充分满足这一群体相比中小企业更为丰富、高端、多元的互联网需求。同时我们时刻保持专业、时尚、前沿,时刻以成就客户成长自我,坚持不断学习、思考、沉淀、净化自己,让我们为更多的企业打造出实用型网站。



首先确认操作系统防火墙和selinux已关闭:
--查看selinux状态:sestatus
关闭SELinux的方法:
  修改/etc/selinux/config文件中的SELINUX="" 为 disabled ,然后重启。
  如果不想重启系统,使用命令setenforce 0

--查看iptables状态:service iptables status
关闭防火墙
    1)重启后永久性生效:
  开启: chkconfig iptables on
  关闭: chkconfig iptables off

  2) 即时生效,重启后失效:
  开启: service iptables start
  关闭: service iptables stop

1. Memory Requirements:At least 256 MB of physical RAM.

# grep MemTotal /proc/meminfo

 To determine whether the system architecture can run the software, enter the following command:

# grep "model name" /proc/cpuinfo

 To determine the size of the configured swap space, enter the following command:

# grep SwapTotal /proc/meminfo

To determine the available RAM and swap space, enter the following command:

# free

2. Disk Space Requirements
The minimum disk space requirement for a client install in the /tmp directory is 400 MB.
To determine the amount of disk space available in the /tmp directory, enter the following command:

# df -k /tmp

Between 146 MB and 1.38 GB of disk space for the Oracle software, depending on the installation type:

Installation Type     Requirement for Software Files
Instant Client          146 MB
Administrator          1.38 GB
Runtime                1.10 GB

3. Operating System Requirements
To determine the distribution and version of Linux installed, enter the following command:

# cat /proc/version

4. Kernel Requirements
For Asianux Server 3, Oracle Linux 5, and Red Hat Enterprise Linux 5:
2.6.18 or later

To determine whether the required kernel is installed, enter the following command:

# uname -r

5.Package Requirements
The following or later version of packages for Asianux Server 3, Oracle Linux 5, and Red Hat Enterprise Linux 5 should be installed:

binutils-2.17.50.0.6
compat-libstdc++-33-3.2.3
elfutils-libelf-0.125
elfutils-libelf-devel-0.125
elfutils-libelf-devel-static-0.125
gcc-4.1.2
gcc-c++-4.1.2
glibc-2.5-24
glibc-common-2.5
glibc-devel-2.5
ksh-20060214
libaio-0.3.106
libaio-devel-0.3.106
libgcc-4.1.2
libgomp-4.1.2
libstdc++-4.1.2
libstdc++-devel-4.1.2
make-3.81
sysstat-7.0.2

操作系统检查:
rpm -q binutils compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibc glibc-common glibc-devel libaio libaio-devel libgcc libstdc++ libstdc++-devel make sysstat

[root@client ~]# rpm -q binutils compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibc glibc-common glibc-devel libaio libaio-devel libgcc libstdc++ libstdc++-devel make sysstat
binutils-2.20.51.0.2-5.43.el6.x86_64
package compat-libstdc++-33 is not installed
elfutils-libelf-0.161-3.el6.x86_64
package elfutils-libelf-devel is not installed
package gcc is not installed
package gcc-c++ is not installed
glibc-2.12-1.166.el6.x86_64
glibc-common-2.12-1.166.el6.x86_64
glibc-devel-2.12-1.166.el6.x86_64
libaio-0.3.107-10.el6.x86_64
package libaio-devel is not installed
libgcc-4.4.7-16.el6.x86_64
libstdc++-4.4.7-16.el6.x86_64
package libstdc++-devel is not installed
make-3.81-20.el6.x86_64
sysstat-9.0.4-27.el6.x86_64
[root@client ~]#
yum install -y compat-libstdc++*
yum install -y elfutils-libelf-devel*
yum install -y gcc*
yum install -y libaio-devel*
yum install -y libstdc++-devel*

挂载光盘,配置yum源:
[root@client ~]# mount /dev/cdrom /mnt
mount: block device /dev/sr0 is write-protected, mounting read-only
[root@client ~]#
[root@client ~]# vi /etc/yum.repos.d/yum.repo
[base]
name=base
baseurl=file:///mnt/Server
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[root@client yum.repos.d]#
[root@client yum.repos.d]#
[root@client yum.repos.d]# yum clean all
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Cleaning repos: base
Cleaning up Everything
[root@client yum.repos.d]# yum list
省略.........................
[root@client yum.repos.d]# yum makecache
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
base                                                                                                                                            | 4.1 kB     00:00 ...
base/group_gz                                                                                                                                   | 211 kB     00:00 ...
base/filelists_db                                                                                                                               | 3.4 MB     00:00 ...
base/other_db                                                                                                                                   | 1.3 MB     00:00 ...
Metadata Cache Created
[root@client yum.repos.d]#

--安装缺失的包:
yum install -y compat-libstdc++*
yum install -y elfutils-libelf-devel*
yum install -y gcc*
yum install -y libaio-devel*
yum install -y libstdc++-devel*

6.Creating Required Operating System Groups and Users
添加用户组oinstall、和oracle用户:
[root@client Packages]# groupadd oinstall
[root@client Packages]# groupadd dba
[root@client Packages]# useradd -g oinstall -G dba oracle
[root@client Packages]#  passwd oracle
Changing password for user oracle.
New password:
BAD PASSWORD: it is based on a dictionary word
BAD PASSWORD: is too simple
Retype new password:
passwd: all authentication tokens updated successfully.
[root@client Packages]#

7.Creating Required Directories
[root@client ~]# mkdir -p /u01/app/oracle
[root@client ~]# chown -R oracle:oinstall /u01/app/oracle/
[root@client ~]# chmod -R 775 /u01/app/oracle/

8.Configuring the oracle User's Environment配置用户环境变量
[oracle@client ~]$ vi .bash_profile
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH

export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/11.2/client
export NLS_LANG="american_america.ZHS16GBK"
export NLS_DATE_FORMAT="YYYY-MM-DD HH24:Mi:SS"
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
~
".bash_profile" 15L, 235C written
[oracle@client ~]$
[oracle@client ~]$ source .bash_profile
[oracle@client ~]$

8.上传oracle客户端安装软件包:
[oracle@client ~]$ mkdir soft
[oracle@client ~]$ cd soft/
[oracle@client soft]$ ls
[oracle@client soft]$ pwd
/home/oracle/soft
[oracle@client soft]$
[oracle@client soft]$ ls
p13390677_112040_Linux-x86-64_4of7.zip
[oracle@client soft]$ unzip p13390677_112040_Linux-x86-64_4of7.zip
省略...............

9.配置静默安装响应文件
[oracle@client soft]$ ls
client  p13390677_112040_Linux-x86-64_4of7.zip
[oracle@client soft]$ cd client/
[oracle@client client]$ ls
install  readme.html  response  runInstaller  stage  welcome.html
[oracle@client client]$ cd response/
[oracle@client response]$ ls
client_install.rsp  netca.rsp
[oracle@client response]$
--先备份响应文件:
[oracle@client response]$ cp client_install.rsp client_install.rsp.bak
[oracle@client response]$ ls
client_install.rsp  client_install.rsp.bak  netca.rsp

修改响应文件:
[oracle@client response]$ vi client_install.rsp
###############################################################################
## Copyright(c) Oracle Corporation 1998,2013. All rights reserved.           ##
##                                                                           ##
## Specify values for the variables listed below to customize                ##
## your installation.                                                        ##
##                                                                           ##
## Each variable is associated with a comment. The comment                   ##
## can help to populate the variables with the appropriate                   ##
## values.                                                                   ##
##                                                                           ##
###############################################################################

#-------------------------------------------------------------------------------
# Do not change the following system generated value.
#-------------------------------------------------------------------------------
oracle.install.responseFileVersion=/oracle/install/rspfmt_clientinstall_response_schema_v11_2_0

#-------------------------------------------------------------------------------
# This variable holds the hostname of the system as set by the user.
# It can be used to force the installation to use an alternative 
# hostname rather than using the first hostname found on the system
# (e.g., for systems with multiple hostnames and network interfaces).
ORACLE_HOSTNAME=client
#-------------------------------------------------------------------------------
# Unix group to be set for the inventory directory.
UNIX_GROUP_NAME=oinstall
#-------------------------------------------------------------------------------
# Inventory location.
INVENTORY_LOCATION=/u01/app/oraInventory
#-------------------------------------------------------------------------------
# Specify the languages in which the components will be installed.           
#
# en   : English                  ja   : Japanese                
# fr   : French                   ko   : Korean                  
# ar   : Arabic                   es   : Latin American Spanish  
# bn   : Bengali                  lv   : Latvian                 
# pt_BR: Brazilian Portuguese     lt   : Lithuanian              
# bg   : Bulgarian                ms   : Malay                   
# fr_CA: Canadian French          es_MX: Mexican Spanish         
# ca   : Catalan                  no   : Norwegian               
# hr   : Croatian                 pl   : Polish                  
# cs   : Czech                    pt   : Portuguese              
# da   : Danish                   ro   : Romanian                
# nl   : Dutch                    ru   : Russian                 
# ar_EG: Egyptian                 zh_CN: Simplified Chinese      
# en_GB: English (Great Britain)  sk   : Slovak                  
# et   : Estonian                 sl   : Slovenian               
# fi   : Finnish                  es_ES: Spanish                 
# de   : German                   sv   : Swedish                 
# el   : Greek                    th   : Thai                    
# iw   : Hebrew                   zh_TW: Traditional Chinese     
# hu   : Hungarian                tr   : Turkish                 
# is   : Icelandic                uk   : Ukrainian               
# in   : Indonesian               vi   : Vietnamese              
# it   : Italian                                                 
#
# all_langs   : All languages
#
# Specify value as the following to select any of the languages.
# Example : SELECTED_LANGUAGES=en,fr,ja
#
# Specify value as the following to select all the languages.
# Example : SELECTED_LANGUAGES=all_langs
#-------------------------------------------------------------------------------
SELECTED_LANGUAGES=en,zh_CN
#-------------------------------------------------------------------------------
# Complete path of the Oracle Home
ORACLE_HOME=/u01/app/oracle/11.2/client
#-------------------------------------------------------------------------------
# Complete path of the Oracle Base.
ORACLE_BASE=/u01/app/oracle
#-------------------------------------------------------------------------------
#Name       : INSTALL_TYPE
#Datatype   : String
#Description: Installation type of the component.
#
#             The following choices are available. The value should contain
#             only one of these choices.
#               - InstantClient
#               - Administrator
#               - Runtime
#               - Custom
#
#Example    : INSTALL_TYPE = "Administrator"
#------------------------------------------------------------------------------
oracle.install.client.installType=Administrator
#-------------------------------------------------------------------------------
#Name       : oracle.install.client.upgrading
#Datatype   : boolean
#Description: whether or not this is an upgrade installation
#
#             The following choices are available. The value should contain
#             only one of these choices.
#               - true
#               - false
#
#Example    : oracle.install.client.upgrading=true
#------------------------------------------------------------------------------
oracle.install.client.upgrading=
#------------------------------------------------------------------------------
# Name       : oracle.install.client.customComponents
# Datatype   : StringList
#
# This property is considered only if INSTALL_TYPE is set to "Custom"
#
# Description: List of Client Components you would like to install
#
#   The following choices are available. You may specify any
#   combination of these choices.  The components you choose should
#   be specified in the form "internal-component-name:version"
#   Below is a list of components you may specify to install.
#
# oracle.sqlj:11.2.0.4.0 -- "Oracle SQLJ"
# oracle.rdbms.util:11.2.0.4.0 -- "Oracle Database Utilities"
# oracle.javavm.client:11.2.0.4.0 -- "Oracle Java Client"
# oracle.sqlplus:11.2.0.4.0 -- "SQL*Plus"
# oracle.dbjava.jdbc:11.2.0.4.0 -- "Oracle JDBC/THIN Interfaces"
# oracle.ldap.client:11.2.0.4.0 -- "Oracle Internet Directory Client"
# oracle.rdbms.oci:11.2.0.4.0 -- "Oracle Call Interface (OCI)"
# oracle.precomp:11.2.0.4.0 -- "Oracle Programmer"
# oracle.xdk:11.2.0.4.0 -- "Oracle XML Development Kit"
# oracle.network.aso:11.2.0.4.0 -- "Oracle Advanced Security"
# oracle.assistants.oemlt:11.2.0.4.0 -- "Enterprise Manager Minimal Integration"
# oracle.oraolap.mgmt:11.2.0.4.0 -- "OLAP Analytic Workspace Manager and Worksheet"
# oracle.network.client:11.2.0.4.0 -- "Oracle Net"
# oracle.network.cman:11.2.0.4.0 -- "Oracle Connection Manager"
# oracle.network.listener:11.2.0.4.0 -- "Oracle Net Listener"
# oracle.ordim.client:11.2.0.4.0 -- "Oracle Multimedia Client Option"
# oracle.odbc:11.2.0.4.0 -- "Oracle ODBC Driver"
# oracle.has.client:11.2.0.4.0 -- "Oracle Clusterware High Availability API"
# oracle.dbdev:11.2.0.4.0 -- "Oracle SQL Developer"
# oracle.rdbms.scheduler:11.2.0.4.0 -- "Oracle Scheduler Agent"
#
#-------------------------------------------------------------------------------
oracle.install.client.customComponents="oracle.sqlj:11.2.0.4.0","oracle.rdbms.util:11.2.0.4.0","oracle.javavm.client:11.2.0.4.0","oracle.sqlplus:11.2.0.4.0","oracle.dbjava.jdbc:11.2.0.4.0","oracle.ldap.client:11.2.0.4.0","oracle.rdbms.oci:11.2.0.4.0","oracle.precomp:11.2.0.4.0","oracle.xdk:11.2.0.4.0","oracle.network.aso:11.2.0.4.0","oracle.assistants.oemlt:11.2.0.4.0","oracle.oraolap.mgmt:11.2.0.4.0","oracle.network.client:11.2.0.4.0","oracle.network.cman:11.2.0.4.0","oracle.network.listener:11.2.0.4.0","oracle.ordim.client:11.2.0.4.0","oracle.odbc:11.2.0.4.0","oracle.has.client:11.2.0.4.0","oracle.dbdev:11.2.0.4.0","oracle.rdbms.scheduler:11.2.0.4.0"
#-------------------------------------------------------------------------------
# Host name to be used for by the Oracle Scheduler Agent.
# This needs to be entered in case oracle.rdbms.scheduler is selected in the
# list of custom components during custom install
#
# Example    : oracle.install.client.schedulerAgentHostName = acme.domain.com
#------------------------------------------------------------------------------
oracle.install.client.schedulerAgentHostName=

#------------------------------------------------------------------------------
# Port number to be used for by the Oracle Scheduler Agent.
# This needs to be entered in case oracle.rdbms.scheduler is selected in the
# list of custom components during custom install
#
# Example: oracle.install.client.schedulerAgentPortNumber = 1500
#------------------------------------------------------------------------------
oracle.install.client.schedulerAgentPortNumber=
#------------------------------------------------------------------------------
# Specify the auto-updates option. It can be one of the following:
#   - MYORACLESUPPORT_DOWNLOAD
#   - OFFLINE_UPDATES
#   - SKIP_UPDATES
#------------------------------------------------------------------------------
oracle.installer.autoupdates.option=

#------------------------------------------------------------------------------
# In case MYORACLESUPPORT_DOWNLOAD option is chosen, specify the location where
# the updates are to be downloaded.
# In case OFFLINE_UPDATES option is chosen, specify the location where the updates
# are present.
#------------------------------------------------------------------------------
oracle.installer.autoupdates.downloadUpdatesLoc=

#------------------------------------------------------------------------------
# Specify the My Oracle Support Account Username which has the patches download privileges
# to be used for software updates.
#
#  Example   : AUTOUPDATES_MYORACLESUPPORT_USERNAME=abc@oracle.com
#------------------------------------------------------------------------------
AUTOUPDATES_MYORACLESUPPORT_USERNAME=
#------------------------------------------------------------------------------
# Specify the My Oracle Support Account Username password which has the patches download privileges
# to be used for software updates.
#
# Example    : AUTOUPDATES_MYORACLESUPPORT_PASSWORD=password
#------------------------------------------------------------------------------
AUTOUPDATES_MYORACLESUPPORT_PASSWORD=

#------------------------------------------------------------------------------
# Specify the Proxy server name. Length should be greater than zero.
#
# Example    : PROXY_HOST=proxy.domain.com
#------------------------------------------------------------------------------
PROXY_HOST=

#------------------------------------------------------------------------------
# Specify the proxy port number. Should be Numeric and at least 2 chars.
#
# Example    : PROXY_PORT=25
#------------------------------------------------------------------------------
PROXY_PORT=
#------------------------------------------------------------------------------
# Specify the proxy user name. Leave PROXY_USER and PROXY_PWD
# blank if your proxy server requires no authentication.
#
# Example    : PROXY_USER=username
#------------------------------------------------------------------------------
PROXY_USER=
#------------------------------------------------------------------------------
# Specify the proxy password. Leave PROXY_USER and PROXY_PWD
# blank if your proxy server requires no authentication.
#
# Example    : PROXY_PWD=password
#------------------------------------------------------------------------------
PROXY_PWD=

#------------------------------------------------------------------------------
# Specify the proxy realm.
#
# Example    : PROXY_REALM=metalink
#------------------------------------------------------------------------------
PROXY_REALM=

[oracle@client client]$
[oracle@client response]$

上面看起来内容较多,实际上主要就根据实际环境修改了这些值,其他默认或不填即可:
ORACLE_HOSTNAME=client
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION=/u01/app/oraInventory
SELECTED_LANGUAGES=en,zh_CN
ORACLE_HOME=/u01/app/oracle/11.2/client
ORACLE_BASE=/u01/app/oracle
oracle.install.client.installType=Administrator

10.开始静默安装客户端
切换到安装目录下,执行下面的命令静默安装客户端
 ./runInstaller -silent -responseFile /home/oracle/soft/client/response/client_install.rsp

[oracle@client response]$ ls
client_install.rsp  client_install.rsp.bak  netca.rsp
[oracle@client response]$ pwd
/home/oracle/soft/client/response
[oracle@client response]$ cd ..
[oracle@client client]$ ls
install  readme.html  response  runInstaller  stage  welcome.html
[oracle@client client]$ ./runInstaller -silent -responseFile /home/oracle/soft/client/response/client_install.rsp
Starting Oracle Universal Installer...

Checking Temp space: must be greater than 120 MB.   Actual 19745 MB    Passed
Checking swap space: must be greater than 150 MB.   Actual 4095 MB    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2017-10-25_11-11-32AM. Please wait ...[oracle@client client]$ You can find the log of this install session at:
 /u01/app/oraInventory/logs/installActions2017-10-25_11-11-32AM.log

The installation of Oracle Client 11g was successful.
Please check '/u01/app/oraInventory/logs/silentInstall2017-10-25_11-11-32AM.log' for more details.

As a root user, execute the following script(s):
        1. /u01/app/oraInventory/orainstRoot.sh


Successfully Setup Software.

[oracle@client client]$

root执行:
[root@client ~]# /u01/app/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.

Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete.
[root@client ~]#

客户端安装完成!!!!!!

测试客户端:
--配置tns:
[oracle@client admin]$  cd $ORACLE_HOME/network/admin
[oracle@client admin]$ ls
samples  shrept.lst
[oracle@client admin]$ vi tnsnames.ora
test =
(DESCRIPTION =
   (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.56.20)(PORT = 1521))
   (CONNECT_DATA =
     (SERVER = DEDICATED)
     (SERVICE_NAME = test)
    )
  )
~
"tnsnames.ora" [New] 8L, 171C written                                                                                                              
[oracle@client admin]$
[oracle@client admin]$ tnsping test

TNS Ping Utility for Linux: Version 11.2.0.4.0 - Production on 25-OCT-2017 11:56:00

Copyright (c) 1997, 2013, Oracle.  All rights reserved.

Used parameter files:

Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.56.20)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = test)))
OK (50 msec)
[oracle@client admin]$ sqlplus system/oracle@test
SQL*Plus: Release 11.2.0.4.0 Production on Wed Oct 25 11:56:25 2017

Copyright (c) 1982, 2013, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> show parameter name

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
cell_offloadgroup_name               string
db_file_name_convert                 string
db_name                              string      test
db_unique_name                       string      test
global_names                         boolean     FALSE
instance_name                        string      test
lock_name_space                      string
log_file_name_convert                string
processor_group_name                 string
service_names                        string      service1,service2,service3
SQL>   

感谢你能够认真阅读完这篇文章,希望小编分享的“oralce11g客户端如何安装”这篇文章对大家有帮助,同时也希望大家多多支持创新互联,关注创新互联行业资讯频道,更多相关知识等着你来学习!


分享文章:oralce11g客户端如何安装
转载来源:http://azwzsj.com/article/iiicip.html