记录一下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.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
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.105
xorg-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_BASE和ORACLE_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-12547:http://yangtingkun.itpub.net/post/468/454447
这三个bug都是由于官方文档上对于所需操作系统安装包的描述有误造成的。而且这两个包基本都是Oracle提供的解决方法或者相关软件包。
如果在Oracle提供的Enterprise Linux4 for X86-64上,安装Oracle则不会存在任何的问题。可能也正是由于Redhat对Oracle的支持不好,造成的了Oracle踢开了Redhat,自己推出了Enterprise Linux。
如果仅从这一点考虑,Oracle推出linux对于dba绝对是一个好消息,至少linux上面的安装不再是那么麻烦的事情了。
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/4227/viewspace-69542/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/4227/viewspace-69542/