您好,欢迎访问三七文档
当前位置:首页 > IT计算机/网络 > 数据库 > CentOS55安装Oracle10g
CentOS5.5安装Oracle10g1、配置swap大小在安装Linux划分分区的时候,请根据下表来设置Swap的大小。内存大小MB(RAM)Swap大小(MB)512=RAM10242*RAM1024=RAM=20481.5*RAM2049RAM=8192RAM81920.75*RAM2、修改host在/etc/hosts里增加IP地址和电脑名,以便域名解析。[root@centosCentOS]#vi/etc/hosts#Donotremovethefollowingline,orvariousprograms#thatrequirenetworkfunctionalitywillfail.192.168.0.16centos3、安装rpm包x64位版的Linux需要检查是否安装以后包,例如使用命令:rpm–qa|grepbinutils查询,如果没有,请使用命令:rpm–ivhbinutils-2.15.92.0.2-10.EL4安装。binutils-2.15.92.0.2-10.EL4compat-db-4.1.25-9control-center-2.8.0-12gcc-3.4.3-9.EL4gcc-c++-3.4.3-9.EL4glibc-2.3.4-2glibc-common-2.3.4-2libstdc++-3.4.3-9.EL4libstdc++-devel-3.4.3-9.EL4make-3.80-5pdksh-5.2.14-30sysstat-5.0.5-1libXp-1.0.0-8.1.el5.x86_64.rpmlibXp-1.0.0-8.1.el5.i386.rpmcompat-libstdc++-33-3.2.3-61.i386.rpmcompat-libstdc++-33-3.2.3-61.x86_64.rpm4、调整内核参数编辑/etc/sysctl.conf加入以下内容。kernel.shmall=2097152kernel.shmmax=2147483648kernel.shmmni=4096kernel.sem=25032000100128fs.file-max=65536net.ipv4.ip_local_port_range=102465000net.core.rmem_default=262144net.core.rmem_max=262144net.core.wmem_default=262144net.core.wmem_max=262144使用sysctl–p命令重新加载内核用vi命令编辑以下文件并加入内容。1.)/etc/security/limits.conf*softnproc2047*hardnproc16384*softnofile1024*hardnofile655362.)/etc/pam.d/loginsessionrequiredpam_limits.so3.)/etc/profileif[$USER=oracle];thenif[$SHELL=/bin/ksh];thenulimit-p16384ulimit-n65536elseulimit-u16384-n65536fifi5、创建用户和组[root@centos/]#groupaddoinstall[root@centos/]#groupadddba[root@centos/]#groupaddoper[root@centos/]#useradd-goinstall-Gdba,operoracle[root@centos/]#idoracleuid=500(oracle)gid=500(oinstall)groups=500(oinstall),501(dba),502(oper)[root@centos/]#passwdoracleChangingpasswordforuseroracle.NewUNIXpassword:BADPASSWORD:itdoesnotcontainenoughDIFFERENTcharactersRetypenewUNIXpassword:passwd:allauthenticationtokensupdatedsuccessfully.6、创建安装oracle的文件夹,并设置其相应权限给Oracle用户mkdir-p/data/app/oracle/product/10.2.0.1chown-Roracle:oinstall/data/appchmod775/data/app7、伪装cp/etc/redhat-release/etc/redhat-release.bak使用vi命令编辑/etc/redhat-release,替换为如下代码:RedHatEnterpriseLinuxASrelease4(NahantUpdate4)8、设置Oracle环境变量使用命令vi/home/oracle/.bash_profile增加环境变量LANG=enDISPLAY=192.168.89.6:0.0ORACLE_BASE=/data/app/oracleORACLE_SID=hisORACLE_HOME=$ORACLE_BASE/product/10.2.0.1PATH=$ORACLE_HOME/bin:$PATH:$HOME/binLD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/libCLASSPATH=$ORACLE_HOME/jre:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlibexportPATHLANGDISPLAYORACLE_BASEORACLE_SIDORACLE_HOMELD_LIBRARY_PATHCLASSPATH9、解压安装包文件,安装jdkgunzip10201_database_linux_x86_64.cpio.gzcpio-idmv10201_database_linux_x86_64.cpio[root@centossoft]#./jdk-6u22-linux-x64-rpm.bin10、以oracle身份登录图形界面进行安装[root@centos~]#xhost+accesscontroldisabled,clientscanconnectfromanyhost[root@centos~]#su-oracle[oracle@centos~]$xclock先安装软件./runInstaller安装完成后,以root用户执行./orainstRoot.sh./root.sh安装数据库dbca配置监听netca11、设置oracle自动启动1.)编辑dbstart[root@centos/]#vi/data/app/oracle/product/10.2.0.1/bin/dbstart#SetthistobringupOracleNetListenerORACLE_HOME_LISTNER=/ade/vikrkuma_new/oracle应该是在78行,将其改为:#SetthistobringupOracleNetListenerORACLE_HOME_LISTNER=$ORACLE_HOME2.)编辑/etc/oratab最下一行his:/data/app/oracle/product/10.2.0.1:N更改为:his:/data/app/oracle/product/10.2.0.1:Y3.)新建一个文件vi/etc/init.d/oracle#!/bin/bash##oracledbThisStarts/StopstheOracleServer#chkconfig:3459910#description:scriptfortheOracleInstance,Listener#/etc/init.d/oracledb##Run-levelStartupscriptfortheOracleListenerandInstances#Itreliesontheinformationon/etc/oratabexportORACLE_OWNR=oracleexportORACLE_HOME=/data/app/oracle/product/10.2.0.1echoOracleScriptinit.dif[!-f$ORACLE_HOME/bin/dbstart-o!-d$ORACLE_HOME]thenechoOraclestartup:cannotstartexit1ficase$1instart)#Oraclelistenerandinstancestartupecho-nStartingOracle:su-$ORACLE_OWNR-c$ORACLE_HOME/bin/lsnrctlstartsu-$ORACLE_OWNR-c$ORACLE_HOME/bin/dbstart$ORACLE_HOMEsu-$ORACLE_OWNR-c$ORACLE_HOME/bin/emctlstartdbconsoletouch/var/lock/oracleechoOK;;stop)#Oraclelistenerandinstanceshutdownecho-nShutdownOracle:su-$ORACLE_OWNR-c$ORACLE_HOME/bin/emctlstopdbconsolesu-$ORACLE_OWNR-c$ORACLE_HOME/bin/lsnrctlstopsu-$ORACLE_OWNR-c$ORACLE_HOME/bin/dbshut$ORACLE_HOMErm-f/var/lock/oracleechoOK;;reload|restart)$0stop$0start;;*)echoUsage:`basename$0`start|stop|restart|reloadexit1esacexit04.)增加启动项[root@centos/]#chmod+x/etc/rc.d/init.d/oracle[root@centos/]#chkconfig--addoracle[root@centos/]#chkconfig--list|greporacleoracle0:关闭1:关闭2:关闭3:启用4:启用5:启用6:关闭[root@centos10.2.0.1]#cd/usr/bin[root@centosbin]#pwd/usr/bin[root@centosbin]#ln-s/etc/rc.d/init.d/oracle12、日常操作上述已经设置好了服务器开机后会自动启动oracle服务,也可以用如下命令操作。1.)启动oracleoraclestart2.)关闭oracleoraclestop3.)重启oracleoraclerestart
本文标题:CentOS55安装Oracle10g
链接地址:https://www.777doc.com/doc-8003 .html