Solaris 10下安装Oracle 11g (官方文档)
系统要求配置和信息查询 启用图形化界面:
$ xhostfully_qualified_remote_host_name
例如:
$ xhost somehost.us.example.com
如果没安装软件,可以用SSH/rlogin/telnet等连接:
$ telnetfully_qualified_remote_host_name
如果不是root帐号,可以用以下命令切换到root用户:
$ su - root password: #
内存要求:最少1GB,建议2GB;用以下命令查看内存大小:
# /usr/sbin/prtconf | grep \
用以下命令查看配置的SWAP大小:
# /usr/sbin/swap -l
Swap大小要符合以下要求: RAM Between 1 GB and 2 GB Between 2 GB and 16 GB Swap Space 1.5 times the size of the RAM Equal to the size of the RAM More than 16 GB 16 GB
用以下命令查看可用的内存和SWAP大小:
# sar -r -i n #n是下次重复的延迟秒数;i是重复的次数;
查看系统架构是否可以运行软件:
# /bin/isainfo -kv
/tmp目录至少要1GB空间,查看/tmp目录大小命令:
# df -k /tmp
查看挂载的目录大小命令: # df -k 安装版本 Enterprise Edition Standard Edition 需要磁盘空间 (GB) 4.7 4.6 安装版本 Standard Edition One Custom (Enterprise Edition + custom install options) 查看系统版本: # uname -r
需要磁盘空间 (GB) 4.6 4.7 查看升级信息:
$ cat /etc/release
要求以下系统软件包: ? SUNWarc ? SUNWbtool ? SUNWhea ? SUNWlibC ? SUNWlibm ? SUNWlibms ? SUNWsprot ? SUNWtoo ? SUNWi1of
? SUNWi1cs (ISO8859-1) ? SUNWi15cs (ISO8859-15) ? SUNWxwfnt ? SUNWcsl 查看方法:
# pkginfo -i SUNWarcSUNWbtoolSUNWheaSUNWlibCSUNWlibmsSUNWsprot \\ SUNWtoo SUNWi1of SUNWi1cs SUNWi15cs SUNWxwfnt
安装软件包方法:
# pkgadd -R SUNWxwfntall
编译器要求:
Oracle Solaris Studio 12 (C and C++ 5.9) is supported with Pro*C/C++, Oracle Call Interface, Oracle C++ Call Interface, and Oracle XML Developer's Kit (XDK) for Oracle Database 11g Release 2. 系统补丁要求: Installation Type or Product All installations Requirement Patches for Oracle Solaris 10: ? 120754-06: SunOS 5.10_x86 libmtsk ? 119961-05: SunOS 5.10_x86: Assembler ? 119964-14: SunOS 5.10_x86 Shared library patch for C++_x86 ? 137104-02 ? 139575-03 ? 139556-08 ? 141445-09 (11.2.0.2) Installation Type or Product Requirement ? 141415-04 Database Smart Flash Cache (An The following patches are required for Oracle Solaris Enterprise Edition only feature.) on x86-64 (64-bit) if you are using the flash cache feature: 140797-01 140900-01 141017-01 141415-10 141737-05 查看补丁方法(到https://support.oracle.com 下载补丁包): # /usr/sbin/patchadd -p | greppatch_number(without version number) 例如 # /usr/sbin/patchadd -p | grep 119963
创建用户和用户组
以下用户组是要求创建的:
? The Oracle Inventory group (typically, oinstall) ? The OSDBA group (typically, dba)
? The Oracle software owner (typically, oracle) ? The OSOPER group (Optional. Typically, oper) 查看oinstall用户组是否存在的命令:
# more /var/opt/oracle/oraInst.loc
如果存在,会输出类似以下内容:
inventory_loc=/u01/app/oracle/oraInventory inst_group=oinstall
查看dba组是否存在:
# grepdba /etc/group
用以下命令创建用户组oinstall和dba:
# /usr/sbin/groupaddoinstall # /usr/sbin/groupadddba
查看oracle用户是否存在:
# id -a oracle
如果存在Oracle帐号但它不属于oinstall和dba组,则用以下命令修改它:
# /usr/sbin/usermod -g oinstall -G dba oracle
如果不存在oracle帐号,用以下命令创建:
# /usr/sbin/useradd -d /export/home/oracle -m -s /bin/bash -g oinstall -G dba oracle
用以下命令修改oracle用户密码:
# passwd -r files oracle
在Solaris 10上设置内核参数 Resource Control project.max-sem-ids Recommended Value 100 Resource Control process.max-sem-nsems project.max-shm-memory project.max-shm-ids Recommended Value 256 4294967295 100 查看resource control值:
$ id -p
uid=100(oracle) gid=100(dba) projid=1 (group.dba) $ prctl -n project.max-shm-memory -i project group.dba $ prctl -n project.max-sem-ids -i project group.dba
For Solaris 10 and later, you need to create the resource called “project” and associate it with the user account “oracle:oinstall”. Below please find the example for your information. % projadd -p 100 -c 'Oracle 11gR2' -U oracle -G oinstall -K 'project.max-shm-memory=(privileged,16G,deny)' user.oracle % usermod -K project=user.oracle oracle
I’ve modified the project name called “user.oracle” and assigned 16.0GB into it. You should be able to create database via DBCA without getting “out of memory” now. Please check.
如果要修改resource control值,用以下命令:
a. To modify the value of max-shm-memory to 6 GB:
b. # prctl -n project.max-shm-memory -v 6gb -r -i project group.dba
c. To modify the value of max-sem-ids to 256:
# prctl -n project.max-sem-ids -v 256 -r -i project group.dba
用以下命令查看为oracle用户创建的项目是否正常:
# su - oracle $ id -p
uid=100(oracle) gid=100(dba) projid=100(group.dba) $ exit
设置最大shared memory到2GB:
# projmod -sK \
查看/etc/project内容:
# cat /etc/project
一般输出以下类似内容:
system:0:::: user.root:1:::: noproject:2:::: default:3:::: group.staff:10::::
group.dba:100:Oracle default
相关推荐: