安装前准备

Oracle联机文档:B19306_01

Xmanager

ROOT 用户登录

1、检查系统需求

内存:最少1024M  grep MemTotal /proc/meminfo

/tmp 目录:至少400M df –h /tmp

Swap分区:至少2048 grep SwapTotal /proc/meminfo

1.5G-3.5G的硬盘空间用来安装数据库软件 df –h

2、软件包检查

Red Hat Enterprise Linux 4.0 and Asianux 2.0:

binutils-2.15.92.0.2-13.EL4
compat-db-4.1.25-9
compat-libstdc++-296-2.96-132.7.2
control-center-2.8.0-12
gcc-3.4.3-22.1.EL4
gcc-c++-3.4.3-22.1.EL44
glibc-2.3.4-2.9
glibc-common-2.3.4-2.9
gnome-libs-1.4.1.2.90-44.1(redhat 5.4 没有可以不用安装)
libstdc++-3.4.3-22.1
libstdc++-devel-3.4.3-22.1
make-3.80-5
pdksh-5.2.14-30
sysstat-5.0.5-1
xscreensaver-4.18-5.rhel4.2(redhat 5.4 没有可以不用安装)
setarch-1.6-1

rpm –qa|grep 软件包名

没有的软件可以通过yum 和rpm –ivh 安装

3、系统版本检查

Cat /etc/issue

修改linux 版本

vim /etc/redhat-release

oracle 10G 安装笔记_数据库软件

4、检查内核参数

内核版本 >2.6.9-5.EL

命令:uname –r

oracle 10G 安装笔记_用户登录_02

5、检查网络配置

6、修改主机名

vim /etc/hosts

加入一行记录

ip地址 主机名

oracle 10G 安装笔记_检查_03

7、创建用户和组

The OSDBA group (dba) :数据库管理员组

操作系统拥护加入了dba组,就是数据库管理员

The Oracle Inventory group (oinstall)

一定是数据库管理员的primary 组

创建组:

/usr/sbin/groupadd oinstall

/usr/sbin/groupadd dba

创建软件拥有者帐户

/usr/sbin/useradd -g oinstall -G dba oracle

oracle 10G 安装笔记_检查_04

检查nobody帐户是否存在

id nobody

oracle 10G 安装笔记_用户登录_05

7、添加内核参数

vim /etc/sysctl.conf

添加以下内容

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

net.core.rmem_default = 1048576

net.core.rmem_max = 1048576

net.core.wmem_default = 262144

net.core.wmem_max = 262144

oracle 10G 安装笔记_用户登录_06

生效:sysctl -p

oracle 10G 安装笔记_用户登录_07

8、检查和配置shell的限制

vim /etc/security/limits.conf

添加以下内容

oracle soft nproc 2047

oracle hard nproc 16384

oracle soft nofile 1024

oracle hard nofile 65536

oracle 10G 安装笔记_Oracle_08

9、加入pam

vim /etc/pam.d/login

添加以下内容

session required /lib/security/pam_limits.so

session required pam_limits.so

oracle 10G 安装笔记_数据库软件_09

10、设置profile

vim /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

oracle 10G 安装笔记_安装_10

检查语法并生效: source /etc/profile

oracle 10G 安装笔记_数据库软件_11

11、创建需要的目录

根目录 oracle_base

存储目录 oracle Inventory directoy (oui帮你创建)

家目录 oracle_home

mkdir -p /u01/app/oracle #创建oracle根目录

chown -R oracle:oinstall /u01/app/oracle #更改该目录的拥有人和拥有组

chmod -R 775 /u01/app/oracle #更改权限

oracle 10G 安装笔记_安装_12

12、配置用户环境变量

Vim /home/oracle/.bash_profile

添加以下内容

ORACLE_BASE=/u01/app/oracle

ORACLE_SID=orcl

export ORACLE_BASE ORACLE_SID

ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1

export ORACLE_HOME

oracle 10G 安装笔记_用户登录_13

语法检查并生效:source /home/oracle/.bash_profile

13、上传安装文件并解压

用xmanager 打开xftp窗口

oracle 10G 安装笔记_Oracle_14

oracle 10G 安装笔记_数据库软件_15

将oracle 10g 安装文件上传至服务器 /u01

oracle 10G 安装笔记_Oracle_16

上传完成后解压

unzip 10201_database_linux32.zip

oracle 10G 安装笔记_用户登录_17

解压完成后更该目录权限

chown -R oracle:oinstall /u01

chmod -R 775 /u01

oracle 10G 安装笔记_数据库软件_18

14、切换用户为oracle 运行安装脚本

oracle 10G 安装笔记_数据库软件_19

开启安装,取消安装实例,下一步

oracle 10G 安装笔记_用户登录_20

保持默认,下一步

oracle 10G 安装笔记_安装_21

安装前检查,没有问题,如果有问题的话,检查前面是否哪一步没有做对下一步。

oracle 10G 安装笔记_检查_22

安装

oracle 10G 安装笔记_Oracle_23

开启安装进程,开始安装

oracle 10G 安装笔记_检查_24

安装完成,此时用root登录,运行提示的两个脚本

oracle 10G 安装笔记_检查_25

/u01/app/oracle/oraInventory/orainstRoot.sh

/u01/app/oracle/product/10.2.0/db_1/root.sh

oracle 10G 安装笔记_Oracle_26

安装完成,退出

oracle 10G 安装笔记_检查_27

数据库软件安装完成

以上内容均来源于oracle 官方文档。有需要的可以去oracle 官方下载。或者找我索要