《静默安装Oracle10G数据库软件》由会员分享,可在线阅读,更多相关《静默安装Oracle10G数据库软件(18页珍藏版)》请在金锄头文库上搜索。
1、Red Hat Enterrise Linux4 Update5 环境下静默方安装Oracle10.2.0.1升级到10.2.0.3数据库,并创建数据库Oracle10G安装目录一、检查安装环境:3二、静默安装Oracle10G数据库软件9三、静默安装监听器:10四、静默升级Oracle10G软件11五、静默创建Oracle10G数据库13六、设置oracle服务自启动16一、检查安装环境:LinuxAS4Update5在安装时,将所有开发相关的组件全部安装;rootlocalhost # rpm -q binutils compat-db control-center gcc gcc-c+
2、glibc glibc-common gnome-libs libstdc+ libstdc+-devel make pdksh sysstat xscreensaver libaiobinutils-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.8
3、0-6.EL4pdksh-5.2.14-30.3package sysstat is not installedxscreensaver-4.18-5.rhel4.13libaio-0.3.105-2rootlocalhost #sysstat没有安装,在安装盘4中的RedHatRPMS下找到sysstat-5.0.5-14.rhel4.i386.rpm,上传至LINUX机器并安装rootlocalhost # rpm -Uvh sysstat-5.0.5-14.rhel4.i386.rpm warning: sysstat-5.0.5-14.rhel4.i386.rpm: V3 DSA si
4、gnature: NOKEY, key ID db42a60ePreparing. # 100% 1:sysstat # 100%rootlocalhost #安装后检查:rootlocalhost # rpm -q sysstatsysstat-5.0.5-14.rhel4rootlocalhost #安装成功!判断本机是否安装过oracle:rootlocalhost # more /etc/oraInst.loc/etc/oraInst.loc: No such file or directoryrootlocalhost #表示没有安装过oracle创建安装Oracle需要的用户和组:
5、rootlocalhost # groupadd oinstallrootlocalhost # groupadd dbarootlocalhost # useradd -m -g oinstall -G dba oraclerootlocalhost #设置oracle用户密码,这里设置为“oracle”rootlocalhost # passwd oracleChanging password for user oracle.New UNIX password: BAD PASSWORD: it is based on a dictionary wordRetype new UNIX pa
6、ssword: passwd: all authentication tokens updated successfully.rootlocalhost #创建安装oracle所需的目录:rootlocalhost # mkdir -p /u01/app/oracle/db_1rootlocalhost # chown oracle.oinstall /u01/app/oraclerootlocalhost # chown oracle.oinstall /u01/app/oracle/db_1rootlocalhost #配置Linux系统内核参数:rootlocalhost # vi /e
7、tc/sysctl.conf修改或添加以下参数:kernel.shmall = 2097152kernel.shmmax = 256000000 kernel.shmmni = 4096 kernel.sem = 250 32000 100 128 fs.file-max = 65536 net.ipv4.ip_local_port_range = 1024 65000 net.core.rmem_default = 1048576 net.core.rmem_max = 1048576 net.core.wmem_default = 262144 net.core.wmem_max = 26
8、2144注:一般而言我们只需要修改kernel.shmmax 这个值,该参数应该是物理内存的一半(字节)编辑完之后存盘退出,然后运行下列命令重新加载并验证参数是否正确:rootlocalhost # 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 = 256000000
9、kernel.shmmni = 4096kernel.sem = 250 32000 100 128fs.file-max = 65536net.ipv4.ip_local_port_range = 1024 65000net.core.rmem_default = 1048576net.core.rmem_max = 1048576net.core.wmem_default = 262144net.core.wmem_max = 262144rootlocalhost #Oracle建议对每个Linux账户可以使用的进程数和打开的文件数设置限制(可选设置)打开文件limits.conf ro
10、otlocalhost # vi /etc/security/limits.conf加入以下参数:* soft nproc 2047* hard nproc 16384* soft nofile 1024* hard nofile 65536修改/etc/pam.d/login文件rootlocalhost # vi /etc/pam.d/login加入参数:session required /lib/security/pam_limits.sosession required pam_limits.sorootlocalhost # vi /etc/selinux/config确保存在以下内
11、容:SELINUX=disabled配置oracle 用户的环境变量rootlocalhost # su - oracleoraclelocalhost $ vi .bash_profile文件内容修改为:# .bash_profile# Get the aliases and functionsif -f /.bashrc ; then . /.bashrcfi# User specific environment and startup programs# Oracle Environmentexport ORACLE_BASE=/u01/app/oracleexport ORACLE_H
12、OME=$ORACLE_BASE/db_1export ORACLE_SID=orclexport ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/dataLD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/libLD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/libexport LD_LIBRARY_PATHexport PATH=$HOME/bin:$ORACLE_HOME/bin:$PATHexport NLS_LANG=AMERICAN_AMERICA.ZHS16GBKexpor
13、t PATHunset USERNAMEif $USER = oracle ; thenif $SHELL = /bin/ksh ; thenulimit -p 16384ulimit -n 65536elseulimit -u 16384 -n 65536fifi到此,安装Oracle的准备工作基本完成,下一步,可以选择图形界面安装或静默安装方式,这里使用静默安装方式:二、静默安装Oracle10G数据库软件修改响应文件:oraclelocalhost database$ cd response/oraclelocalhost response$ vi enterprise.rsp修改必要的
14、参数UNIX_GROUP_NAME=”oinstall”FROM_LOCATION= ./stage/products.xmlORACLE_HOME= /u01/app/oracle/db_1ORACLE_HOME_NAME=OraDbHome1RESTART_SYSTEM=falseRESTART_REMOTE_SYSTEM=falseORACLE_HOSTNAME=localhostCOMPONENT_LANGUAGES=zh_CNs_nameForDBAGrp=dban_configurationOption=3 回到Oracle10G的安装程序目录,开始安装:oraclelocalhost database$ ./runInstaller -silent -responseFile /home/oracle/database/response/enterprise.rsp安装完成后,执行两个脚本(使用root用户):#. $