RedHatEnterriseLinux4Update5环境下静默方安装Oracle10.2.0.1升级到10.2.0.3数据库,并创建数据库Oracle10G安装2/18目录一、检查安装环境:...............................................................................................................3二、静默安装Oracle10G数据库软件....................................................................................9三、静默安装监听器:.........................................................................................................10四、静默升级Oracle10G软件..............................................................................................11五、静默创建Oracle10G数据库..........................................................................................13六、设置oracle服务自启动.................................................................................................163/18一、检查安装环境:LinuxAS4Update5在安装时,将所有开发相关的组件全部安装;[root@localhost~]#rpm-qbinutilscompat-dbcontrol-centergccgcc-c++glibcglibc-commongnome-libslibstdc++libstdc++-develmakepdkshsysstatxscreensaverlibaiobinutils-2.15.92.0.2-22compat-db-4.1.25-9control-center-2.8.0-12.rhel4.5gcc-3.4.6-8gcc-c++-3.4.6-8glibc-2.3.4-2.36glibc-common-2.3.4-2.36gnome-libs-1.4.1.2.90-44.1libstdc++-3.4.6-8libstdc++-devel-3.4.6-8make-3.80-6.EL4pdksh-5.2.14-30.3packagesysstatisnotinstalledxscreensaver-4.18-5.rhel4.13libaio-0.3.105-2[root@localhost~]#sysstat没有安装,在安装盘4中的\RedHat\RPMS\下找到sysstat-5.0.5-14.rhel4.i386.rpm,上传至LINUX机器并安装4/18[root@localhost~]#rpm-Uvhsysstat-5.0.5-14.rhel4.i386.rpmwarning:sysstat-5.0.5-14.rhel4.i386.rpm:V3DSAsignature:NOKEY,keyIDdb42a60ePreparing...###########################################[100%]1:sysstat###########################################[100%][root@localhost~]#安装后检查:[root@localhost~]#rpm-qsysstatsysstat-5.0.5-14.rhel4[root@localhost~]#安装成功!判断本机是否安装过oracle:[root@localhost~]#more/etc/oraInst.loc/etc/oraInst.loc:Nosuchfileordirectory[root@localhost~]#表示没有安装过oracle创建安装Oracle需要的用户和组:[root@localhost~]#groupaddoinstall[root@localhost~]#groupadddba[root@localhost~]#useradd-m-goinstall-Gdbaoracle5/18[root@localhost~]#设置oracle用户密码,这里设置为“oracle”[root@localhost~]#passwdoracleChangingpasswordforuseroracle.NewUNIXpassword:BADPASSWORD:itisbasedonadictionarywordRetypenewUNIXpassword:passwd:allauthenticationtokensupdatedsuccessfully.[root@localhost~]#创建安装oracle所需的目录:[root@localhost~]#mkdir-p/u01/app/oracle/db_1[root@localhost~]#chownoracle.oinstall/u01/app/oracle[root@localhost~]#chownoracle.oinstall/u01/app/oracle/db_1[root@localhost~]#配置Linux系统内核参数:[root@localhost~]#vi/etc/sysctl.conf修改或添加以下参数:kernel.shmall=2097152kernel.shmmax=256000000kernel.shmmni=40966/18kernel.sem=25032000100128fs.file-max=65536net.ipv4.ip_local_port_range=102465000net.core.rmem_default=1048576net.core.rmem_max=1048576net.core.wmem_default=262144net.core.wmem_max=262144注:一般而言我们只需要修改kernel.shmmax这个值,该参数应该是物理内存的一半(字节)编辑完之后存盘退出,然后运行下列命令重新加载并验证参数是否正确:[root@localhost~]#sysctl-pnet.ipv4.ip_forward=0net.ipv4.conf.default.rp_filter=1net.ipv4.conf.default.accept_source_route=0kernel.sysrq=0kernel.core_uses_pid=1kernel.shmall=2097152kernel.shmmax=256000000kernel.shmmni=4096kernel.sem=25032000100128fs.file-max=65536net.ipv4.ip_local_port_range=102465000net.core.rmem_default=1048576net.core.rmem_max=10485767/18net.core.wmem_default=262144net.core.wmem_max=262144[root@localhost~]#Oracle建议对每个Linux账户可以使用的进程数和打开的文件数设置限制(可选设置)打开文件limits.conf[root@localhost~]#vi/etc/security/limits.conf加入以下参数:*softnproc2047*hardnproc16384*softnofile1024*hardnofile65536修改/etc/pam.d/login文件[root@localhost~]#vi/etc/pam.d/login加入参数:sessionrequired/lib/security/pam_limits.sosessionrequiredpam_limits.so[root@localhost~]#vi/etc/selinux/config确保存在以下内容:SELINUX=disabled配置oracle用户的环境变量8/18[root@localhost~]#su-oracle[oracle@localhost~]$vi.bash_profile文件内容修改为:#.bash_profile#Getthealiasesandfunctionsif[-f~/.bashrc];then.~/.bashrcfi#Userspecificenvironmentandstartupprograms#OracleEnvironmentexportORACLE_BASE=/u01/app/oracleexportORACLE_HOME=$ORACLE_BASE/db_1exportORACLE_SID=orclexportORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/dataLD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/libLD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/libexportLD_LIBRARY_PATHexportPATH=$HOME/bin:$ORACLE_HOME/bin:$PATHexportNLS_LANG=AMERICAN_AMERICA.ZHS16GBK9/18exportPATHunsetUSERNAMEif[$USER=oracle];thenif[$SHELL=/bin/ksh];thenulimit-p16384ulimit-n65536elseulimit-u16384-n65536fifi到此,安装Oracle的准备工作基本完成,下一步,可以选择图形界面安装或静默安装方式,这里使用静默安装方式:二、静默安装Oracle10G数据库软件修改响应文件:[oracle@localhostdatabase]$cdresponse/[oracle@localhostresponse]$vienterprise.rsp修改必要的参数UNIX_GROUP_NAME=”oinstall”FROM_LOCATION=../stage/products.xmlORACLE_HOME=/u01/app/oracle/db_1ORACLE_HOME_NAME=OraDbHome1RESTART_SYSTEM=false10/18RESTART_REMOTE_SYSTEM=falseORACLE_HOSTNAME=localhostCOMPONENT_LANGUAGES={zh_CN}s_nameForDBAGrp=dban_configurationOption=3回到Oracle10G的安装程序目录,开始安装:[oracle@localhostdatabase]$./runInstaller-silent-responseFile/home/oracle/database/response/enterprise.rsp安装完成后,执行两个脚本(使用root用户):#.$ORACLE_BASE/oraInventory/orainstRoot.sh#.$ORACLE_HOME/root.sh三、静默安装监听器:安装网络监听器没有网络监听器,客户端就无法通过网络连接Oralce服务器。要在命令行安装网络监听器,也只能