Objectives:

•Describe your role as a database administrator (DBA) and explain typical tasks and tools

The approach for designing, implementing, and maintaining an Oracle database involves the following tasks:
1. Evaluating the database server hardware
2. Installing the Oracle software
3. Planning the database and security strategy
4. Creating, migrating, and opening the database
5. Backing up the database
6. Enrolling system users and planning for their Oracle Network access
7. Implementing the database design
8. Recovering from database failure
9. Monitoring database performance

Tools:
1.Oracle Universal Installer(OUI)
2.Database Configuration Assistant(DBCA)
3.Database Upgrade Assistant(DBUA)
4.Oracle Net Manager(netmgr)
5.Oracle Net Configuration Assistant(NetCA)
6.Oracle Enterprise Manager(EM)
7.Server Control Utility(srvctl)
8.SQL*Plus
9.Recovery Manager(RMAN)
10.Data Pump
11.SQL*Loader
12.Command-line tools:
emctl start | status | stop dbconsole
lsnrctl start | status | stop

•Plan an Oracle software installation
•Install Oracle Grid Infrastructure for a standalone server
•Install the Oracle database software

安装Linux

虚拟机配置:删除打印机,USB等
硬盘:40G
三个5G

分区:定制分区
/ 8000
/boot 512
/tmp 4096
/swap 4096
/u01 (所有其余的空间)

软件包选取:
Development--Development Tools/ gcc开头的
Services--FTP Server
Language--Chine Support

Firewall: Disabled
SELinux:Disabled
Do not create users

chkconfig --del sendmail

安装VMware工具
cd /media
ls
cd VMware Tools
ls
cp VMware+tab /mnt
cd /mnt
tar -zxvf VMware+tab
cd vm+tab
./vmware-install.pl

安装Grid
xhost +
su - grid
cd /u01/app/grid/grid
./runInstaller

DATA
External /dev/raw/raw1

cd /media/
cd RHEL_5.5\ x86_64\ DVD/
cd /Server

rpm -ivh *.* --nodeps(安装缺失的3个包,然后重新检测)

ctl+a
ctl+e分别到每一行的首部和尾部

su - grid
crs_stat -t

安装Oracle数据库
Installation Option: Install database software only

dbca配置数据库
dbca

Storage Type: File System
Sample Schemas

如果需要添加asm
su - grid
asmca

linux下cpio.gz文件的解压方法linux解压cpiocpio.gz
今天下载了 10201_database_linux_x86_64.cpio.gz 文件,解压方法如下:
1. gunzip 10201_database_linux_x86_64.cpio.gz
得到10201_database_linux_x86_64.cpio文件
2. cpio -idmv <10201_database_linux_x86_64.cpio
即可在当前目录下解压出来

--------------------------------------------------------------------------------------------

第三步、配置Linux系统环境和oracle用户环境变量

对于Oracle软件在Linux 5系统下的安装,需要用户提前在Linux系统下做一些配置,从而满足安装Oracle软件的基本需求。

以下0、1、2、3、4步使用root用户,第5和6步使用分别使用grid用户和oracle用户

0.要配置/etc/hosts 添加ip地址、 主机,否则grid的netca配置的时候会报错。

[root@instuctor ~]# vi /etc/hosts

# Do not remove the following line, or various programs

# that require network functionality will fail.

127.0.0.1      localhost.localdomain localhost

192.168.1.60    student

1.创建oracle用户和组

/usr/sbin/groupadd -g 501 oinstall

/usr/sbin/groupadd -g 502 dba

/usr/sbin/groupadd -g 503 oper

/usr/sbin/groupadd -g 504 asmadmin

/usr/sbin/groupadd -g 505 asmoper

/usr/sbin/groupadd -g 506 asmdba

/usr/sbin/useradd -g oinstall -G dba,asmdba,oper oracle

/usr/sbin/useradd -g oinstall -G asmadmin,asmdba,asmoper,oper,dba grid

passwd grid

passwd oracle

2.创建安装grid软件和oracle软件的目录,并授予相应的权限

mkdir -p /u01/app/oracle/product/11.2.0/db

mkdir -p /u01/app/grid/product/11.2.0/grid

chown -R oracle:oinstall /u01/app/

chown -R grid:oinstall /u01/app/grid

chmod -R 775 /u01/

3.配置系统文件和进程限制,配置内核参数

cat >> /etc/security/limits.conf <<EOF

#ORACLE SETTING

grid                 soft    nproc   2047

grid                 hard    nproc   16384

grid                 soft    nofile  1024

grid                 hard    nofile  65536

oracle               soft    nproc   2047

oracle               hard    nproc   16384

oracle               soft    nofile  1024

oracle               hard    nofile  65536

EOF

cat >>/etc/pam.d/login<<EOF

#ORACLE SETTING

session    required     pam_limits.so

EOF

cat >>/etc/sysctl.conf<<EOF

#ORACLE SETTING

fs.aio-max-nr = 1048576

fs.file-max = 6815744

kernel.shmmni = 4096

kernel.sem = 250 32000 100 128

net.ipv4.ip_local_port_range = 9000 65500

net.core.rmem_default = 262144

net.core.rmem_max = 4194304

net.core.wmem_default = 262144

net.core.wmem_max = 1048586

EOF

 

使配置的内核参数生效,使用sysctl -p命令

sysctl -p

4.关闭NTP服务和删除NTP配置文件

grid时间同步所需要的设置

Network Time Protocol Setting

/sbin/service ntpd stop

chkconfig ntpd off

rm /etc/ntp.conf

or, mv /etc/ntp.conf to /etc/ntp.conf.org.

5.用户grid的环境变量的设置

grid 用户配置文件 ORACLE_HOSTNAME请自行设置,这个配置使用grid用户

#su - grid

$vi .bash_profile

export LD_ASSUME_KERNEL=2.6.18

export TMP=/tmp

export TMPDIR=$TMP

export ORACLE_HOSTNAME=student

export ORACLE_BASE=/u01/app/grid

export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/grid

export ORACLE_SID=+ASM

export ORACLE_TERM=xterm

export PATH=$PATH:$ORACLE_HOME/bin

umask 022

if [ $USER = "oracle" ] || [ $USER = "grid" ]; then

if [ $SHELL = "/bin/ksh" ]; then

ulimit -p 16384

ulimit -n 65536

else

ulimit -u 16384 -n 65536

fi

umask 022

fi

使用source命令是环境变量生效

source  .bash_profile

6.用户oracle的环境变量的设置

oracle用户配置文件 ORACLE_HOSTNAME请自行设置,这个配置使用oacle用户

#su - oracle

$vi .bash_profile

# Oracle Settings oracle

export LD_ASSUME_KERNEL=2.6.18

export TMP=/tmp

export TMPDIR=$TMP

export ORACLE_HOSTNAME=student

export ORACLE_BASE=/u01/app/oracle

export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db

export ORACLE_SID=db01

export ORACLE_TERM=xterm

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib

export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib

export PATH=/usr/sbin:$PATH

export PATH=$ORACLE_HOME/bin:$PATH

if [ $USER = "oracle" ] || [ $USER = "grid" ]; then

if [ $SHELL = "/bin/ksh" ]; then

ulimit -p 16384

ulimit -n 65536

else

ulimit -u 16384 -n 65536

fi

umask 022

fi

使用source使环境变量立即生效

source  .bash_profile

第四步、安装和配置ASM

关闭虚拟机,添加硬盘sdb、sdc和sdd,大小都是3G,启动虚拟机,使用fdisk对添加的硬盘分区,使用wincp上传相应内核的asmlib软件到服务器,并安装

[root@stu1 asm]# fdisk /dev/sdb

Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel

Building a new DOS disklabel. Changes will remain in memory only,

until you decide to write them. After that, of course, the previous

content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): n

Command action

e   extended

p   primary partition (1-4)

p

Partition number (1-4): 1

First cylinder (1-391, default 1):

Using default value 1

Last cylinder or +size or +sizeM or +sizeK (1-391, default 391):

Using default value 391

Command (m for help): w

The partition table has been altered!

Calling ioctl() to re-read partition table.

Syncing disks.

[root@stu1 asm]# fdisk /dev/sdc

Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel

Building a new DOS disklabel. Changes will remain in memory only,

until you decide to write them. After that, of course, the previous

content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): n

Command action

e   extended

p   primary partition (1-4)

p

Partition number (1-4): 1

First cylinder (1-391, default 1):

Using default value 1

Last cylinder or +size or +sizeM or +sizeK (1-391, default 391):

Using default value 391

Command (m for help): w

The partition table has been altered!

Calling ioctl() to re-read partition table.

Syncing disks.

[root@stu1 asm]# fdisk /dev/sdd

Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel

Building a new DOS disklabel. Changes will remain in memory only,

until you decide to write them. After that, of course, the previous

content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): n

Command action

e   extended

p   primary partition (1-4)

p

Partition number (1-4): 1

First cylinder (1-391, default 1):

Using default value 1

Last cylinder or +size or +sizeM or +sizeK (1-391, default 391):

Using default value 391

Command (m for help): w

The partition table has been altered!

Calling ioctl() to re-read partition table.

Syncing disks.

[root@stu1 asm]# ll

oracleasm-2.6.18-194.el5-2.0.5-1.el5.x86_64.rpm

oracleasmlib-2.0.4-1.el5.x86_64.rpm

oracleasm-support-2.1.7-1.el5.x86_64.rpm

[root@stu1 asm]# rpm -Uvh *.rpm

warning: oracleasm-2.6.18-194.el5-2.0.5-1.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159

Preparing...                ################################## [100%]

1:oracleasm-support      ################################## [ 33%]

2:oracleasm-2.6.18-194.el################################## [ 67%]

3:oracleasmlib           ################################## [100%]

[root@stu1 asm]# /etc/init.d/oracleasm configure

Configuring the Oracle ASM library driver.

This will configure the on-boot properties of the Oracle ASM library

driver.  The following questions will determine whether the driver is

loaded on boot and what permissions it will have.  The current values

will be shown in brackets ('[]').  Hitting <ENTER> without typing an

answer will keep that current value.  Ctrl-C will abort.

Default user to own the driver interface []: grid

Default group to own the driver interface []: asmadmin

Start Oracle ASM library driver on boot (y/n) [n]: y

Scan for Oracle ASM disks on boot (y/n) [y]: y

Writing Oracle ASM library driver configuration: done

Initializing the Oracle ASMLib driver: [  OK  ]

Scanning the system for Oracle ASMLib disks: [  OK  ]

[root@stu1 asm]#

[root@stu1 asm]# /etc/init.d/oracleasm createdisk VOL1 /dev/sdb1

Marking disk "VOL1" as an ASM disk: [  OK  ]

[root@stu1 asm]# /etc/init.d/oracleasm createdisk VOL2 /dev/sdc1

Marking disk "VOL2" as an ASM disk: [  OK  ]

[root@stu1 asm]# /etc/init.d/oracleasm createdisk VOL3 /dev/sdd1

Marking disk "VOL3" as an ASM disk: [  OK  ]

[root@stu1 asm]# /etc/init.d/oracleasm scandisks

Scanning the system for Oracle ASMLib disks: [  OK  ]

[root@stu1 asm]# /etc/init.d/oracleasm listdisks

VOL1

VOL2

VOL3

第五步、安装grid软件

第六步、添加磁盘组fradata

第七部、安装oracle软件

第八步、使用dbca创建数据库库

OCA读书笔记(2) - 安装Oracle软件的更多相关文章

  1. OCA读书笔记(6) - 配置Oracle网络环境

    6.Configuring the Oracle Network Environment su - grid装grid时自动创建了监听netca--创建新的监听 vi $ORACLE_HOME/net ...

  2. OCA读书笔记(11) - 实现Oracle数据库审计

    11 Implementing Oracle Database Auditing 描述DBA对于安全和审计的职责使能标准的数据库审计安全审计选项查看审计信息维护审计路径 最小权限原则只在计算机上安装所 ...

  3. OCA读书笔记(1) - 浏览Oracle数据库架构

    Objectives: List the major architectural components of Oracle DatabaseExplain the memory structuresD ...

  4. Linux下搭建Oracle11g RAC(7)----安装Oracle 软件

    从此步骤开始,我们正式安装oracle软件: ① 以oracle用户登录图形界面,执行/home/oracle/database/runInstaller,进入OUI的图形安装界面: ② 进入OUI安 ...

  5. 使用NFS安装oracle软件

    昨天.使用openfiler创建nas存储系统,安装oracle软件,在所有正面最好,要创建一个数据库时报ora错,原来使用nfs安装oracle数据库,mount选项有特殊要求,如以下.以备查: R ...

  6. Linux下Oracle11G RAC报错:在安装oracle软件时报file not found一例

    Linux下Oracle11G RAC报错:在安装oracle软件时报file notfound一例 1.现象 之前安装一切都比較顺利,安装oracle软件时,进度到30%时报错:file not f ...

  7. Oracle 之 Cloning $oracle_home (克隆安装oracle软件)

    用途:Cloning an Oracle Home , 可以免去多台机器重复安装oracle软件 1.停止相关进程[root@node1 bin]# ./crsctl stop cluster -al ...

  8. [读书笔记]Linux命令行与shell编程读书笔记04 安装软件,编辑器注意事项

    1. debian以及redhat两种主流的linux发行版用的包管理工具 debian的包管理工具是 dpkg 再现安装的是 apt apt的工具主要有 apt-get apt-cache apti ...

  9. OCA读书笔记(3) - 使用DBCA创建Oracle数据库

    Objectives: •Create a database by using the Database Configuration Assistant (DBCA) •Generate databa ...

随机推荐

  1. eclipse+tomcat+maven debug的时候总是出现source not found /Edit lookup path...的问题解决方案

    eclipse+tomcat+maven debug的时候总是出现source not found /Edit  lookup path...的问题解决方案 这个问题纠结好久好久.... 问题出现的环 ...

  2. nice Validator参考

    快速上手 例1. DOM传参 1. 要验证一个表单,只需要给字段绑定规则“data-rule”就可以了2. 字段可以有多条规则,规则之间用分号(;)分隔3. js初始化不是必要的,只要是字段并且带有“ ...

  3. QSplashScreen无法背景透明的解决办法(强制StyleSheet生效)

    setWindowFlags(Qt::WindowStaysOnTopHint | Qt::SplashScreen | Qt::FramelessWindowHint); setAttribute( ...

  4. Python 2.7 学习笔记 元组的使用

    一.元组 python中的元组和列表非常类似,核心区别是元组的内容初始化后是不可以修改的,而队列可以. 关于列表的详细介绍,可查看上一篇列表使用文章. 大部分场景下,能用元组的地方,都可以用列表.但有 ...

  5. svn笔记2

    Examining History Your Subversion repository is like a time machine. It keeps a record of every chan ...

  6. zookeeper perl 版本需求

    [root@wx03 ~]# perl -v This is perl 5, version 22, subversion 1 (v5.22.1) built for x86_64-linux Cop ...

  7. get get_children方法

    get 方法: [root@wx03 zook]# cat a4.pl use ZooKeeper; use AnyEvent; use AE; use Data::Dumper; my $zk = ...

  8. c++參数传递

    定义: 形參:指出如今Sub 和Function过程形參表中的变量名.数组名,该过程在被调用前.没有为它们分配内存.其作用是说明自变量的类型和形态以及在过程中的作用.形參能够是除定长字符串变量之外的合 ...

  9. Servlet 实现文件的上传与下载

    这段时间尝试写了一个小web项目,其中涉及到文件上传与下载,虽然网上有很多成熟的框架供使用,但为了学习我还是选择了自己编写相关的代码.当中遇到了很多问题,所以在此这分享完整的上传与下载代码供大家借鉴. ...

  10. stm32之CAN发送、接收详解

    CAN接收报文并过滤之标识符过滤:(重点.难点) 在CAN协议里,报文的标识符不代表节点的地址,而是跟报文的内容相关的.因此,发送者以广播的形式把报文发送给所有的接收者.节点在接收报文时-根据标识符的 ...