首页 > 数据库 > Oracle > 正文

Installing Oracle 10g on RHEL AS 3 Step-by-Step

2020-03-09 22:45:55
字体:
来源:转载
供稿:网友

installing oracle 10g on rhel as 3 step-by-step  --转载

作者: fenng

installing oracle 10g on red hat enterprise linux advanced server 3 (rhel 3) v 0.21

不久前,oracle(甲骨文)公司在美国加州的总部宣布, oracle 10g 数据库 与 oracle rac 在 tpc-h 基准测试中创造了新的世
界纪录.这是个令人震惊的消息.因为这个测试是在 linux ( red hat enterprise linux advanced server 3) 的平台上进行的.
这充分显示了 oracle 在低成本 linux 集群服务器上高效管理大规模数据仓库的能力, 也表明 linux 在性能价格比上的优势,
标志着linux在大规模企业应用上已经成熟.

相信很多朋友已经对10g跃跃欲试了,现在从这里让我们开始10g之旅.

本文描述了在red hat enterprise linux advanced server 3 (rhel 3)上安装oracle 10g 必要的步骤和相关知识. 本文假定
你的linux 操作系统已经安装完毕,并且您应该具有一定的 unix 操作系统背景知识.


配置redhat as 3

操作系统版本:red hat enterprise linux as release 3 (taroon)
       kernel 2.4.21-4.el on an i686

按照常规来安装操作系统,记得要安装开发工具(gcc等必要工具).


必要的硬件信息检查:
检查内容最小值检查命令参考物理内存512m# grep memtotal /proc/meminfo 交换空间1.0 gb或者2倍内存大小# grep swaptotal /proc/meminfo /tmp 空间400 mb # df -k /tmp 软件所需空间2.5 gb # df -k (空间越大越好,如果是正式系统,应该进行详尽的规划) 数据库文件1.2 gb # df -k (空间越大越好,如果是正式系统,应该进行详尽的规划)

检查完如上各项之后, 应该修改核心参数.执行如下命令:

#vi /etc/sysctl.conf
#注释:#表示使用root用户操作,$表示使用oracle 用户进行操作.提示符后面的蓝色部分表示需要输入的命令,以下同.

在该文件末尾加入如下内容:

#-----------begin from here--------------------------------------
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
#--------------end here--------------------------------------------

编辑完之后,保存,执行 # /sbin/sysctl -p 命令操作来使我们所做的变更生效.

注:上面kernel.shmmax/kernel.sem等是典型的核心参数配置.您可能需要根据您的实际环境进行适当的变动.

关于这些核心参数的说明在oracle的oracle9i installation guide release 2 (9.2.0.1.0) for unix systems
中有很详细的说明.( http://download-west.oracle.com/docs/html/a96167_01/toc.htm )

然后,应该检查一下上面的操作是否正确:

# /sbin/sysctl -a | grep sem
# /sbin/sysctl -a | grep shm
# /sbin/sysctl -a | grep file-max
# /sbin/sysctl -a | grep ip_local_port_range


为oracle用户设定shell的限制

一般来说,出于性能上的考虑,还需要需要进行如下的设定,以便改进oracle用户的有关 nofile(可打开的文件
描述符的最大数)和nproc(单个用户可用的最大进程数量)

# vi /etc/security/limits.conf
# 添加如下的行

* soft nproc 2047* hard nproc 16384* soft nofile 1024* hard nofile 65536
添加如下的行到/etc/pam.d/login 文件:
session required /lib/security/pam_limits.so



编辑 /etc/profile 文件,添加如下部分:
if [ $user = "oracle" ]; then if [ $shell = "/bin/ksh" ]; then ulimit -p 16384 ulimit -n 65536 else ulimit -u 16384 -n 65536 fi fi
之后,执行$ unlimit 验证一下.

检查并安装相关补丁

在这个版本的rhel上安装oracle,必须要有几个软件包. 确认以下 rpm包都已经安装:

make-3.79
binutils-2.11
openmotif-2.2.2-16
setarch-1.3-1
compat-db-4.0.14.5
compat-gcc-7.3-2.96.122
compat-gcc-c++-7.3-2.96.122
compat-libstdc++-7.3-2.96.122
compat-libstdc++-devel-7.3-2.96.122

# rpm -qa | grep compat
# 在我的机器上输出如下:
compat-gcc-c++-7.3-2.96.122
compat-libstdc++-7.3-2.96.122
compat-libstdc++-devel-7.3-2.96.122
compat-glibc-7.x-2.2.4.32.5
compat-db-4.0.14-5
compat-gcc-7.3-2.96.122

# rpm -qa | grep openmotif
openmotif-devel-2.2.2-16
openmotif-2.2.2-16

# rpm -qa | grep setarch
setarch-1.3-1

上面显示的内容是在笔者已经安装了具体的rpm包之后的结果.一般情况下,你的系统上的输出结果和这个不同.如果个
别包没有安装,把系统安装光盘mount上,找到具体的软件包(大多数在第三张光盘上),然后利用如下的命令来安装相应
的包:

# rpm -ivh compat.....rpm

要额外注意的是,这些软件包之间是有依赖性的,先后的顺序要找好.否则会报告不能安装的错误.

此外,最好验证一下 gcc和glibc的版本(要求是gcc-3.2.3-2 或者更高)

#gcc -v
#rpm -q glibc

创建用户和相关的组

# /usr/sbin/groupadd oinstall
# /usr/sbin/groupadd dba
# /usr/sbin/useradd -g oinstall -g dba oracle 

如果只是测试目的的话,不创建oinstall组也没什么. 不过还是规范一点比较好.如果oracle 用户和dba组等已经存在,作
适当的调整即可.

检查并调整环境变量

登录为oracle用户
# su – oracle
$ cd
$ vi .bash_profile

#添加如下内容,你的具体值应该不会和这个完全相同.

export oracle_base=/u/app/oracle
export oracle_home=$oracle_base/product/10.1.0/db_1
export oracle_sid=test
export path=$path:$home/bin:$oracle_home/bin
export ld_library_path=$oracle_home/lib:/usr/lib
export lc_ctype=en_us.utf-8

然后执行
$ source .bash_profile
使环境变量生效. /u/app/oracle 等目录应该建立好并做合适的授权.


开始安装10g

mount你的安装盘.(我一般都是把文件拷贝到系统中一个具体的位置,比如/u/install ) . 执行

$ sh /u/install/runinstaller

如果不能出现安装画面,查看本文后面的faq。

非常值得称道的是,10g的安装相比以前的多了一个 checking operating system certification 的步骤。特别实用。
安装文件会自动检测所需的条件。如果有不符合的地方,安装程序会报告给你.并会给出具体原因。大大减少了出错的可能.
下面是检查成功输出的内容 :

checking operating system certification
expected result: one of redhat-2.1,redhat-3,unitedlinux-1.0
actual result: redhat-3
check complete. the overall result of this check is: passed
=======================================================================

checking kernel parameters
checking for version=2.4.9.25; found version=2.4.21. passed
checking for shmall=2097152; found shmall=2097152. passed
checking for shmseg=10; found shmseg=4096. passed
checking for semmsl=250; found semmsl=250. passed
checking for semmni=128; found semmni=128. passed
checking for filemax=65536; found filemax=65536. passed
checking for shmmni=4096; found shmmni=4096. passed
checking for semmns=32000; found semmns=32000. passed
checking for semopm=100; found semopm=100.passed
checking for shmmin=1; found shmmin=1. passed
checking for shmmax=2147483648; found shmmax=2147483648. passed
check complete. the overall result of this check is: passed
=======================================================================

checking recommended operating system packages
checking for make-3.79; found make-3.79.1-17. passed
checking for binutils-2.11.90.0.8-12; found binutils-2.14.90.0.4-26. passed
checking for gcc-2.96; found gcc-3.2.3-20. passed
checking for openmotif-2.1.30-11; found openmotif-2.2.2-16. passed
check complete. the overall result of this check is: passed
=======================================================================

checking recommended glibc version
expected result: 2.2.4.31.7
actual result: 2.3.2.95.3
check complete. the overall result of this check is: passed
=======================================================================

validating oracle_base location (if set)
check complete. the overall result of this check is: passed
=======================================================================

其他的步骤比较清晰,不再赘述.

最后系统会提示你运行root.sh文件.按照提示做即可.

faq (在linux平台安装oracle比较常见)

1. 不能启动安装界面.运行runinstaller提示信息类似如下:

xlib:connection to "localhost:0.0" refused by server
xlib:client is not authorized to connect to server

exception in thread "main" java.lang.internalerror:can't connect to x11 window server using "localhost:0.0"
at .......

解决办法: 设定你的display环境参数.# export display= your_ipaddress :0.0把your_ipaddress换成你的ip.或者
用root简单的执行一下# xhost + (要注意这样会有安全上的隐患)


2.安装界面显示很多"口口"样子的乱码

解决办法:查看locale输出
# locale
lang=en_us.utf-8
lc_ctype=zh_cn.gb18030
lc_numeric="en_us.utf-8"
lc_time="en_us.utf-8"
lc_collate="en_us.utf-8"
lc_monetary="en_us.utf-8"
lc_messages="en_us.utf-8"
lc_paper="en_us.utf-8"
lc_name="en_us.utf-8"
lc_address="en_us.utf-8"
lc_telephone="en_us.utf-8"
lc_measurement="en_us.utf-8"
lc_identification="en_us.utf-8"
lc_all=


执行#export lc_ctype=en_us.utf-8 然后重新调用安装程序.


3. 用ie登录linux服务器上的em出现乱码

 在linux(unix) 环境下成功安装了oracle 10g,从windows下用ie浏览器登录 10g 的em, 按钮是"口口"这样的方框.

解决办法: 参考 http://www.dbanotes.net/oracle/oracle-10g-font.properties.htm 或者是参考这个 http://www.linuxsir.org/bbs/showthread.php?s=&threadid=98591 后者比较彻底,前者比较"quick & dirty ".


4.创建数据库的时候出现ora-03113的错误

解决办法: 查看核心参数是否调整正确.参考http://www.dbanotes.net/oracle/ora-03113.htm


5. redhat 9 / fc1等系统10g不支持如何安装?

解决办法:在10g不支持的linux发行版上安装10g的解决方法

1). 运行runinstaller -ignoresysprereqs,这样会跳过检查

2). 摘自 http://www.puschitz.com/修改/etc/redhat-release文件:

#su - root
#cp /etc/redhat-release /etc/redhat-release.backup
#cat > /etc/redhat-release << eof
red hat enterprise linux as release 3 (taroon)
eof

安装完毕,执行如下操作:
#su - root
#cp /etc/redhat-release.backup /etc/redhat-release

3). http://www.dbanotes.net/oracle/10g-beta-install-bug.htm

同样的思路,我们可以修改oracle 的install/oraparam.ini文件达到目的


6 如何关掉那些 ocssd.bin 进程?

解决办法:编辑/etc/inittab文件(做好备份)

注释掉这一行:

h1:3:respawn:/etc/init.d/init.cssd run >/dev/null 2>&1 </dev/null


参考信息

werner puschitz 的 10g 安装指南 http://www.puschitz.com/installingoracle10g.shtml
werner puschitz 的站点的文章很翔实,如果您遇到了本文没有说清的问题,可以去看看那里.本文借鉴了该站点不少内容.

itpub论坛10g版块kamus等的大作http://www.itpub.net/forumdisplay.php?s=&forumid=70

关于核心参数等信息请查找 google http://www.google.com/

oracle database quick installation guide 10 g release 1 (10.1) for linux x86
http://download-west.oracle.com/docs/html/b10813_01/toc.htm

oracle database installation guide 10 g release 1 (10.1) for unix systems
http://download-west.oracle.com/docs/html/b10811_02/toc.htm

dbanotes.net 我的站点 包括不少和oracle有关的信息 http://www.dbanotes.net/

原文出处:
http://www.dbanotes.net/oracle/install-oracle10g-rhel3.htm

回首页



i would welcome any feedback.
please send questions, comments or corrections to [email protected] .



发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表