yangtingkun
===========================================================
安装Oracle10201 for REDHAT AS4 x86_64
===========================================================

记录一下REDHAT AS4上安装Oracle 10201的过程。


首先使用root登陆,检查系统硬件配置:

[root@haoc2008 data]# grep MemTotal /proc/meminfo
MemTotal: 8166284 kB
[root@haoc2008 data]# grep SwapTotal /proc/meminfo
SwapTotal: 17205572 kB
[root@haoc2008 data]# free
total used free shared buffers cached
Mem: 8166284 1838540 6327744 0 56636 1583592
-/+ buffers/cache: 198312 7967972
Swap: 17205572 0 17205572
[root@haoc2008 data]# df -k /tmp
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda5 20161172 77848 19059184 1% /tmp
[root@haoc2008 data]# df -k /data
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda9 173206016 877204 163530416 1% /data
[root@haoc2008 data]# grep "model name" /proc/cpuinfo
model name : Intel(R) Xeon(R) CPU E5335 @ 2.00GHz
model name : Intel(R) Xeon(R) CPU E5335 @ 2.00GHz
model name : Intel(R) Xeon(R) CPU E5335 @ 2.00GH
z
model name : Intel(R) Xeon(R) CPU E5335 @ 2.00GHz
model name : Intel(R) Xeon(R) CPU E5335 @ 2.00GHz
model name : Intel(R) Xeon(R) CPU E5335 @ 2.00GHz
model name : Intel(R) Xeon(R) CPU E5335 @ 2.00GHz
model name : Intel(R) Xeon(R) CPU E5335 @ 2.00GHz

下面检查操作系统信息:

[root@haoc2008 data]# cat /proc/version
Linux version 2.6.9-5.ELsmp (bhcompile@thor.perf.redhat.com) (gcc version 3.4.3 20041212 (Red Hat 3.4.3-9.EL4)) #1 SMP Wed Jan 5 19:29:47 EST 2005
[root@haoc2008 data]# uname -r
2.6.9-5.ELsmp

使用rpm –qa查询检查系统中是否存在以下的包:

binutils-2.15.92.0.2-13.EL4
compat-db-4.1.25-9
control-center-2.8.0-12
gcc-3.4.3-9.EL4
gcc-c++-3.4.3-9.EL4
glibc-2.3.4-2
glibc-common-2.3.4-2
gnome-libs-1.4.1.2.90-44.1
libstdc++-3.4.3-9.EL4
libstdc++-devel-3.4.3-9.EL4
make-3.80-5
pdksh-5.2.14-30
sysstat-5.0.5-1
libaio-0.3.105xorg-x11-deprecated-libs-6.8.2-1.EL.13.37.i386.rpm
xscreensaver-4.18-5.rhel4.2

缺少的包使用rpm –ivh进行安装。

[root@haoc2008 data]# groupadd oinstall
[root@haoc2008 data]# groupadd dba
[root@haoc2008 data]# useradd -g oinstall -G dba oracle
[root@haoc2008 data]# passwd oracle
Changing password for user oracle.
New UNIX password:
BAD PASSWORD: it is based on a dictionary word
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
[root@haoc2008 data]# id nobody
uid=99(nobody) gid=99(nobody) groups=99(nobody)

编辑/etc/sysctl.conf文件添加下面内容:

kernel.shmall = 2097152
kernel.shmmax = 8589934592
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 = 262144
net.core.rmem_max = 262144
net.core.wmem_default = 262144
net.core.wmem_max = 262144

编辑/etc/security/limits.conf文件,添加下面内容:

oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536

编辑/etc/pam.d/login文件添加下面的内容:

session required pam_limits.so

编辑oracle用户的.bash_profile文件,添加下面的内容:

if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi

export ORACLE_SID=db08
export ORACLE_BASE=/data/oracle
export ORACLE_HOME=/data/oracle/product/10.2
export PATH=$ORACLE_HOME/bin:$PATH
export NLS_LANG="SIMPLIFIED CHINESE_CHINA.ZHS16GBK"
export DISPLAY=172.25.13.177:1.0

建立ORACLE_BASEORACLE_HOME目录:

[root@haoc2008 data]# chown -R oracle.dba /data
[root@haoc2008 data]# su - oracle
[oracle@haoc2008 ~]$ mkdir -p /data/oracle/product/10.2

下面就可以执行安装了,如果前期检查准备工作做的比较好的话,安装过程还是比较见到的,这里就不描述了。

安装之后需要使用root执行一个脚本:

[root@haoc2008 ~]# . /data/oracle/oraInventory/orainstRoot.sh
Changing permissions of /data/oracle/oraInventory to 770.
Changing groupname of /data/oracle/oraInventory to oinstall.
The execution of the script is complete

安装过程完成,下面可以开始建库。建库过程也没有什么值得描述的,建库完成,登陆数据库检查版本信息:

[oracle@haoc2008 oracle]$ sqlplus "/ as sysdba"

SQL*Plus: Release 10.2.0.1.0 - Production on 星期二 12 4 09:54:43 2007

Copyright (c) 1982, 2005, Oracle. All rights reserved.

连接到:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options

SQL> select * from v$version;

BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bi
PL/SQL Release 10.2.0.1.0 - Production
CORE 10.2.0.1.0 Production
TNS for Linux: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production

需要注意,虽然otn网站上10g安装文档做的比9i的要好一些,仍然建议在安装的时候参考metalink上的文档。

如果参考了otn上面的文档,那么很可能会碰到下面几个bug

安装ORACLE10201 for REDHAT AS4 x86-64报错无法打开共享对象文件:http://yangtingkun.itpub.net/post/468/434623

安装ORACLE10201 for REDHAT AS4 x86-64时编译all_no_orcl报错:http://yangtingkun.itpub.net/post/468/436723

ORACLE10201 for REDHAT AS4 x86-64建库时报错ORA-12547http://yangtingkun.itpub.net/post/468/454447

这三个bug都是由于官方文档上对于所需操作系统安装包的描述有误造成的。而且这两个包基本都是Oracle提供的解决方法或者相关软件包。

如果在Oracle提供的Enterprise Linux4 for X86-64上,安装Oracle则不会存在任何的问题。可能也正是由于RedhatOracle的支持不好,造成的了Oracle踢开了Redhat,自己推出了Enterprise Linux

如果仅从这一点考虑,Oracle推出linux对于dba绝对是一个好消息,至少linux上面的安装不再是那么麻烦的事情了。

yangtingkun 发表于:2007.12.14 23:43 ::分类: ( ORACLE ) ::阅读:(2274次) :: 评论 (7)
re: 安装Oracle10201 for REDHAT AS4 x86_64 [回复]

和在虚拟机上的安装步骤差不多。smile

Eason.Cai 评论于: 2007.12.15 14:29
re: 安装Oracle10201 for REDHAT AS4 x86_64 [回复]

不用4.4,4.3就不会碰到这个问题。
可惜sa给我装的版本就是4.0,我也没有办法。
我还想看看10.2.0.1 for linux的dbua是否有问题,因此先建库再升级

btw:kernel.shmmax 设置有什么问题?

yangtingkun 评论于: 2007.12.15 19:03
re: 安装Oracle10201 for REDHAT AS4 x86_64 [回复]

一点建议:
如果仅仅是记录安装过程对看到这篇文章的人作用没有想象中那么大,除非他使用的机器硬件和安装的操作系统与你完全一致。所以如果能根据硬件信息和操作系统的信息给出一些参数配置的建议就好了。

如果楼主什么时候能再写一篇关于如何配置oracle安装时参数和创建数据库的参数的文章就好了。哪怕仅仅是建议。

期待中....

嘻嘻

kylin 评论于: 2007.12.16 10:37
re: 安装Oracle10201 for REDHAT AS4 x86_64 [回复]

我倒是认为参数设置意义不大。
一来参数设置和系统硬件有关,二来这些设置与数据库的用途有关,因此我一般不会对参数做过多的说明。

不过既然提到了,就简单说两句。
操作系统上设置的参数,基本上按照文档上推荐的值设置就没有问题。注意kernel.shmmax应该大于SGA的大小,否则在有些平台上数据库服务启动,在有些平台会启动多个共享内存段。

对于Oracle内存参数的分配,如果详细的说,恐怕不是一两篇文章可以说清楚的。
如果简单的说,SGA的大小设置为系统内存的70%到80%就可以了

yangtingkun 评论于: 2007.12.16 22:47
re: 安装Oracle10201 for REDHAT AS4 x86_64 [回复]

感谢rain@dna指出问题。
不过根据ITPUB BLOG的特点,由于你的回复包括了URL,我怀疑很快你这篇回复,就会被系统当作垃圾回复而清理掉。

本身我操作系统方面的知识就很欠缺,而且产品环境还是在Solaris下的,Linux水平就更菜了。如果楼上看看我BLOG中操作系统方面的文章,就知道我在这方面顶多处于入门级水平。

BTW:这个环境只是临时使用,如果真的要构造一个Linux上的产品环境,我会使用Enterprise Linux 5。

yangtingkun 评论于: 2007.12.17 14:40
re: 安装Oracle10201 for REDHAT AS4 x86_64 [回复]

我查了一下,感觉这个cache size是1级缓存的大小。
似乎2级缓存的大小没有显示。
# more /proc/cpuinfo |grep cache
cache size : 64 KB
cache_alignment : 64
cache size : 64 KB
cache_alignment : 64
cache size : 64 KB
cache_alignment : 64
cache size : 64 KB
cache_alignment : 64
cache size : 64 KB
cache_alignment : 64
cache size : 64 KB
cache_alignment : 64
cache size : 64 KB
cache_alignment : 64
cache size : 64 KB
cache_alignment : 64

而从dmesg中看,两个L1 CACHE加起来正好是64K:
more /var/log/dmesg |grep L1
CPU: L1 I cache: 32K, L1 D cache: 32K
CPU: L1 I cache: 32K, L1 D cache: 32K
CPU: L1 I cache: 32K, L1 D cache: 32K
CPU: L1 I cache: 32K, L1 D cache: 32K
CPU: L1 I cache: 32K, L1 D cache: 32K
CPU: L1 I cache: 32K, L1 D cache: 32K
CPU: L1 I cache: 32K, L1 D cache: 32K
CPU: L1 I cache: 32K, L1 D cache: 32K
CPU: L1 I cache: 32K, L1 D cache: 32K

过两天装一个新的Enterprise Linux 5,对比一下看看。

yangtingkun 评论于: 2007.12.17 15:29
re: 安装Oracle10201 for REDHAT AS4 x86_64 [回复]

找了一台新的DELL 2950,装了Oracle的Enterprise Linux 5 for x86-64。
检查了一下,L1缓存64k,L2缓存4M。

看来REDHAT AS4果然没有认出cpu的二级缓存。

yangtingkun 评论于: 2007.12.20 17:03

发表评论
标题

在此添加评论
表情符号: smile laughing tongue angry crying sad wassat wink

称呼

邮箱地址(可选)

个人主页(可选)

 authimage


切换风格
新闻聚合
博客日历
文章归档...
最新发表...
最新评论...
最多阅读文章...
最多评论文章...
博客统计...
Blog信息
网站链接...