您好,欢迎访问三七文档
当前位置:首页 > IT计算机/网络 > 数据库 > RHEL6.1_64安装oracle11gr2
RHEL6.1_64+ORACLE11G操作系统RHEL6.1_64安装桌面,关闭SELINUX和防火墙,1、内存以及swap分区大小Minimum:1GBofRAMRecommended:2GBofRAMormoreTodeterminetheRAMsize,enterthefollowingcommand:#grepMemTotal/proc/meminfoSwap分区大小设置Between1GBand2GB分配1.5timesthesizeoftheRAMBetween2GBand16GB分配EqualtothesizeoftheRAMMorethan16GB分配16GB#grepSwapTotal/proc/meminfo确定大小2、需要安装以下软件binutils-2.20.51.0.2-5.11.el6(x86_64)compat-libcap1-1.10-1(x86_64)compat-libstdc++-33-3.2.3-69.el6(x86_64)compat-libstdc++-33-3.2.3-69.el6.i686gcc-4.4.4-13.el6(x86_64)gcc-c++-4.4.4-13.el6(x86_64)glibc-2.12-1.7.el6(i686)glibc-2.12-1.7.el6(x86_64)glibc-devel-2.12-1.7.el6(x86_64)glibc-devel-2.12-1.7.el6.i686kshlibgcc-4.4.4-13.el6(i686)libgcc-4.4.4-13.el6(x86_64)libstdc++-4.4.4-13.el6(x86_64)libstdc++-4.4.4-13.el6.i686libstdc++-devel-4.4.4-13.el6(x86_64)libstdc++-devel-4.4.4-13.el6.i686libaio-0.3.107-10.el6(x86_64)libaio-0.3.107-10.el6.i686libaio-devel-0.3.107-10.el6(x86_64)libaio-devel-0.3.107-10.el6.i686make-3.81-19.el6sysstat-9.0.4-11.el6(x86_64)unixODBC*libXppdksh配置Yum安装yum-yinstallbinutilscompat-*elfutils-libelf*gccgcc-c++glibc*kernel-headerskshlibaio*libgcclibgomplibstdc++*makesysstatunixODBC*libXpmksh.x86_643、注意主机名[oracle@oracle~]$cat/etc/hosts#Donotremovethefollowingline,orvariousprograms#thatrequirenetworkfunctionalitywillfail.127.0.0.1oracle11glocalhost.localdomainlocalhost::1localhost6.localdomain6localhost6172.16.40.30oracle4、建立用户和组[root@oracle~]#groupaddoinstall[root@oracle~]#groupadddba[root@oracle~]#useradd-goinstall-Gdbaoracle[root@oracle~]#passwdoracle[root@oracle~]#idoracleuid=501(oracle)gid=500(oinstall)groups=500(oinstall),501(dba),503(asmdba)5、修改/etc/sysctl.conf文件,添加以下内容fs.aio-max-nr=1048576fs.file-max=6815744kernel.shmall=2097152kernel.shmmax=5368709121/2屋里内存(单位M)*1024*1024kernel.shmmni=4096kernel.sem=25032000100128net.ipv4.ip_local_port_range=900065500net.core.rmem_default=262144net.core.rmem_max=4194304net.core.wmem_default=262144net.core.wmem_max=1048576#/sbin/sysctl-p执行该命令,使修改生效6、在/etc/pam.d/login配置文件中添加:sessionrequiredpam_limits.so7、在/etc/profile配置文件中添加:if[$USER=oracle];thenif[$SHELL=/bin/ksh];thenulimit-p16384ulimit-n65536elseulimit-u16384-n65536fifi8、再在/etc/security/limits.conf配置文件中添加:oraclesoftnproc2047oraclehardnproc16384oraclesoftnofile1024oraclehardnofile65536oraclesoftstack102409、配置oracle用户的环境变量在/home/oracle/.bash_profile配置文件中添加:umask022TMP=/tmpTMPDIR=/tmpPATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/binLD_LIBRARY_PATH=/usr/lib:/usr/X11R6/libORACLE_BASE=/u01/app/oracleORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1ORACLE_SID=orclLD_LIBRARY_PATH=$ORACLE_HOME/jdk/jre/lib/i386:$ORACLE_HOME/jdk/jre/lib/i386/server:$ORACLE_HOME/rdbms/lib:$ORACLE_HOME/lib:$LD_LIBRARY_PATHPATH=$ORACLE_HOME/bin:$PATHNLS_LANG=SIMPLIFIEDCHINESE_CHINA.AL32UTF8注意这里,我这里是简体中文UTF-8,不然sqlplus会出现乱码exportORACLE_BASEORACLE_HOMEORACLE_SIDLD_LIBRARY_PATHPATHNLS_LANGTMPTMPDIR11、建立相应目录[root@oracle~]#mkdir-p/u01/app/oracle[root@oracle~]#chown-Roracle:oinstall/u01[root@oracle~]#chmod-R775/u01至此,整个环境搭建完毕。如果可以,建议重启系统。接下来下载oracle11g版本安装包linux.x64_11gR2_database_1of2.ziplinux.x64_11gR2_database_2of2.zip使用unzip解压,然后进入database目录里面执行安装程序[oracle@oracle~]$cddatabase/[oracle@oracledatabase]$pwd/home/oracle/database[oracle@oracledatabase]$./runInstaller如果出现错误[oracle@oracledatabase]$./runInstallerStartingOracleUniversalInstaller...CheckingTempspace:mustbegreaterthan120MB.Actual25233MBPassedCheckingswapspace:mustbegreaterthan150MB.Actual3999MBPassedCheckingmonitor:mustbeconfiguredtodisplayatleast256colorsCouldnotexecuteautocheckfordisplaycolorsusingcommand/usr/bin/xdpyinfo.CheckiftheDISPLAYvariableisset.FailedSomerequirementchecksfailed.Youmustfulfilltheserequirementsbeforecontinuingwiththeinstallation,那么切换到root用户运行xhost+然后再切换oracle用户安装。先选择安装数据库,等下用dbca创建实例接下来,使用root用户登陆系统,找到这两个脚本,执行下[root@oracle~]#cd/u01/app/oraInventory/[root@oracleoraInventory]#lsContentsXMLlogsoraInst.locouiinstall.platformoraInstaller.propertiesorainstRoot.sh[root@oracleoraInventory]#./orainstRoot.shChangingpermissionsof/u01/app/oraInventory.Addingread,writepermissionsforgroup.Removingread,write,executepermissionsforworld.Changinggroupnameof/u01/app/oraInventorytooinstall.Theexecutionofthescriptiscomplete.[root@oracleoraInventory]#cd/u01/app/oracle/product/11.2.0/db_1/[root@oracledb_1]#./root.shRunningOracle11groot.shscript...Thefollowingenvironmentvariablesaresetas:ORACLE_OWNER=oracleORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1Enterthefullpathnameofthelocalbindirectory:[/usr/local/bin]:回车Copyingdbhometo/usr/local/bin...Copyingoraenvto/usr/local/bin...Copyingcoraenvto/usr/local/bin...Creating/etc/oratabfile...Entrieswillbeaddedtothe/etc/oratabfileasneededbyDatabaseConfigurationAssistantwhenadatabaseiscreatedFinishedrunninggenericpartofroot.shscript.Nowproduct-specificrootactionswillbeperformed.Finishedproduct-specificrootactions.到这里,数据库安装过程结束,但是目前没有实例,我们使用dbca命令来创建实例Dbca执行的时候如果出现Noprotocolspecified,那么返回到root用户继续执行xhost+
本文标题:RHEL6.1_64安装oracle11gr2
链接地址:https://www.777doc.com/doc-5391711 .html