ImageVerifierCode 换一换
格式:DOCX , 页数:15 ,大小:34.21KB ,
资源ID:10005343      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/10005343.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(centos510安装oracle教程及问题分析.docx)为本站会员(b****7)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

centos510安装oracle教程及问题分析.docx

1、centos510安装oracle教程及问题分析操作系统:CentOS 5.10 64位数据库:Oracle 11G R2(版本号为11.02)安装操作系统的时候,注意交换分区的大小不得低于2G,主分区最好大点本次分配了10G1.同步时钟及修改/etc/hostsyum -y install ntpntpdate time.nist.govecho * */2 * * * /sbin/ntpdate time.nist.gov /etc/crontab修改/etc/hosts将机器名称加入,我这里的是node1,则2.关闭服务:iptables selinux portmap rpc.stat

2、d cupsd avahi-daemon sendmail killall iptableschkconfig -level 2345 iptables offkillall portmapchkconfig -level 2345 portmap offkillall avahi-daemonchkconfig -level 2345 avahi-daemon offkillall sendmailchkconfig -level 2345 sendmail off3.安装oracle 11gR2 依赖的组件包yum -y install binutils compat-libstdc+-3

3、3 elfutils-libelf elfutils-libelf-devel glibc glibc-common glibc-devel gcc gcc-c+ libaio-devel libaio libgcc libstdc+ libstdc+-devel make sysstat unixODBC unixODBC-devel pdksh numactl-devel glibc-headerslibaio-devel libaio/sbin/ldconfig4.调整内核参数vi /etc/sysctl.conffs.file-max = 6815744kernel.shmall =

4、2097152kernel.shmmax = 536870912kernel.shmmni = 4096kernel.sem = 250 32000 100 128net.ipv4.ip_local_port_range = 9000 65500net.core.rmem_default = 262144net.core.rmem_max = 4194304net.core.wmem_default = 262144net.core.wmem_max = 1048576fs.aio-max-nr = 1048576#让内核参数生效sysctl -p5.修改limits.confvi /etc/

5、security/limits.conf#oracle settingsoracle soft nproc 2047oracle hard nproc 16384oracle soft nofile 1024oracle hard nofile 655366.改/etc/pam.d/login#添加以下内容:session required /lib64/security/pam_limits.sosession required pam_limits.so注意:如果使用的是32位的操作系统,则上面要写成session required /lib/security/pam_limits.sos

6、ession required pam_limits.so7.修改/etc/profilevi /etc/profile#添加以下内容:if $USER = oracle ; then if $SHELL = /bin/ksh ; then ulimit -p 16384 ulimit -n 65536 else ulimit -u 16384 -n 65536 fifi8.改/etc/csh.loginvi /etc/csh.login#添加以下内容:if ( $USER = oracle ) then limit maxproc 16384 limit deors 65536endif9.

7、创建oracle用户groupadd oinstallgroupadd dbauseradd -g oinstall -G dba oraclepasswd oracle mkdir -p /data/oraclemkdir -p /data/oraInventorymkdir -p /data/softwarechown -R oracle:oinstall /data/oraclechown -R oracle:oinstall /data/softwarechown -R oracle:oinstall /data/oraInventory10.设置用户环境变量#su - oracle$

8、 vi .bash_profile#添加以下内容:ORACLE_SID=orcl; export ORACLE_SIDORACLE_BASE=/data/oracle; export ORACLE_BASEORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1; export ORACLE_HOMEPATH=$PATH:$ORACLE_HOME/bin:$HOME/bin; export PATH说明:ORACLE_BASE下是admin和productORACLE_HOME下则是ORACLE的命令、连接库、安装助手、listener等等一系列的东东。这只是O

9、RACLE自己的定义习惯。ORACLE_HOME比ORACLE_BASE目录要更深一些。也就是说:ORACLE_HOME$ORACLE_BASE/product/versionORACLE_BASE是oracle的根目录,ORACLE_HOME是oracle产品的目录。简单说,你如果装了2个版本的oracle,那么ORACLE_BASE可以是一个,但ORACLE_HOME是2个全局数据库名用于区别分布式数据库各个不同机器上的实例。SID用于区别同一台机器上的不同实例,即一个用于外部区分。一个用于内部区分。$source .bash_profile11.安装oracle#可以使用winscp上传

10、oracle安装文件到/data/software目录下,并解压cd /data/softwareunzip linux_11gR2_database_1of2.zipunzip linux_11gR2_database_2of2.zipxhost + (这里使用root用户执行,一定要执行以下2步,如果没有执行,将无法启动图形安装界面)xhost + localhostsu - oralcecd /data/software/database$./runInstaller #(到oracle安装文件所在目录执行该命令)安装过程省略12.开机启动设置#自动启动和关闭数据库实例和监听vi /da

11、ta/oracle/product/11.2.0/db_1/bin/dbstartORACLE_HOME_LISTNER=$1#修改为:ORACLE_HOME_LISTNER=$ORACLE_HOMEvi /data/oracle/product/11.2.0/db_1/bin/dbshutORACLE_HOME_LISTNER=$1#修改为:ORACLE_HOME_LISTNER=$ORACLE_HOMEvi /etc/init.d/oracle#!/bin/sh# chkconfig: 345 61 61# description: Oracle 11g AutoRun Services#

12、 /etc/init.d/oracle# Run-level Startup script for the Oracle Instance, Listener, and# Web Interfaceexport ORACLE_BASE=/data/oracleexport ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1export ORACLE_SID=lukeexport PATH=$PATH:$ORACLE_HOME/binORA_OWNR=oracle# if the executables do not exist - display erro

13、rif ! -f $ORACLE_HOME/bin/dbstart -o ! -d $ORACLE_HOME then echo Oracle startup: cannot start exit 1fi# depending on parameter - startup, shutdown, restart# of the instance and listener or usage displaycase $1 instart) # Oracle listener and instance startup su $ORA_OWNR -lc $ORACLE_HOME/bin/dbstart

14、echo Oracle Start Succesful!OK. ;stop) # Oracle listener and instance shutdown su $ORA_OWNR -lc $ORACLE_HOME/bin/dbshut echo Oracle Stop Succesful!OK. ;reload|restart) $0 stop $0 start ;*) echo $Usage: basename $0 start|stop|reload|reload exit 1esacexit 0chmod 750 /etc/init.d/oraclechkconfig -level

15、345 oracle onchkconfig -add oracle#启动oracleservice oracle start自动启动和关闭 EMvi /etc/init.d/oraemctl#!/bin/sh# chkconfig: 345 61 61# description: Oracle 11g AutoRun Services# /etc/init.d/oraemctl# Run-level Startup script for the Oracle Instance, Listener, and# Web Interfaceexport ORACLE_BASE=/data/orac

16、leexport ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1export ORACLE_SID=lukeexport PATH=$PATH:$ORACLE_HOME/binORA_OWNR=oraclecase $1 instart)echo -n $Starting Oracle EM DB Console:su -$ORA_OWNR-c $ORACLE_HOME/bin/emctl start dbconsoleecho OK;stop)echo -n $Stopping Oracle EM DB Console:su -$ORA_OWNR-c

17、 $ORACLE_HOME/bin/emctl stop dbconsoleecho OK;*)echo $Usage: $0 start|stopesacchmod 750 /etc/init.d/oraemctl#启动EMservice oraemctl start问题分析:linux安装oracle时DISPLAY解决方法在Linux上安装Oracle时,经常会报以下错误:无法使用命令 /usr/X11R6/bin/xdpyinfo 自动检查显示器颜色。请检查是否设置了DISPLAY 变量。 可以使用下述命令解决这个问题: 1.在root下执行 #xdpyinfo 若不能正常显示继续下面

18、步骤2.进入桌面环境运行终端在root下执行#xhost + localhost3. 切换到Oracle用户: #su - oracle4.在Oracle用户下执行命令: export DISPLAY=:1.0 5.#xhost + 返回信息为: access control disabled,clients can connect from any host 6.在Oracle下执行xdpyinfo命令,如果能正常显示,说明设置成功linux下oracle设置环境变量需要设置ORACLE_HOME和ORACLE_SID两个环境变量,再把ORACLE的bin目录添加到PATH中即可,通常缺省安

19、装的情况下ORACLE_SID=orcl,ORACLE_HOME=/home/oracle/oracle/product/10.这样的形式,操作步骤:1、su oracle并回车切换到oracle用户;2、cd并回车回到oracle用户目录;cd /home/oraclels -a3、vi .bash_profile并回车编辑该文件,按I键进入插入状态,在最后加入以下行:export ORACLE_SID=orclexport ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1export PATH=$ORACLE_HOME/bin:$PAT

20、H输入完毕后按ESC键退出vi编辑状态,输入:wq并回车存盘退出。注销所有oracle用户,再使用oracle登录即可。安装时若遇到如下错误直接忽略Error in invoking target agent nmb nmo nmhs of makefile ins_emagent.mk这个错误。从网上的一些解决方法,我感觉像是ORACLE暂时对RHEL6支持不够造成的。我直接忽略了,点击继续安装在linux下出现cannot restore segment prot after reloc: Permission denied应用程序连接oracle的库时会出现如下错误:XXXXX:: er

21、ror while loading shared libraries: /usr/local/oracle/product/10.2.0/lib/libnnz10.so: cannot restore segment prot after reloc: Permission denied或者:XXXXX:: error while loading shared libraries: /usr/local/oracle/product/10.2.0/lib/libclntsh.so.10.1: cannot restore segment prot after reloc: Permission

22、 denied等错误。解决办法是用chcon命令把相应文件的属性改一下即可,如:chcon -t texrel_shlib_t /usr/local/oracle/product/10.2.0/lib/libnnz10.sochcon -t texrel_shlib_t /usr/local/oracle/product/10.2.0/lib/libclntsh.so.10.1上诉文件目录参考时要改成自己的。解决执行Oracle控制脚本时遇到的 “cat: /etc/oratab: 没有那个文件或目录”的问题打开dbshut指令查看,发现了引起错误的语句::# $Header: dbshut.

23、sh.pp 03-apr-2001.13:38:20 jboyce Exp $ dbshut.sh.pp Copyr (c) 1991 Oracle# usage: dbshut# This script is used to shutdown ORACLE from /etc/rc(.local).# It should ONLY be executed as part of the system boot procedure.#ORATAB=/etc/oratab查看相应的文件# find/etc/oratabfind: /etc/oratab:没有那个文件或目录这个文件居然不存在,确定是

24、由于该文件的丢失引起的原因。通过如下指令查看该文件是否在系统其它地方# find / -name “oratab”结果居然没找到。估计是当初安装Oracle的遗留问题。解决方案由于该文件已经丢失,所以到另外一台安装了同样版本的Oracle的服务器上查询相应的文件,果然找到了相应的文件,内容如下:# This file is used by ORACLE utilities.It is created by root.sh# and updated by the Database Configuration Assistant when creating# a database.# A colo

25、n, :, is used as the field terminator.A new line terminates# the entry.Lines beginning with a pound sign, #, are comments.# Entries are of the form:#$ORACLE_SID:$ORACLE_HOME:# The first and second fields are the system identifier and home# directory of the database respectively.The third filed indic

26、ates# to the dbstart utility that the database should , Y, or should not,# N, be brought up at system boot time.# Multiple entries with the same $ORACLE_SID are not allowed.# *:/opt/ora9/product/9.2:N# *:/opt/ora9/product/9.2:N*:/opt/ora9/product/9.2:Noracle:/opt/ora9/product/9.2:Ndemo:/opt/ora9/pro

27、duct/9.2:N拷贝完以后一定记得要修改相应的内容。P.S.对于oratab文件的说明:1.只在Linux环境中存在2.设置格式:: 示例:oracle:/opt/ora9/product/9.2:N3.可以为不同的数据库设置相应的选项4.如果想用$ORACLE_HOME/bin/dbstart脚本来启动数据库,则需要将/etc/oratab文件中相应的数据库的项置为Y,简单的说即dbstart脚本根据oratab文件中的配置决定启动哪几个数据库。5.如果不使用dbstart脚本启动数据库,而是用自己的脚本来启动,那么根本不用关心oratab文件。Environment variable

28、ORACLE_UNQNAME not defined. Please set ORACLE_UNQNAME to database unique name解决方法: 在启动的时候先设置一下oracle_unqname set oracle_unqname=$ORACLE_SID如果还是失败,在环境变量中添加: vi /.bash_profile在最后添加:exportORACLE_UNQNAME=$ORACLE_SID启动dbconsole emctl start dbconsole如果还出现上述的错误:删除dbconsole重新配置emca -deconfig dbconsole db -r

29、epos drop如果删除失败,进入数据库删除dbconsole以前的用户,并且修改DBSNMP密码 sqlalter user dbsnmp identified by orcl; 删除早期DBCONSOLE创建的用户:sqldrop role MGMT_USER;sqldrop user MGMT_VIEW cascade;sqldrop user sysman cascade;删除早期DBCONSOLE创建的对象:sqldrop PUBLIC SYNONYM MGMT_TARGET_BLACKOUTS;sqldrop public synonym SETEMVIEWUSERCONTEXT;重新创建DBCONSOLE:(如果是在windows下,要先到注册表删除DBCONSOLE的服务,重启电脑)emca -config dbcontrol db -repos create根据提示,先输入SID,再输入Y继续;输入端口1521,输入SYS密码,输入DBSNMP

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1