OCA读书笔记(2) - 安装Oracle软件
Objectives:
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
安装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软件的更多相关文章
- OCA读书笔记(6) - 配置Oracle网络环境
6.Configuring the Oracle Network Environment su - grid装grid时自动创建了监听netca--创建新的监听 vi $ORACLE_HOME/net ...
- OCA读书笔记(11) - 实现Oracle数据库审计
11 Implementing Oracle Database Auditing 描述DBA对于安全和审计的职责使能标准的数据库审计安全审计选项查看审计信息维护审计路径 最小权限原则只在计算机上安装所 ...
- OCA读书笔记(1) - 浏览Oracle数据库架构
Objectives: List the major architectural components of Oracle DatabaseExplain the memory structuresD ...
- Linux下搭建Oracle11g RAC(7)----安装Oracle 软件
从此步骤开始,我们正式安装oracle软件: ① 以oracle用户登录图形界面,执行/home/oracle/database/runInstaller,进入OUI的图形安装界面: ② 进入OUI安 ...
- 使用NFS安装oracle软件
昨天.使用openfiler创建nas存储系统,安装oracle软件,在所有正面最好,要创建一个数据库时报ora错,原来使用nfs安装oracle数据库,mount选项有特殊要求,如以下.以备查: R ...
- Linux下Oracle11G RAC报错:在安装oracle软件时报file not found一例
Linux下Oracle11G RAC报错:在安装oracle软件时报file notfound一例 1.现象 之前安装一切都比較顺利,安装oracle软件时,进度到30%时报错:file not f ...
- Oracle 之 Cloning $oracle_home (克隆安装oracle软件)
用途:Cloning an Oracle Home , 可以免去多台机器重复安装oracle软件 1.停止相关进程[root@node1 bin]# ./crsctl stop cluster -al ...
- [读书笔记]Linux命令行与shell编程读书笔记04 安装软件,编辑器注意事项
1. debian以及redhat两种主流的linux发行版用的包管理工具 debian的包管理工具是 dpkg 再现安装的是 apt apt的工具主要有 apt-get apt-cache apti ...
- OCA读书笔记(3) - 使用DBCA创建Oracle数据库
Objectives: •Create a database by using the Database Configuration Assistant (DBCA) •Generate databa ...
随机推荐
- CodeForces 189A 166E 【DP ·水】
非常感谢 Potaty 大大的援助使得我最后A出了这两题DP ================================== 189A : 求切分后的ribbon最多的数目,不过要求切分后只能存 ...
- Android学习笔记:如何高效显示图片,避免内存溢出 和 ImageView无法显示大尺寸的图片
因为手机的内存资源是有限的,每个app可使用的内存是受限的.而现在采用高分辨率拍的照片往往很大.如果加载时不注意方法,很有可能会引起java.lang.OutofMemoryError: bitmap ...
- 基于SOAP的xml网络交互心得
感谢小二同学将遇到的问题分享给我们,再此给以掌声.如果看不懂下面文章的建议查找一下HTTP协议的文艺,对HTTP协议要有个概念. XML网络交互心得 目录 一. xml解析 1.根路径下 2. ...
- 达内TTS6.0课件basic_day04
- uart串口协议
uart串口协议 /* USART Word Length ---------------------------------------------------------*/ US ...
- Python:渗透测试开源项目
Python:渗透测试开源项目[源码值得精读] sql注入工具:sqlmap DNS安全监测:DNSRecon 暴力破解测试工具:patator XSS漏洞利用工具:XSSer Web服务器压力测试工 ...
- Flex中怎么给表格中的滚动栏定位
1.问题背景 假设表格中的字段过多,会出现滚动栏,在将滚动栏滚到一定的位置时,又一次刷新表格.滚动栏会回到原处,原来查看的字段还得继续滚动,才干查看到. 2.实现实例 <? xml versio ...
- ajax跨域请求--jsonp实例
ajax请求代码: //区域事件选择配送点 function changeDistrict(value){ if(value == 0){ $('#transport_node').empty(); ...
- .cmd文件与.bat文件
.cmd文件与.bat文件的区别 包括ASSOC.FTYPE.APPEND.PATH.PROMPT.SET等6个命令在.bat和命令行环境下与.cmd环境下的执行表现不尽相同在.cmd环境下这些命令无 ...
- @Autowired 注释与@Qualifier 注释
@Service("OrganDaoIbatis") public class OrganDaoIbatis extends BaseDao implements IOrganDa ...