检查系列:
1. 以root用户登录系统
2. 检查硬件需求
2.1 内存需求
最小:1GB内存
推荐:2GB 内存或者更多
查看内存命令:
# grep MemTotal /proc/meminfo
Swap空间的建议值:
内存 Swap空间
Between 1 GB and 2 GB 1.5倍于内存
Between 2 GB and 16 GB 与内存相等
More than 16 GB 16 GB
查看swap空间:
# grep SwapTotal /proc/meminfo
查看系统结构:(查看处理器的架构是否匹配Oracle软件发行的版本)
# uname –m
如果有必要,查看可用的内存和swap空间。
# free
2.2系统架构
# uname –m
2.3硬盘空间需求
/tmp目录至少需要1GB硬盘空间
# df -h /tmp
查看系统的空闲的硬盘空间
# df –h
在Linux x86-64下的软件文件(software files)和数据文件(data files)的需求
安装类型 软件文件需求(GB)
Enterprise Edition(商业版) 4.35
Standard Edition(标准版) 4.22
Installation Type 数据文件需求(GB)
Enterprise Edition(商业版) 1.7
Standard Edition(标准版) 1.5
3 red hat enterprise Linux 5 必须安装的package
Oracle 11gR2针对red hat enterprise Linux 5 必须安装的package
The following or later version of packages for Asianux 3, Oracle Linux 5, and Red
Hat Enterprise Linux 5 must be installed:
binutils-2.17.50.0.6
compat-libstdc++-33-3.2.3
compat-libstdc++-33-3.2.3 (32 bit)
elfutils-libelf-0.125
elfutils-libelf-devel-0.125
gcc-4.1.2
gcc-c++-4.1.2
glibc-2.5-24
glibc-2.5-24 (32 bit)
glibc-common-2.5
glibc-devel-2.5
glibc-devel-2.5 (32 bit)
glibc-headers-2.5
ksh-20060214
libaio-0.3.106
libaio-0.3.106 (32 bit)
libaio-devel-0.3.106
libaio-devel-0.3.106 (32 bit)
libgcc-4.1.2
libgcc-4.1.2 (32 bit)
libstdc++-4.1.2
libstdc++-4.1.2 (32 bit)
libstdc++-devel 4.1.2
make-3.81
sysstat-7.0.2
unixODBC-2.2.11
unixODBC-2.2.11 (32 bit)
unixODBC-devel-2.2.11
unixODBC-devel-2.2.11 (32 bit)
查看oracle所必须的包:
rpm -q \binutils-2.17.50.0.6 compat-libstdc++-33-3.2.3 elfutils-libelf elfutils-libelf-devel gcc \
gcc-c++ glibc glibc-common-2.5 glibc-devel-2.5 glibc-headers-2.5 ksh libaio libaio-devel libgcc-4.1.2 libstdc++-4.1.2 libstdc++-devel \
make-3.81 sysstat-7.0.2 unixODBC-2.2.11 unixODBC-devel-2.2.11
详细如下:
binutils-2.17.50.0.6-12.el5
compat-libstdc++-33-3.2.3-61
compat-libstdc++-33-3.2.3-61
elfutils-libelf-0.137-3.el5
elfutils-libelf-0.137-3.el5
elfutils-libelf-devel-0.137-3.el5
gcc-4.1.2-46.el5
gcc-c++-4.1.2-46.el5
glibc-2.5-42
glibc-2.5-42
glibc-common-2.5-42
glibc-devel-2.5-42
glibc-devel-2.5-42
glibc-headers-2.5-42
package ksh-20060214 is not installed
libaio-0.3.106-3.2
libaio-0.3.106-3.2
package libaio-devel is not installed
libgcc-4.1.2-46.el5
libgcc-4.1.2-46.el5
libstdc++-4.1.2-46.el5
libstdc++-4.1.2-46.el5
libstdc++-devel-4.1.2-46.el5
make-3.81-3.el5
package sysstat-7.0.2 is not installed
package unixODBC-2.2.11 is not installed
package unixODBC-devel-2.2.11 is not installed
没安装的rpm包:
package ksh-20060214 is not installed
package libaio-devel is not installed
package sysstat-7.0.2 is not installed
package unixODBC-2.2.11 is not installed
package unixODBC-devel-2.2.11 is not installed
挂载光盘:
mkdir cdrom
mount -t iso9660 /dev/hdc /mnt/cdrom
安装rpm包
ls -l |egrep "ksh|libaio-devel|sysstat|unixODBC|unixODBC-devel"
rpm -ivh unixODBC-2.2.11-7.1.x86_64.rpm
rpm -ivh unixODBC-2.2.11-7.1.i386.rpm
rpm -ivh unixODBC-devel-2.2.11-7.1.x86_64.rpm
rpm -ivh unixODBC-devel-2.2.11-7.1.i386.rpm
rpm -ivh libaio-devel-0.3.106-3.2.x86_64.rpm
rpm -ivh libaio-devel-0.3.106-3.2.i386.rpm
rpm -ivh sysstat-7.0.2-3.el5.x86_64.rpm
rpm -ivh ksh-20080202-14.el5.x86_64.rpm
执行到这步---------------------
配置主机名称
vi /etc/hosts
127.0.0.1 localhost.localdomain localhost
10.0.17.220 oracle-n1
修改linux的内核参数:
修改/etc/sysctl.conf
kernel.shmall = 2097152
kernel.shmmax = 2147483648
其中,如果系统默认配置比这里给出的值大,就不要修改原有的配置
fs.file-max = 6553600
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 4194304
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 262144
要使 /etc/sysctl.conf 更改立即生效,执行以下命令
/sbin/sysctl -p
创建用户和用户组以及安装目录
groupadd oinstall
groupadd dba
groupadd oper
useradd oracle
usermod -g oinstall -G dba,oper,oracle oracle
passwd oracle
mkdir /data/ora11g
mkdir /data/ora11g/product
mkdir /data/ora11g/oradata
mkdir /data/software
mkdir /data/oraInventory
友情提醒,此时可以顺手使用unzip命令,将下载到的ORACLE安装文件:linux.x64_11gR2_database_1of2.zip和linux.x64_11gR2_database_2of2.zip解压缩到/data/software目录下,注意两个文件要解压到相同路径。
后使用chown命令修改目录的所有者为oracle用户:
chown -R oracle:oinstall /data/ora11g
chown -R oracle:oinstall /data/software
chown -R oracle:oinstall /data/oraInventory
为Oracle用户设置shell限制
修改:/etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
也可以做如下配置(针对高性能服务器)
oracle soft nofile 65536
oracle hard nofile 65536
oracle soft nproc 16384
oracle hard nproc 16384
修改:/etc/pam.d/login
session required /lib/security/pam_limits.so
session required pam_limits.so
配置oracle用户环境变量
使用vi命令编辑/home/oracle/.bash_profile,补充下列内容:
export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_BASE=/data/ora11g
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
export ORACLE_SID=zsddb
export ORACLE_TERM=xterm
export PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib64:/usr/lib64:/usr/local/lib64:/usr/X11R6/lib64/
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
export NLS_LANG="AMERICAN_AMERICA.ZHS16GBK"
umask 022
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
执行以下命令让配置马上生效
source /home/oracle/.bash_profile
之前把从官网下载的oracle包,拷贝到/data/software/目录下,并且unzip
执行安装:
经过一番准备,终于正式进入到安装步骤了。这里我们使用OUI来安装ORACLE,因此操作需要在视窗界面下进行。以oracle用户启动到视窗状态,打开一个终端。
提示:
如果是以root用户启动的话,需要首先执行:
[root@node1 ~]# xhost +
Access control disabled, clients can connect from any host
[root@node1 ~]# su - oracle
[root@node1 ~]# su - oracle
[oracle@node1 ~]$ cd /data/software/database/
[oracle@node1 database]$ ./runInstaller
阅读(7950) | 评论(2) | 转发(2) |