1.检查系统包是否已经安装。rpm-qgrepbinutils-2.*\elfutils-libelf-0.*\glibc-2.*\glibc-common-2.*\libaio-0.*\libgcc-4.*\libstdc++-4.*\make-3.*\compat-libstdc++-33\elfutils-libelf-devel-0.*\glibc-devel-2.*\gcc-4.*\gcc-c++-4.*\libaio-devel-0.*\libstdc++-devel-4.*\unixODBC-2.*\unixODBC-devel-2.*\sysstat-7.*2.如缺少相应的补丁包,可以到系统安装盘安装相关的补丁包cd/media/Enterprise\Linux\dvd\20090127/Server/rpm-Uvhgrepbinutils-2.*rpm-Uvhelfutils-libelf-0.*rpm-Uvhglibc-2.*rpm-Uvhglibc-common-2.*rpm-Uvhlibaio-0.*rpm-Uvhlibgcc-4.*rpm-Uvhlibstdc++-4.*rpm-Uvhmake-3.*rpm-Uvhcompat-libstdc++-33rpm-Uvhelfutils-libelf-devel-0.*rpm-Uvhglibc-devel-2.*rpm-Uvhgcc-4.*rpm-Uvhgcc-c++-4.*rpm-Uvhlibaio-devel-0.*rpm-Uvhlibstdc++-devel-4.*rpm-UvhunixODBC-2.*rpm-UvhunixODBC-devel-2.*rpm-Uvhsysstat-7.*3.添加oracle组和用户(OracleEnterpriseLinux默认把oracle的用户创建完了,这一步骤可以省略)#groupaddoinstall-g501#groupadddba-g502#groupaddoper-g503#useraddoracle-u500-goinstall-Gdba,oper#passwdoracle输入密码:oracle4.修改参数文件sysctl.conf#cat/etc/sysctl.confEOFkernel.sem=105532000100128kernel.shmmax=2147483648kernel.shmall=2097152net.ipv4.tcp_sack=0net.ipv4.tcp_timestamps=0net.ipv4.conf.default.rp_filter=0net.core.optmem_max=65535net.core.rmem_default=4194304net.core.wmem_default=262144net.core.rmem_max=4194304net.core.wmem_max=262144fs.file-max=6553600net.ipv4.ip_local_port_range=102465000EOF5.以下命令加载sysctl.conf文件中的内容,检查参数值是否正确设定。#/sbin/sysctl-p6.修改参数文件limits.conf#cat/etc/security/limits.confEOF*softnproc2047*hardnproc16384*softnofile1024*hardnofile65536EOF7.修改参数文件login#cat/etc/pam.d/loginEOFsessionrequired/lib/security/pam_limits.sosessionrequiredpam_limits.soEOF8.修改参数文件config#vi/etc/selinux/config注销其他的,仅留下面的内容SELINUX=disabledSELINUXTYPE=disabled9.创建安装目录#mkdir-p/oracle/u01/app/oracle/product/1101/db#mkdir-p/oracle/u02/oradata#chown-Roracle:oinstall/oracle#chmod-R775/oracle10.确认系统版本号[root@RHEL53/]#cat/etc/issueEnterpriseLinuxEnterpriseLinuxServerrelease5.3(Carthage)Kernel\ronan\m[root@RHEL53/]#cat/etc/redhat-releaseRedHatEnterpriseLinuxServerrelease5.3(Tikanga)11.修改oracle的环境变量.bash_profile#su-oracle$vi~/.bash_profile###################################################OracleSettings##################################################exportORA_NLS10=$ORACLE_HOME/nls/dataexportTMP=/tmpexportTMPDIR=$TMPexportORACLE_BASE=/oracle/u01/app/oracleexportORACLE_HOME=$ORACLE_BASE/product/1101/dbexportORACLE_SID=ora11gexportORACLE_TERM=xtermexportPATH=$PATH:$ORACLE_HOME/bin:/sbin:/usr/sbinexportLD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/libexportCLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib#LD_ASSUME_KERNEL=2.4.1;exportLD_ASSUME_KERNELif[$USER=oracle];thenif[$SHELL=/bin/ksh];thenulimit-p16384ulimit-n65536elseulimit-u16384-n65536fiumask022fi###################################################Shellsetting.##################################################umask022set-ovi#sttyerase^HexportPS1=\${ORACLE_SID}@`hostname`\${PWD}$exportSQLPATH=/home/oracle/sql#autoaddenvparameter$PROMPT_COMMANDwhenusenon-Linuxttyloginbyssh.if[$SSH_CONNECTION!=''];thenexportHOSTIP=`echo$SSH_CONNECTION|awk'{print$3}'|awk-F:'{if($1==)print$4;elseprint$1}'`exportPROMPT_COMMAND='echo-ne\033]0;${USER}@'$HOSTIP':[${HOSTNAME%%.*}]:${PWD/#$HOME/~}\007'fi###################################################OracleAlias##################################################aliasbase='cd$ORACLE_BASE'aliashome='cd$ORACLE_HOME'aliasalert='tail-200f$ORACLE_BASE/diag/rdbms/$ORACLE_SID/$ORACLE_SID/trace/alert_$ORACLE_SID.log'aliastnsnames='vi$ORACLE_HOME/network/admin/tnsnames.ora'12.访问控制列表调整#xhost+13.上传并解压相关安装介质$unziplinux_11gR1_database_1013.zip14.图形化界面安装数据库软件11g版本#su-oracle$cddatabase$./runInstaller.sh选择高级安装AdvancedInstallation选择Custom安装选定perform.typeconfigurationCustomDatabase执行两个脚本#cd/oracle/u01/app/oraInventory/#./orainstRoot.sh#cd/oracle/u01/app/oracle/product/1101/db/#./root.sh15.netca配置监听器及本地命名模式#su-oracle$netca16.DBCA创建数据库#su-oracle$dbca1).welcome界面,点击“Next”2).选择CreateaDatabase,点击“Next”3).选择CustomDatabase,点击“Next”4).GlobalDatabaseName输入ora11g,SID输入ora11g,点击“Next”5).默认,ConfigureEnterpriseManager,点击“Next”6).设置系统用户的登陆密码,点击“Next”7).选择存储方式(文件系统,ASM,裸设备),我这里选择默认文件系统,点击“Next”8).选择第二项UseCommonLocationforAllDatabaseFiles,点击“Browse”选择路径/oracle/u02/oradata,点击“Next”9).启用闪回和归档,点击“Next”10).选择数据库组件,这里本着能不选就不选的原则,点击“StandardDatabaseComponents...”,全部取消所选项,点击“OK”,取消OracleText,点击“Next”11).Memory、Size、Character和ConnectionMode的选择,依照系统的配置进行调整,点击“Next”在这一步骤里设置SGA和PGA大小后点击“Next”后可能报一个错误,与/dev/shm过小有关,处理的方法如下:可通过修改/etc/fstab来限制tmpfs的大小,如none/dev/shmtmpfsdefaults00改成:none/dev/shmtmpfsdefaults,size=1024M00重新mount/dev/shm使之生效:#mount-oremount/dev/shm12).默认选择,Keeptheenhanced11gdefaultsecuritysettings(recommended),点击“Next”13).默认选择,Enableautomaticmaintenancetasks,点击“Next”14).验证一下存储文件的位置,这里可以修改RedoLog的大小,修改后点击“Next”15).选择CreateDatabase,SaveasaDatabaseTemplate,GenerateDatabaseCreationScripts,点击“Finish”16).这里创建的的开始可能会报一个与NLS的错误处理方法:取消~/.bash_profile文件中环境变量NLS_LANG的设置;ORA_NLSxx环境变量必须用ORA_NLS10,以前在10g上还兼容的ORA_NLS33不能继续用的,因此,添加exportORA_NLS10=$ORACLE_HOME/nls/data,因需要修改配置文件