ITPub博客

首页 > 数据库 > Oracle > [原]Oracle 11.2.0.1 for RHEL5-6 x86和x64静默安装

[原]Oracle 11.2.0.1 for RHEL5-6 x86和x64静默安装

Oracle 作者:jasonchowman 时间:2011-11-01 17:33:24 0 删除 编辑

urce)

  安装过程如下所示:

  选择“Advanced Installation”,点击“Next”进入下一界面

  在“Enter the full path of the invertory directory”中输入完整的路径:/opt/oracle10g/oraInvertory,选择“oinstall”,点击“Next”进入下一界面

  选择数据库类型,默认“Enterprise Edition”即可,点“Next”进入下一界面

  指定oracle的数据库的主目录名称和路径,默认即可,点“Next”进入下一界面

  与oracle相关的先决条件检查,完成后点击“Next”进入下一界面

  点击“Yes”进入下一界面

  默认“Create a database”即可,点击“Next”进入下一界面

  默认“General Purpose”即可,点击“Next”进入下一界面

  l 设置“Global Database Name”=orcl,“SID”=orcl,确认“SID”与环境变量中的ORACLE_SID一致,都为orcl

  注意:SID设置需要与~/.bash_proflie中export ORACLE_SID=orcl一致 l 字符集时选择“Simplified Chinese ZHS16GBK”

  l 选择Create database with sample schemas

  点击“Next”进入下一界面

  保持默认即可,点击“Next”进入下一界面

  指定数据库文件存储选项,保持默认即可,点击“Next”进入下一界面

  数据库指定备份和恢复选项,保持默认即可,点击“Next”进入下一界面

  指定数据库模式口令选项,选择“Use the same password for all the accounts”,使用统一密码(password=channelsoft)

  完成设置,点击“Install”开始安装数据库

  点击“OK”继续安装

  此时,另开一个终端,以root用户执行$ORACLE_HOME/root.sh即可。

  # sh /opt/oracle11g/oraInventory/orainstRoot.sh

  提示:

  Changing permissions of /opt/oracle10g/oraInventory to 770.

  Changing groupname of /opt/oracle10g/oraInventory to oinstall.

  The execution of the script is complete

  # sh /opt/oracle11g/product/11.1.0/root.sh

  Running Oracle10 root.sh script...

  The following environment variables are set as:

  ORACLE_OWNER= oracle

  ORACLE_HOME= /opt/oracle10g/product/10.2.0

  Enter the full pathname of the local bin directory: [/usr/local/bin]: 回车

  Copying dbhome to /usr/local/bin ...

  Copying oraenv to /usr/local/bin ...

  Copying coraenv to /usr/local/bin ...

  Creating /etc/oratab file...

  Entries will be added to the /etc/oratab file as needed by

  Database Configuration Assistant when a database is created

  Finished running generic part of root.sh script.

  Now product-specific root actions will be performed.

  终端运行完毕后,点击“OK”进入下一界面

  点击“Exit”完成数据库安装

  # vi /etc/oratab orcl:/opt/oracle10g/product/10.2.0:N 将N修改成Y orcl:/opt/oracle10g/product/10.2.0:Y 找到# Set this to bring up Oracle Net Listener #ORACLE_HOME_LISTNER=/ade/vikrkuma_new/oracle 修改为:ORACLE_HOME_LISTNER=$ORACLE_HOME

  编辑自启动脚本oracle,并将oracle放到/etc/rc.d/init.d中

  修改oracle属性

  #cd /etc/rc.d/init.d

  #chmod 750 /etc/rc.d/init.d/oracle

  #chkconfig add oracle

  #chkconfig list oracle

  #chkconfig level 2345 oracle on

  完成设置重启系统后,就可以在启动的过程中看到starting oracle

  $ sqlplus "/as sysdba" SQL*Plus: Release 10.2.0.1.0 - Production on Thu Jun 17 17:44:49 2011

   http://pat-libstdc++-33 elfutils-libelf elfutils-libelf-devel expat gcc gcc-c++

  glibc glibc-common glibc-devel glibc-headers libaio libaio-devel libgcc libstdc++

  libstdc++-devel make sysstat unixODBC unixODBC-devel | grep "not installed"

  libaio-devel sysstat unixODBC unixODBC-devel

  几个rpm包可以在RHEL5.3的安装光盘里找到。注意:除了sysstat包,其他同样名字的32位的rpm包在64位系统中也要安装。

  增加数据库组和用户

  # id oracle (确认oracle用户是否存在,确保oracle原不存在)(建立产品清单管理组) (建立数据库安装组) (建立ASM管理组) (建立Grid管理组) /usr/sbin/groupadd -g 1001 oinstall

  /usr/sbin/groupadd -g 1002 dba

  /usr/sbin/groupadd -g 1003 asmadmin

  /usr/sbin/groupadd -g 1004 asmdba

  (oinstall主要组,确保/home/oracle原不存在),配置oracle密码:georacle /usr/sbin/useradd -g oinstall -G dba,asmdba oracle -d /home/oracle

  passwd oracle

  id oracle

  uid=1001(oracle) gid=1001(oinstall) groups=1001(oinstall),1002(dba),1004(asmdba)

  调整OS内核参数

  设置原则:

  kernel.shmmax设为物理内存大小(如果系统已设置了足够大就无需再设置了,参考值为最小需求) # vi /etc/sysctl.conf

  #------------------------------------------

  kernel.shmall =

  kernel.shmmax =

  kernel.shmmni = 4096

  kernel.sem = 250 100 128

  fs.aio-max-nr =

  fs.file-max =

  fs.aio-max-nr =

  net.ipv4.ip_local_port_range = 9000

  net.core.rmem_default =

  net.core.rmem_max =

  net.core.wmem_default =

  net.core.wmem_max =

  #------------------------------------------

  # /sbin/sysctl -p (设置参数立即生效)

  [redhat6]:如果有如下提示错误,忽略,因为即使未修改参数也提示有这个错误。 error: "net.bridge.bridge-nf-call-ip6tables" is an unknown key

  error: "net.bridge.bridge-nf-call-iptables" is an unknown key

  error: "net.bridge.bridge-nf-call-arptables" is an unknown key

  vi /etc/redhat-release,修改为如下值,成功安装数据库后在修改回来: Red Hat Enterprise Linux Server release 5.0 (Tikanga)

  [redhat6]

  增加shell限制

  为了提升性能增加oracle用户的shell限制. # vi /etc/security/limits.conf (在文件最后增加或修改以下参数)

  oracle soft nproc 2047

  oracle hard nproc

  oracle soft nofile 1024

  oracle hard nofile

  # vi /etc/pam.d/login (在文件最后增加或修改以下参数)

  session required pam_limits.so

  # vi /etc/profile (在文件最后增加或修改以下脚本)

  if [ $USER = "oracle" ]; then

  if [ $SHELL = "/bin/ksh" ]; then

  ulimit -p

  ulimit -n

  else

  ulimit -u -n

  fi fi

  建立必需目录和文件 more /etc/oratab (确认原来不存在Oracle主目录)

  more /etc/oraInst.loc (确认原来不存在Oracle产品清单目录)

  建立(Oracle_base目录)

  mkdir -p /opt/oracle/11.2.0 /home/oracle/inventory/

  chown -R oracle:oinstall /opt/oracle /home/oracle

  设置oracle用户环境变量

  如果服务器有多网卡, 注意设置ORACLE_HOSTNAME为某网卡IP对应的主机名, 参照/etc/hosts文件. $ vi /home/oracle/.bash_profile

  umask 022

  ORACLE_HOSTNAME=localhost.localdomain

  ORACLE_BASE=/opt/oracle

  ORACLE_HOME=$ORACLE_BASE/11.2.0

  ORACLE_SID=ge01

  PATH=.:$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$ORACLE_HO ME/jdk/bin:$PATH

  LC_ALL="en_US"

  LANG="en_US"

  NLS_LANG="AMERICAN_AMERICA.ZHS16GBK"

  NLS_DATE_FORMAT="YYYY-MM-DD HH


  SHOW_CONFIG_TOOL_PAGE=true

  SHOW_RELEASE_NOTES=true

  SHOW_ROOTSH_CONFIRMATION=true

  SHOW_END_SESSION_PAGE=true

  SHOW_EXIT_CONFIRMATION=true

  NEXT_SESSION=false

  NEXT_SESSION_ON_FAIL=true

  NEXT_SESSION_RESPONSE=Value Unspecified

  DEINSTALL_LIST={"oracle.server","10.2.0.1.0"}

  SHOW_DEINSTALL_CONFIRMATION=true

  SHOW_DEINSTALL_PROGRESS=true

  CLUSTER_NODES={}

  ACCEPT_LICENSE_AGREEMENT=false TOPLEVEL_COMPONENT={"oracle.server","10.2.0.1.0"} SHOW_SPLASH_SCREEN=true SELECTED_LANGUAGES={"en"} COMPONENT_LANGUAGES={"en"} INSTALL_TYPE="Enterprise Edition" sl_superAdminPasswds=Value Unspecified sl_dlgASMCfgSelectableDisks=Value Unspecified s_superAdminSamePasswd=Value Unspecified s_globalDBName=Value Unspecified s_dlgASMCfgRedundancyValue=Value Unspecified s_dlgASMCfgNewDisksSize=Value Unspecified s_dlgASMCfgExistingFreeSpace=Value Unspecified s_dlgASMCfgDiskGroupName=Value Unspecified s_dlgASMCfgDiskDiscoveryString=Value Unspecified s_dlgASMCfgAdditionalSpaceNeeded=Value Unspecified s_dbSelectedUsesASM=Value Unspecified s_dbSIDSelectedForUpgrade=Value Unspecified s_dbRetChar=Value Unspecified s_dbOHSelectedForUpgrade=Value Unspecified s_ASMSYSPassword=Value Unspecified n_performUpgrade=Value Unspecified n_dlgASMCfgRedundancySelected=Value Unspecified n_dbType=Value Unspecified n_dbSelection=Value Unspecified Set this to true if same password across all the schemas is desired, else false to enter distinguish passwords for each schema. If set to true, values from s_superAdminSamePasswd and s_superAdminSamePasswdAgain are picked up, else stringlists sl_superAdminPasswds and sl_superAdminPasswdsAgain are used. b_useSamePassword=Value Unspecified Set this to true (default) if recovery into file system is desired, else to false for ASM recovery . b_useFileSystemForRecovery=Value Unspecified Set this to true if email update is desired, false is the default . b_receiveEmailNotification=Value Unspecified Set this to true if loading example schemas is desired, else false so database won't be created with example schemas. The default is false. b_loadExampleSchemas=Value Unspecified Set this to true if automatic backup of the database is desired, else false to disable backup. b_enableAutoBackup=Value Unspecified b_dlgASMShowCandidateDisks=Value Unspecified b_centrallyManageASMInstance=Value Unspecified sl_dlgASMDskGrpSelectedGroup=Value Unspecified s_dlgRBOUsername=Value Unspecifie

本文章出自Oracle 金牌WDP CUUG,更多Oracle认证培训请浏览CUUG官网

[转载]Oracle Database: DBA管理员 之路(十)表管理

<!-- 正文结束 -->

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/23047631/viewspace-1116825/,如需转载,请注明出处,否则将追究法律责任。

上一篇: 没有了~
下一篇: 没有了~
请登录后发表评论 登录
全部评论

注册时间:2009-12-19