您的位置:首页 > 数据库 > Oracle

oracle 10G 安装笔记

2013-03-21 15:44 337 查看
安装前准备

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





4、检查内核参数

内核版本 >2.6.9-5.EL

命令:uname –r





5、检查网络配置

6、修改主机名

vim /etc/hosts

加入一行记录

ip地址 主机名





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





检查nobody帐户是否存在

id nobody





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





生效:sysctl -p





8、检查和配置shell的限制

vim /etc/security/limits.conf

添加以下内容

oracle soft nproc 2047

oracle hard nproc 16384

oracle soft nofile 1024

oracle hard nofile 65536





9、加入pam

vim /etc/pam.d/login

添加以下内容

session required /lib/security/pam_limits.so

session required pam_limits.so





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





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





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 #更改权限





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





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

13、上传安装文件并解压

用xmanager 打开xftp窗口









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





上传完成后解压

unzip 10201_database_linux32.zip





解压完成后更该目录权限

chown -R oracle:oinstall /u01

chmod -R 775 /u01





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





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





保持默认,下一步





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





安装





开启安装进程,开始安装





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





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

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





安装完成,退出





数据库软件安装完成

以上内容均来源于oracle 官方文档。有需要的可以去oracle 官方下载。或者找我索要
本文出自 “5T” 博客,请务必保留此出处http://fivet.blog.51cto.com/2302958/1159666
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: