redhat5.4 64位静默安装oracle11gR2和weblogic1033

一、 安装oracle11gR2

1. 建用户:

/usr/sbin/groupaddoinstall /usr/sbin/groupadddba

/usr/sbin/useradd -g oinstall -G dba oracle

2. 检查包

rpm -q --qf '%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\\n' \\binutilsgccgcc-c++ compat-libstdc++ glibcelfutils-libelfglibc-common kshlibaiolibgcc make libstdc++ libstdc++-develsysstatlibaio-devel binutils-2.17.50.0.6-12.el5 (x86_64) gcc-4.1.2-46.el5 (x86_64) gcc-c++-4.1.2-46.el5 (x86_64)

package compat-libstdc++ is not installed(实际已安装) glibc-2.5-42 (i686) glibc-2.5-42 (x86_64)

elfutils-libelf-0.137-3.el5 (x86_64) elfutils-libelf-0.137-3.el5 (i386) glibc-common-2.5-42 (x86_64) ksh-20080202-14.el5 (x86_64) libaio-0.3.106-3.2 (x86_64) libaio-0.3.106-3.2 (i386) libgcc-4.1.2-46.el5 (x86_64) libgcc-4.1.2-46.el5 (i386) make-3.81-3.el5 (x86_64)

libstdc++-4.1.2-46.el5 (x86_64) libstdc++-4.1.2-46.el5 (i386)

libstdc++-devel-4.1.2-46.el5 (x86_64) sysstat-5.0.5-7.rhel4 (x86_64)

package libaio-devel is not installed(手工安装)

3. 修改内核参数:

修改 /etc/sysctl.conf 文件,加上如下参数 fs.aio-max-nr = 1048576

fs.file-max = 6815744 kernel.shmall = 2097152 kernel.shmmax = 536870912 kernel.shmmni = 4096

kernel.sem = 250 32000 100 128

net.ipv4.ip_local_port_range = 9000 65500 net.core.rmem_default = 262144 net.core.rmem_max = 4194304

net.core.wmem_default = 262144 net.core.wmem_max = 1048586

应用一下上面的配置修改:/sbin/sysctl -p

4. oracle帐户添加环境变量

$ vi .bash_profile 增加

export ORACLE_BASE=/home/work/me/oracle/app/ export ORACLE_HOME=$ORACLE_BASE/oracle export ORACLE_SID=myoracle

export PATH=$ORACLE_HOME/bin:$PATH:$HOME/bin

5. 修改hosts

#::1 localhost6.localdomain6 localhost6

# Do not remove the following line, or various programs # that require network functionality will fail. 127.0.0.1 localhost 10.220.0.19 szwg*****.com 6. 安装

静默安装命令:./runInstaller -silent -force -noconfig -responseFile /home/work/me/oracle/database/response/db_install_me01.rsp 其中修改db_install_me01.rsp的如下几处: UNIX_GROUP_NAME=\

ORACLE_HOME=\ORACLE_HOME_NAME=\RESTART_REMOTE_SYSTEM=true ORACLE_HOSTNAME=\

7. 配置监听Netca

netca /silent /responseFile /home/work/me/oracle/database/response/netca.rsp 记得export DISPLAY=10.220.0.19:1.0

8. 建库dbca

修改dbca.rsp,下面限时我diff的值: < #GDBNAME = \< GDBNAME = \---

> GDBNAME = \150c149

< SID = \---

> SID = \171d169

< #TEMPLATENAME = \192c190

< SYSPASSWORD = \---

> #SYSPASSWORD = \202c200

< SYSTEMPASSWORD = \---

> #SYSTEMPASSWORD = \288c286

< #SMTPSERVER =\---

> #SMTPSERVER = 359c357

< DATAFILEDESTINATION = \---

> #DATAFILEDESTINATION = 369c367

< RECOVERYAREADESTINATION= \---

> #RECOVERYAREADESTINATION= 417c415

< CHARACTERSET = \---

> #CHARACTERSET = \512c510

< MEMORYPERCENTAGE = \---

> #MEMORYPERCENTAGE = \522c520

< DATABASETYPE = \---

> #DATABASETYPE = \542c540

< TOTALMEMORY = \---

> #TOTALMEMORY = \

dbca -silent -responseFile /home/work/oracle/database/response/dbca_me.rsp Copying database files 1% complete 3% complete 11% complete 18% complete

26% complete 37% complete

Creating and starting Oracle instance 40% complete 45% complete 50% complete 55% complete 56% complete 60% complete 62% complete

Completing Database Creation 66% complete 70% complete 73% complete 85% complete 96% complete 100% complete

Look at the log file \for further details.

9. 报错的解决:

lsnrctl status

lsnrctl: error while loading shared libraries:

/home/work/oracle/app/oracle/lib/libclntsh.so.11.1: cannot restore segment prot after reloc: Permission denied

解决方法:root修改/etc/selinux/config文件,找到里面的SELINUX条目,设置成disabled

再执行命令setenforce 0使修改生效

10. 检查安装是否成功:

sqlplus sys as sysdba 输入密码后startup数据库;

检查进程是否存在:

oracle 6577 0.0 0.1 1037828 18644 ? Ss 18:06 0:00 ora_pmon_myoracle

oracle 6579 0.0 0.0 1035584 15520 ? Ss 18:06 0:00 ora_vktm_myoracle

oracle 6583 0.0 0.0 1035584 15624 ? Ss 18:06 0:00 ora_gen0_myoracle

oracle 6585 0.0 0.0 1035584 15468 ? Ss 18:06 0:00 ora_diag_myoracle

oracle 6587 0.0 0.0 1035584 15608 ? Ss 18:06 0:00 ora_dbrm_myoracle

oracle 6589 0.0 0.0 1035584 15596 ? Ss 18:06 0:00 ora_psp0_myoracle

oracle 6591 0.0 0.1 1036096 18888 ? Ss 18:06 0:00 ora_dia0_myoracle

oracle 6593 0.3 0.1 1035584 27904 ? Ss 18:06 0:00 ora_mman_myoracle

oracle 6600 0.0 0.1 1041852 22492 ? Ss 18:06 0:00 ora_dbw0_myoracle

oracle 6602 0.0 0.0 1035584 15956 ? Ss 18:06 0:00 ora_lgwr_myoracle

oracle 6604 0.0 0.1 1035584 17664 ? Ss 18:06 0:00 ora_ckpt_myoracle

oracle 6606 0.0 0.0 1035584 16168 ? Ss 18:06 0:00 ora_smon_myoracle

oracle 6608 0.0 0.0 1035584 15612 ? Ss 18:06 0:00 ora_reco_myoracle

oracle 6610 0.0 0.1 1036156 24084 ? Ss 18:06 0:00 ora_mmon_myoracle

oracle 6612 0.0 0.1 1035584 17752 ? Ss 18:06 0:00 ora_mmnl_myoracle

oracle 6614 0.0 0.0 1037420 15660 ? Ss 18:06 0:00 ora_d000_myoracle

oracle 6616 0.0 0.0 1036648 14840 ? Ss 18:06 0:00 ora_s000_myoracle

oracle 15109 0.0 0.0 77152 12752 ? Ssl 13:18 0:00 /home/work/oracle/app/oracle/bin/tnslsnr LISTENER -inherit 11. 启动和关闭

Oracle_home的bin目录下提供了2个脚本来启动和关闭数据库dbstart和dbshut,这2个脚本会读取/etc/oratab来决定instance是否需要自动启动和关闭。 /etc/oratab是root创建的。

不过dbstart和dbshut有错误,需要修改 非#ORACLE_HOME_LISTNER=$1

是ORACLE_HOME_LISTNER=$ORACLE_HOME

12. 一些操作和检查:sqlplus sys as sysdba

setlinesize 1000; setpagesize 1000;

SELECT * FROM NLS_DATABASE_PARAMETERS;

selectfile_id,file_name,bytes/1024/1024 Total_MB,online_status from dba_data_files;

联系客服:779662525#qq.com(#替换为@) 苏ICP备20003344号-4