2oracle10gforlinux安装手册—VER1.02010年5月3文档信息文挡名称初稿作者审核建立日期oracle10gforlinux安装手册2010-5-10文档修订记录章节编号章节名称修订内容简述修订日期修订前版本号2目录第1章前言.........................................................31.1编写目的..............................................................31.2文档说明..............................................................31.3参考文档..............................................................3第2章安装准备......................................................42.1安装前的准备..........................................................42.2注意事项..............................................................5第3章数据库软件安装.................................................63.1软件安装..............................................................63.2补丁安装.............................................................103.3安装PSUORCPU.........................................................15第4章数据库实例创建................................................174.1创建实例.............................................................174.2创建监听和服务.......................................................27第1章前言1.1编写目的1.2文档说明1、粗体表示注意事项、操作命令2、斜体表示示例3、{}中内容为必选参数4、[]中内容为可选参数,多个可选参数间用“|”分隔5、所有操作命令加下划线6、文中所涉及到的截图仅供参考7、本文适用于所有redhatAS5版本1.3参考文档第2章安装准备2.1安装前的准备2.1.1调整系统参数服务器配置不同,调整的参数大小不同,此处仅为示例。#cp/etc/sysctl.conf/etc/sysctl.conf.`date+%Y%m%d%H%M%S`#sed-i's/kernel.shmmax/#kernel.shmmax/g'/etc/sysctl.conf#sed-i's/kernel.shmall/#kernel.shmall/g'/etc/sysctl.conf#sed-i'$a\kernel.shmall=2097152'/etc/sysctl.conf#sed-i'$a\kernel.shmmax=6442450940'/etc/sysctl.conf#sed-i'$a\kernel.shmmni=4096'/etc/sysctl.conf#sed-i'$a\kernel.sem=25032000100128'/etc/sysctl.conf#sed-i'$a\fs.file-max=65536'/etc/sysctl.conf#sed-i'$a\net.core.rmem_default=1048576'/etc/sysctl.conf#sed-i'$a\net.core.rmem_max=1048576'/etc/sysctl.conf#sed-i'$a\net.core.wmem_default=262144'/etc/sysctl.conf#sed-i'$a\net.core.wmem_max=262144'/etc/sysctl.conf#sysctl–p#sed-i'$a\oraclesoftnproc10240'/etc/security/limits.conf#sed-i'$a\oraclehardnproc16384'/etc/security/limits.conf#sed-i'$a\oraclesoftnofile10240'/etc/security/limits.conf#sed-i'$a\oraclehardnofile65536'/etc/security/limits.conf#sed-i'$a\sessionrequired/lib/security/pam_limits.so'/etc/pam.d/login2.1.2环境变量配置#su-oracle$vi.bash_profieexportORACLE_BASE=/home/db/oracleexportORACLE_SID=?//设置你的sidexportORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1exportPATH=$ORACLE_HOME/bin:$ORACLE_BASE/OPatch:$PATH2.1.3安装附加软件包#rpm-ivhlibXp-1.0.0-8.1.el5.i386.rpm此安装包位于操作系统安装光盘Server目录中,不同版本的安装光盘,其发布的版本不同,此处是AS5.4中的版本号。实施时以你的操作系统安装光盘中的版本号为准。2.1.4介质准备将安装软件上传到服务器,建议使用oracle用户上传到home家目录。(传到其它目录也可,^_^,确保oracle用户读和执行即可)。本文所使用软件全部存放在oracle家目录中。执行unzip10201_database_linux32.zip解压安装文件,你将得到database目录。执行unzipp6810189_10204_Linux-x86.zip解压补丁包(此处以10.2.0.4的32位版为例,其它版本操作方法与此相同),你将得到Disk1目录。执行unzipp9352164_10204_Linux-x86.zip解压PSU补丁包(此处为10.2.0.4.4,每个季度发布一版,实施时以实际要求的版本为准,此处为示例),你将得到9352164目录。执行unzipp6880880_102000_LINUX.zip解压opatch工具(不同平台版本不同,此处以32位linux平台为例),你将得到OPatch目录2.2注意事项第3章数据库软件安装此处假设所有安装介质都在oracle家目录中解压完成。3.1软件安装#xhostlocal:oracle#su-oracle$./database/runInstaller执行安装命令后,将启动到如下界面,现在“BasicInstallation”,安装时不创建数据库,点击”Next”继续。显示如下图,点击“Next”继续。检查安装环境,通常没有报“failed”,则可以点击”Next”继续。显示安装摘要信息,点击“Install”,开始安装软件。根据提示在root用户下执行脚本,脚本执行完成后,点击“OK”,继续。点击“Exit”,完成安装。点击“Yes“退出安装界面,软件安装完成。3.2补丁安装$./Disk1/runInstaller执行该安装命令,启动补丁安装向导。点击“Next“继续。显示如下所示的路径,点击“Next”继续。点击“Next”继续。如果有错误,修复错误,点击“Retry”,然后继续。暂不配置OCM,点击“Next”继续。显示安装摘要,点击“Install”继续。根据提示,使用root用户执行脚本。注:脚本执行时提示是否覆盖xxx,回答”Y”即可。点击“Exit“完成补丁安装。点击”Yes”,退出安装界面,完成安装。3.3安装psuorcpu此处以9352164为例。$cd9352164$opatchapplyInvokingOPatch10.2.0.4.9OracleInterimPatchInstallerversion10.2.0.4.9Copyright(c)2009,OracleCorporation.Allrightsreserved.OracleHome:/home/db/oracle/product/10.2.0/db_1CentralInventory:/home/db/oracle/oraInventoryfrom:/etc/oraInst.locOPatchversion:10.2.0.4.9OUIversion:10.2.0.4.0OUIlocation:/home/db/oracle/product/10.2.0/db_1/ouiLogfilelocation:/home/db/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/opatch2010-01-28_09-44-45AM.logPatchhistoryfile:/home/db/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/opatch_history.txtApplySessionapplyinginterimpatch'9352164'toOH'/home/db/oracle/product/10.2.0/db_1'Runningprerequisitechecks...Provideyouremailaddresstobeinformedofsecurityissues,installandinitiateOracleConfigurationManager.EasierforyouifyouuseyourMyOracleSupportEmailaddress/UserName.Visit:a@163.com//随便输入就是了^_^.ProvideyourMyOracleSupportpasswordtoreceivesecurityupdatesviayourMyOracleSupportaccount.Password(optional):UnabletoestablishanetworkconnectiontoOracle.IfyoursystemsrequireaproxyserverforoutboundInternetconnections,entertheproxyserverdetailsinthisformat:[proxy-user@]proxy-host[:proxy-port]Ifyouwanttoremainuninformedofcriticalsecurityissuesinyourconfiguration,enterNONEProxyspecification:NONEOPatchdetectednon-clusterOracleHomefromtheinventoryandwillpatchthelocalsystemonly.PleaseshutdownOracleinstancesrunningoutofthisORACLE_HOMEonthelocalsystem.(OracleHome='/home/db/oracle/product/10.2.