Chinaunix首页 | 论坛 | 博客
  • 博客访问: 422441
  • 博文数量: 77
  • 博客积分: 2303
  • 博客等级: 大尉
  • 技术积分: 808
  • 用 户 组: 普通用户
  • 注册时间: 2004-11-30 09:15
文章存档

2015年(1)

2013年(3)

2012年(2)

2011年(46)

2009年(4)

2008年(2)

2005年(12)

2004年(7)

我的朋友

分类: Oracle

2013-02-04 12:07:20

1.创建用户/组
#groupadd -g 1001 dba
#groupadd -g 1002 oper
#groupadd -g 1003 oinstall

#useradd -u 1001 -g oinstall -G dba,oper -d /export/home/oracle -s /bin/bash oracle

# id -a oracle
uid=1001(oracle) gid=1003(oinstall) groups=1001(dba),1002(oper)


2.配制资源

 #id -p oracle
   uid=1001(oracle) gid=1003(oinstall) projid=3(default)
 
 # projadd -U oracle -p 1001 -c "Oracle Kernel Parameters Setting" user.oracle
    其中:
    -U: 指定应用到该项目的用户列表.
    -c: 项目的描述信息.
    -p: 非负整数,项目ID号.

 # id -p oracle
    uid=1001(oracle) gid=1003(oinstall) projid=1001(user.oracle)

# projmod -a -K "project.max-shm-memory=(priv,17179869184,deny)" user.oracle(设置最大共享内存为12G,系统物理内存为32G,单位为字节.)
# projmod -a -K "project.max-shm-memory=(priv,1073741824,deny)" user.oracle(设置最大共享内存为1G,系统物理内存为2G,单位为字节.)
# projmod -a -K "project.max-sem-ids=(priv,100,deny)" user.oracle
# projmod -a -K "process.max-sem-nsems=(priv,256,deny)" user.oracle
# projmod -a -K "project.max-shm-ids=(priv,100,deny)" user.oracle

3.环境变量
oracle .profile
ORACLE_BASE=/export/home/oracle/app/oracle;export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0;export ORACLE_HOME
ORACLE_SID=yanzi;export ORACLE_SID
TMP=/tmp;export TMP
TMPDIR=/tmp;export TMPDIR
PATH=$PATH:$ORACLE_HOME/bin;export PATH
umask 022

4.patch

pkg install compatibility/packages/SUNWxwplt SUNWmfrun SUNWarc SUNWhea SUNWlibm

5.重新登录oracle用户,安装
env    #确定环境变量生效
./runInstall

6.停掉em
emctl start dbconsole
emctl start agent

常见错误:
1.错误: Exception in thread "main" java.lang.UnsatisfiedLinkError: /tmp/OraInstall2013-02-01_10-42-55PM/jdk/jre/lib/amd64/motif21/libmawt.so: ld.so.1: java: fatal: libXm.so.4: open failed: No such file or directory
        at java.lang.ClassLoader$NativeLibrary.load(Native Method)
        at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751)
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1647)
        at java.lang.Runtime.load0(Runtime.java:769)
        at java.lang.System.load(System.java:968)
        at java.lang.ClassLoader$NativeLibrary.load(Native Method)
        at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751)
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668)
        at java.lang.Runtime.loadLibrary0(Runtime.java:822)
        at java.lang.System.loadLibrary(System.java:993)
        at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:50)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.awt.Toolkit.loadLibraries(Toolkit.java:1509)
        at java.awt.Toolkit.(Toolkit.java:1530)
        at com.jgoodies.looks.LookUtils.isLowResolution(Unknown Source)
        at com.jgoodies.looks.LookUtils.(Unknown Source)
        at com.jgoodies.looks.plastic.PlasticLookAndFeel.(PlasticLookAndFeel.java:122)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:242)
        at javax.swing.SwingUtilities.loadSystemClass(SwingUtilities.java:1783)
        at javax.swing.UIManager.setLookAndFeel(UIManager.java:480)
        at oracle.install.commons.util.Application.startup(Application.java:758)
        at oracle.install.commons.flow.FlowApplication.startup(FlowApplication.java:164)
        at oracle.install.commons.flow.FlowApplication.startup(FlowApplication.java:181)
        at oracle.install.commons.base.driver.common.Installer.startup(Installer.java:265)
        at oracle.install.ivw.db.driver.DBInstaller.startup(DBInstaller.java:114)
        at oracle.install.ivw.db.driver.DBInstaller.main(DBInstaller.java:132)

解决方法:
root@mdc-sol11:/# pkg list -a |grep motif
library/motif                                     0.5.11-0.175.0.0.0.0.0     ---
library/motif/libdpstkxm                          0.5.11-0.175.1.0.0.24.1317 ---
root@mdc-sol11:/# pkg install motif


2.错误:Exception String: Error in invoking target 'irman ioracle' of makefile '/export/home/oracle/app/oracle/product/11.2.0/rdbms/lib/ins_rdbms.mk'. See
 '/export/home/oracle/app/oraInventory/logs/installActions2013-02-01_11-02-44PM.log' for details.

解决方法:
swap空间不足,扩容SWAP空间
# zfs get volsize rpool/swap
NAME        PROPERTY  VALUE  SOURCE
rpool/swap  volsize   1G     local

# zfs set volsize=2G rpool/swap

# zfs get volsize rpool/swap
NAME        PROPERTY  VALUE  SOURCE
rpool/swap  volsize   2G     local


3. Failed to allocate port(s) in the specified range for the following process(es): JMS [5540-5559],RMI [5520-5539],Database Control [5500-5519],EM agent [1830-1849]....

# ipadm set-prop -p smallest_anon_port=9000 tcp
# ipadm set-prop -p largest_anon_port=65500 tcp
# ipadm set-prop -p smallest_anon_port=9000 udp
# ipadm set-prop -p largest_anon_port=65500 udp

# ipadm show-prop|grep anon
tcp   largest_anon_port     rw   65500        65500        65535        9000-65535
tcp   smallest_anon_port    rw   9000         9000         32768        1024-65500
udp   largest_anon_port     rw   65500        65500        65535        9000-65535
udp   smallest_anon_port    rw   9000         9000         32768        1024-65500
sctp  largest_anon_port     rw   65535        --           65535        32768-65535
sctp  smallest_anon_port    rw   32768        --           32768        1024-65535
阅读(5707) | 评论(0) | 转发(1) |
给主人留下些什么吧!~~