制作:Evan邮箱:370048648@qq.com-1-CentOSV5.5x64中Oracle11gR2x64安装教程测试环境:VMwareWorkstationV6.5.1,OracleDatabase11gRelease2(11.2.0.1.0)Enterprise/StandardEditionforLinuxx86-X64IntelCore2P87002.53GCPU,1G内存,硬盘40G。采用虚拟机的安装方式。首先,在官方网站上下载Oracle数据库安装文件linux.x64_11gr2_database_1of2.ziplinux.x64_11gr2_database_2of2.zip环境准备:1.安装CentOSV5.5x86_64bit版本(CentOS-5.5-x86_64-bin-DVD-1of2.iso4.09G,CentOS-5.5-x86_64-bin-DVD-2of2.iso412M).分区大小请注意,一般需要手动设定,把/根分区调整到最大,swap分区在4G以上,如下图注意以下自定义选择项DesktopEnvironments---GNOMEDesktopEnvironment里面请全部选择。Development---Developmentlibraries默认项GNOMESoftwareDevelopment默认项JaveDavelopment默认项legacySoftwareDevelopment里面请全部选择XSoftwareDevelopment里面请全部选择,一定要全部以下三项不用选择“DevelopmentTools”、“KDESoftwareDevelopment”、“Ruby”。BaseSystem---AdministrationToolsDialupNetwordingSupportJavaLegacySoftwareSupportOpenFabricsEnterpriseDistribution制作:Evan邮箱:370048648@qq.com-2-SystemToolsXWindowSystem除去Base项不选择外,其它都选上。如下图如果系统安装完成后,你也可以手动添加这些功能包。如下图挂载光驱#mkdir/mnt/cdrom制作:Evan邮箱:370048648@qq.com-3-#mount-tiso9660-r/dev/cdrom/mnt/cdrom再安装VMwareTools,以方便你传送文件到Linux系统中。#mkdir/vmware#cp/mnt/cdrom/VMwareTools-7.8.4-126130.tar.gz/vmware#cd/vmware#tarzxvfVMwareTools-7.8.4-126130.tar.gz#cdvmware-tools-distrib/#./vmware-install.pl全部回答yes,并选择1024x768分辨率。再reboot系统。安装前的环境配置2.要查看系统上安装了这些程序包的哪些版本,运行以下命令,如果缺少相应的开发包,可能会造成Oracle安装不上去。所以请检查一下,把缺少的包装上去。[root@oracleserver~]#rpm-qgccmakebinutilsopenmotifsetarchlibaiogcc-4.1.2-48.el5make-3.81-3.el5binutils-2.17.50.0.6-14.el5openmotif-2.3.1-5.el5_5.1setarch-2.0-1.1libaio-0.3.106-5[root@oracleserverCentOS]#rpm-qa|grepglibcglibc-headers-2.5-49glibc-common-2.5-49compat-glibc-2.3.4-2.26glibc-2.5-49glibc-devel-2.5-49compat-glibc-headers-2.3.4-2.26[root@oracleserverCentOS]#rpm-qa|grepcompatcompat-gcc-34-c++-3.4.6-4compat-libgcc-296-2.96-138compat-libstdc++-33-3.2.3-61java-1.4.2-gcj-compat-1.4.2.0-40jpp.115制作:Evan邮箱:370048648@qq.com-4-compat-glibc-2.3.4-2.26compat-libstdc++-296-2.96-138avahi-compat-libdns_sd-0.6.16-7.el5compat-gcc-34-3.4.6-4compat-db-4.2.52-5.1java-1.4.2-gcj-compat-src-1.4.2.0-40jpp.115java-1.4.2-gcj-compat-javadoc-1.4.2.0-40jpp.115java-1.4.2-gcj-compat-devel-1.4.2.0-40jpp.115compat-glibc-headers-2.3.4-2.26grepMemTotal/proc/meminfogrepSwapTotal/proc/meminfouname-mi4检查环境:rpm-q--qf'%{NAME}-%{VERSION}-%{RELEASE}(%{ARCH})\n'\binutilscompat-dbcontrol-centergccgcc-c++glibcglibc-common\libstdc++libstdc++-develmakepdkshsysstatlibaio\glibc-develcompat-libstdc++-33compat-libstdc++-296glibc-headers\libgomplibXpopenmotifsetarch再加上glibc-devel-2.5-49(i386)libgomp-4.4.0-6.el5(i386)libstdc++-devel-4.1.2-48.el5(i386)这3个文件CentOS5.6标准安装,使用YUM安装以下所需软件yuminstall-ycompat-dbpdkshsysstatscreenlibXpcompat-libstdc++*binutils-2.17.50.0.6compat-libstdc++-33-3.2.3elfutils-libelf-0.125elfutils-libelf-devel-0.125elfutils-libelf-devel-static-0.125gcc-4.1.2gcc-c++-4.1.2glibc-2.5-24glibc-common-2.5glibc-devel-2.5glibc-headers-2.5kernel-headers-2.6.18ksh-20060214libaio-0.3.106libaio-devel-0.3.106制作:Evan邮箱:370048648@qq.com-5-libgcc-4.1.2libgomp-4.1.2libstdc++-4.1.2libstdc++-devel-4.1.2make-3.81numactl-devel-0.9.8.i386sysstat-7.0.2再将下面这些RPM包按顺序手动安装一下,在安装光盘的CentOS文件夹里面。以如下的格式安装即可#rpm–ivh/mnt/cdrom/CentOS/libaio-devel-0.3.106-5.i386.rpmlibaio-devel-0.3.106-5.i386.rpmlibaio-devel-0.3.106-5.x86_64.rpmunixODBC-2.2.11-7.1.i386.rpmunixODBC-2.2.11-7.1.x86_64.rpmunixODBC-devel-2.2.11-7.1.i386.rpmunixODBC-devel-2.2.11-7.1.x86_64.rpmpdksh-5.2.14-36.el5.x86_64.rpmperftest-1.2.3-1.el5.x86_64.rpmsysstat-7.0.2-3.el5.x86_64.rpm3.kernel内核参数修改vi/etc/sysctl.conf,在行末添加以下内容,在CentOs5.5上会看到kernel.shmmax=4294967295kernel.shmall=268435456这些参数已经存在并且默认启用了,需要将原kernel.shmmax与kernel.shmall参数注释掉。并在文件末尾添加以下内容:#usefororacle11gfs.file-max=6815744fs.aio-max-nr=1048576kernel.shmall=2097152kernel.shmmax=2147483648kernel.shmmni=4096kernel.sem=25032000100128net.ipv4.ip_local_port_range=900065500net.core.rmem_default=4194304net.core.rmem_max=4194304net.core.wmem_default=262144net.core.wmem_max=1048576再运行sysctl-p应用以上参数以root用户身份运行以下命令来验证您的设置:/sbin/sysctl-a|grepshm/sbin/sysctl-a|grepsem/sbin/sysctl-a|grepfile-max制作:Evan邮箱:370048648@qq.com-6-/sbin/sysctl-a|grepip_local_port_range/sbin/sysctl-a|greprmem_default/sbin/sysctl-a|greprmem_max/sbin/sysctl-a|grepwmem_default/sbin/sysctl-a|grepwmem_max另外在安装oracle数据库的时候要注意/etc/hosts与/etc/sysconfig/network文件主机名的一致性,否则会在后面运行netca和dbca可能出现错误提示。例如:/etc/hosts文件内容如下:192.168.1.120oracleserver-x64127.0.0.1localhost.localdomainlocalhost/etc/sysconfig/network内容如下:#NETWORKING_IPV6=yes//该行已经注释NETWORKING=yesHOSTNAME=oracleserver-x64Oracle建议对每个Linux帐户可以使用的进程数和打开的文件数设置限制。要进行这些更改,以root用户的身份执行下列命令:5.vi/etc/security/limits.conf在文件末尾添加以下内容#usefororacle11goraclesoftnproc2047oraclehardnproc16384oraclesoftnofile1024oraclehardnofile655366.vi/etc/pam.d/login行末添加以下内容sessionrequired/lib/security/pam_limits.sosessionrequiredpam_limits.so7.vi/etc/selinux/config确保以下内容SELINUX=disabled关闭SELIINUX制作:Evan邮箱:370048648@qq.com-7-8.vi/etc/profile,在最后加入:if[$USER=oracle];thenif[$SHELL=/bin/