Red Hat AS 55(64Bit)安装Oracle(10g-补丁升级10204)最新完整记录.docx

上传人:小飞机 文档编号:1663458 上传时间:2022-12-13 格式:DOCX 页数:24 大小:1.14MB
返回 下载 相关 举报
Red Hat AS 55(64Bit)安装Oracle(10g-补丁升级10204)最新完整记录.docx_第1页
第1页 / 共24页
Red Hat AS 55(64Bit)安装Oracle(10g-补丁升级10204)最新完整记录.docx_第2页
第2页 / 共24页
Red Hat AS 55(64Bit)安装Oracle(10g-补丁升级10204)最新完整记录.docx_第3页
第3页 / 共24页
Red Hat AS 55(64Bit)安装Oracle(10g-补丁升级10204)最新完整记录.docx_第4页
第4页 / 共24页
Red Hat AS 55(64Bit)安装Oracle(10g-补丁升级10204)最新完整记录.docx_第5页
第5页 / 共24页
点击查看更多>>
资源描述

《Red Hat AS 55(64Bit)安装Oracle(10g-补丁升级10204)最新完整记录.docx》由会员分享,可在线阅读,更多相关《Red Hat AS 55(64Bit)安装Oracle(10g-补丁升级10204)最新完整记录.docx(24页珍藏版)》请在三一办公上搜索。

1、Red Hat AS 5.5(64Bit)安装Oracle(10g-补丁10.2.0.4)一、安装系统Swap大小设置:Available RAMSwap Space RequiredBetween 1024 MB and 2048 MB1.5 times the size of RAMBetween 2049 MB and 8192 MBEqual to the size of RAMMore than 8192 MB0.75 times the size of RAM在系统安装的过程中,一定选择安装所有开发包,建议不要安装SELinux或者安装后在系统中禁止SELinux运行,并且关闭防火

2、墙,否则会出现一些莫名其妙的问题。为防止Oracle安装过程中出现乱码,建议使用英文作为系统语言,进行Oracle的安装工作。(注解:#号代表的是root用户执行语句,$代表的是oracle用户执行语句,请注意区分)(当前系统内存为8G 操作系统为32位redhat 5.3)二、安装Oracle前的系统准备工作1.检查需要的软件包可以使用rpm -qa|grep 软件包关键词命令进行检测,一般情况下会需要手动安装如下的软件包:a. 检查内核版本 ,oracle 10g需要的linux内核版本为2.4.9-e.25(或者更高的版本) 检查linux内核版本命令行如下:# uname r b. O

3、racle 10 g其他所需程序包的版本gcc-2.96-118.7.2make-3.79.1-8binutils-2.11.90.0.8-12openmotif-2.1.30-11glibc-2.2.4-32.8检查程序包命令行如下:# rpm -q gcc make binutils openmotif glibc c. 运行命令:# rpm -q gcc make binutils openmotif setarch compat-db compat-gcc openmotif compat-gcc-c+ compat-libstdc+-devel再次查看系统程序包版本gcc-3.2.3

4、-2make-3.79binutils-2.11openmotif-2.2.2-16setarch-1.3-1compat-gcc-7.3-2.96.122compat-gcc-c+-7.3-2.96.122compat-libstdc+-7.3-2.96.122compat-libstdc+-devel-7.3-2.96.122campat-db-4.0.14.5(oracle 10g数据库安装指南中将其列为必须,但此处并不需要)如果提示未安装信息,如package compat-libstdc+-devel is not installed 则需要安装此程序包d. 相关缺少软件包打包安装:

5、软件包安装命令:rpm -ivh 文件路径如:rpm -ivh /compat-libstdc+-7.3-2.96.122.rpm如果安装文件时没有显示文件的安装进度(红色框内),则文件安装失败,可以强制安装,在命令行最后面加上 -nodeps force 即可以强制执行安装注意:如果在操作系统安装时,开发组件选择不全,以上安装包是不够的,需要检查以下安装包是否已经安装: libgomp-4.4.0-6.el5.x86_64.rpm kernel-headers-2.6.18-164.el5.x86_64.rpm glibc-headers-2.5-42.x86_64.rpm libstdc+

6、-devel-4.1.2-46.el5.x86_64.rpm sysstat-7.0.2-3.el5.x86_64.rpm glibc-devel-2.5-42.x86_64.rpm libaio-devel-0.3.106-3.2.x86_64.rpm gcc-4.1.2-46.el5.x86_64.rpm gcc-c+-4.1.2-46.el5.x86_64.rpm libtermcap-devel-2.0.8-46.1.x86_64.rpm readline-devel-5.1-3.el5.x86_64.rpm unixODBC-2.2.11-7.1.x86_64.rpm unixODB

7、C-devel-2.2.11-7.1.x86_64.rpm glibc-devel-2.5-42.i386.rpm libaio-devel-0.3.106-3.2.i386.rpm unixODBC-2.2.11-7.1.i386.rpm unixODBC-devel-2.2.11-7.1.i386.rpm compat-db-4.2.52-5.1.x86_64.rpm compat-gcc-34-3.4.6-4.x86_64.rpm compat-gcc-34-c+-3.4.6-4.x86_64.rpm gdb-6.8-37.el5.x86_64.rpm libXp-1.0.0-8.1.e

8、l5.i386.rpm libstdc+-devel-4.1.2-46.el5.i386.rpmelfutils-libelf-devel-static-0.137-3.el5.x86_64.rpm elfutils-libelf-devel-0.137-3.el5.x86_64.rpm 没有则要从安装盘上找到并安装,不再细说。2.修改Linux发行版本信息 由于Oracle 10g发行的时候,RedHat Enterprise Linux 5没有发行,所以Oracle 10g并没有对RedHat Enterprise Linux 5确认支持,我们需要手工修改Linux的发行注记,让Oracl

9、e 10g支持RedHat Enterprise Linux 5。编辑/etc/redhat-release文件# vi /etc/redhat-release将其中的内容Red Hat Enterprise Linux Server release 5 (Tikanga) 修改为Red Hat Enterprise Linux AS release 4 (Nahant Update 4)(oracle安装完成之后,将其改回原来的版本)2.1修改swap值创建swapfile文件步骤如下:#dd if=/dev/zero of=/swapfile bs=1024 count=(物理内存-已有s

10、wap)m*1024#mkswap /swapfile#swapon /swapfile#vi /etc/fstab,增加:/swapfileswapswap defaults 0 0#free -m3.修改系统内核参数3.1修改内核参数# vi /etc/sysctl.confkernel.shmall = 3145728/该参数表示系统一次可以使用的共享内存总量(以页为单位)。缺省值就是2097152, 3145728*4/1024/1024=12G 说明SGA可设置的最大值kernel.shmmax = 12884901888/该参数定义了共享内存段的最大尺寸(以字节为单位),缺省为32

11、M ,表示为sga所分内存段的大小,如果专用的Oracle服务器,则sga建议为1段。 与kernel.shmall对应kernel.shmmni = 4096 / 这个内核参数用于设置系统范围内共享内存段的最大数量。该参数的默认值是 4096 。kernel.sem = 250 32000 100 128 / 表示设置的信号量 fs.file-max = 65536 / 表示文件句柄的最大数量。文件句柄设置表示在linux系统中可以打开的文件数量 net.ipv4.ip_local_port_range = 1024 65000 /端口范围net.core.rmem_default = 26

12、2144 /socket接收缓冲区缺省大小,字节net.core.rmem_max = 262144/ socket接收缓冲区最大大小,字节net.core.wmem_default = 262144/ socket发生缓冲区缺省大小,字节net.core.wmem_max = 262144/ socket发送缓冲区最大大小,字节为了便于方便复制,将代码贴出:# vi /etc/sysctl.confkernel.shmmax = 12884901888kernel.shmall = 3145728kernel.sem = 250 32000 100 128net.ipv4.ip_local_

13、port_range = 1024 65000fs.file-max = 65536net.core.rmem_default = 262144net.core.rmem_max = 262144net.core.wmem_default = 262144net.core.wmem_max = 262144修改好内核参数后,执行如下命令使新的设置生效# /sbin/sysctl -p注:如果sysctl.conf已经存在此参数,并且原参数值比修改值大,那么不建议改动sysctl.conf原本已经具有的相应参数值4.创建Oracle用户、组、安装目录在这里只讨论单主机环境,不考虑RAC环境的配置

14、。(1) 创建Oracle用户组# groupadd oinstall# groupadd dba(2) 创建Oracle用户# useradd -m -g oinstall -G dba oracle(3) 设置Oracle用户口令# passwd oracle(4) 创建Oracle安装目录以及数据存放目录# mkdir -p /oracle# mkdir -p /oradata(5) 修改目录权限# chown -R oracle:oinstall /oracle/ /oradata/# chmod -R 755 /oracle/ /oradata/注:方便拷贝groupadd oins

15、tallgroupadd dbauseradd -m -g oinstall -G dba oraclepasswd oraclemkdir -p /oraclemkdir -p /oradatachown -R oracle:oinstall /oracle/ /oradata/chmod -R 755 /oracle/ /oradata/5.添加以下内容到/etc/security/limits.conf# vi /etc/security/limits.conforacle soft nproc 2047oracle hard nproc 16384oracle soft nofile

16、1024oracle hard nofile 655366.添加以下内容到/etc/pam.d/login# vi /etc/pam.d/loginsession required /lib/security/pam_limits.sosession required pam_limits.so7.添加以下内容到/etc/profile# vi /etc/profileif $USER = oracle ; then if $SHELL = /bin/ksh ; then ulimit -p 16384 ulimit -n 65536 else ulimit -u 16384 -n 65536

17、 fifi8.配置Linux主机检查/etc/hosts文件中是否有localhost的记录(指向127.0.0.1即可),若没有的话,在后面配置Oracle监听的时候会出现一些问题,导致无法启动监听,在此手工添加此记录即可。显示如下图:127 .0.0.1 localhost.localdomain localhost9.配置oracle用户环境变量# su - oracle$ vi /.bash_profile增加如下内容:export ORACLE_BASE=/oracleexport ORACLE_SID=portal1export ORACLE_HOME=$ORACLE_BASE/p

18、roduct/10.2.0/db_1export PATH=$PATH:$ORACLE_HOME/binexport LD_LIBARY_PATH=$ORACLE_HOME/lib: /lib:/usr/libexport PATHumask 022保存后使用如下命令,使设置生效:$ source /.bash_profile三、安装Oracle,并进行相关设置1.解压缩安装文件Oracle的安装包有这样几种格式:(1) zip这种格式最好解压缩,直接使用命令unzip 文件名即可(2) cpio.gz这种格式有这样几种解压缩方式a. # zcat XXXX.cpio.gz | cpio -i

19、dmv b. # gunzip XXXX.cpio.gz解压出XXXX.cpio文件然后再 # cpio -idvm CONNECT SYS /AS SYSDBAEnter password:SYS_passwordSQL SHUTDOWN IMMEDIATE1.4 Back Up the System切换到root用户:#cd /#tar cvf oracle_bak.tar /oracle#tar cvf oracle_bin.tar /usr/local/bin2、安装步骤除非特别说明,使用oracle用户执行。(1)与前面Oracle安装相同,使用xmanager xstart工具,准

20、备工作相同。(2)开始安装:$cd /home/oracle/Disk1$./runInstallersA. On the Welcome screen, click NextB. On the Specify Home Details screen, select the name of the Oracle home that you want to update, or select the Path that you want to update from the list, then click Next.C. If you are installing the patch set

21、on an Oracle RAC cluster, click Next when the Selected Nodes screen appears.D. On the Product-specific Prerequisite Checks screen, correct any reported errors, and click Next.E. Enter details regarding the CSI Number, OracleMetaLink Account user name and Country code on the Oracle Configuration Mana

22、ger Registration screen and click Next.F. On the Summary screen, click Install.G. When prompted, run the $ORACLE_HOME/root.sh script as the root user. If you are applying the patch set to an Oracle RAC installation, then run the root.sh script on each node of the cluster.H. On the End of Installatio

23、n screen, click Exit, then click Yes to exit from Oracle Universal Installer.3、安装后处理(1)Updating Oracle Time Zone Definitions(2)Upgrading Oracle Database 10g Release 10.2.0.x to Oracle Database 10g Release 10.2.0.4以下步骤必须在安装完补丁后执行,否则实例不能启动。A. $lsnrctl startB. $ dbuaa) On the Welcome screen, click Next

24、.b) On the Databases screen, select the name of the Oracle Database that you want to update, then click Next.c) On the Recompile Invalid Objects screen, select the Recompile the invalid objects at the end of upgrade option, then click Next.d) If you have not taken the back up of the database earlier

25、, on the Backup screen, select the I would like to take this tool to backup the database option, stipulate the Path, then click Next.e) On the Summary screen, check the summary, then click Finish.f) On the End of Database Upgrade Assistants Upgrade Results screen, click Close to exit from Oracle Dat

26、abase Upgrade Assistant.五、 安装完成后将/etc/redhat-release文件中的内容修改回Red Hat Enterprise Linux Server release 5 (Tikanga)#vi /etc/redhat-releaseRed Hat Enterprise Linux Server release 5 (Tikanga)六、问题描述1不识别sqlplus命令行oracledg1 $ sqlplus /nolog bash: sqlplus: command not found oracledg1 $ ln -s $ORACLE_HOME/bin

27、/sqlplus /usr/bin ln: creating symbolic link /usr/bin/sqlplus to /bin/sqlplus: Permission deni ed oracledg1 $ su - root Password: rootdg1 # ln -s $ORACLE_HOME/bin/sqlplus /usr/bin rootdg1 # su - oracle oracledg1 $ sqlplus /nolog SQL*Plus: Release 10.2.0.1.0 - Production on Mon May 11 12:51:24 2009 Copyright (c) 1982, 2005, Oracle. All rights reserved. 2 。安装时,报内存溢出修改核心参数,看核心参数的配置是否正确。

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 生活休闲 > 在线阅读


备案号:宁ICP备20000045号-2

经营许可证:宁B2-20210002

宁公网安备 64010402000987号