Oracle_052_lesson_p2

Wesley13
• 阅读 709

Installing Oracle Software 安装Oracle软件

Oracle_052_lesson_p2

一般先安装GI,在安装DB。版本查询 metalink.oracle.com mos文件
Oracle_052_lesson_p2

1、在root用户中执行脚本
echo "192.168.132.120 dbserver" >> /etc/hosts
echo "======================================"
echo "The next will be created directory and group with users."
echo "======================================"
read -p "Press any key to continue:" var
mkdir /u01/app/grid/product/11.2.0/grid -p
mkdir /u01/app/oracle/product/11.2.0/db_1 -p
groupadd dba
useradd -g dba grid
useradd -g dba oracle
echo "Set password for oracle:"
passwd oracle
echo "Set password for grid:"
passwd grid
chown -R grid:dba /u01/app
chown -R oracle:dba /u01/app/oracle
chmod -R 775 /u01
echo "======================================"
echo "Setting local ISOforyum source."
echo "======================================"
mount -t iso9660 /dev/sr0 /media
mkdir /etc/yum.repos.d/bak
mv /etc/yum.repos.d/. /etc/yum.repos.d/bak/
echo "======================================"
echo "create yum configure file."
echo "======================================"
cat << EOF >/etc/yum.repos.d/OLE6.repo
[base]
name=Ole64
baseurl=file:///media
gpgcheck=0
gpgkey=file:///media/RPM-GPG-KEY-oracle
enabled=1
EOF
yum clean all
yum makecache
#install packagesfor Oracle GRID 11204
echo "======================================"
echo "The next will be installed depend on the package."
echo "======================================"
read -p "Press enter to continue:" var
yum install -y binutilscompat-libstdc++-33 compat-libcap1 elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibc glibccommon
glibc-devel libaio libaio-devel-0._libgcclibstdc++ libstdc++-devel make numactl sysstat libXp unixODBC
unixODBC-devel readline xorg-x11-apps
_
#disabled firewall and selinux
echo "======================================"
echo "To disable the firewall and Selinux"
echo "======================================"
service iptables stop
chkconfig iptables off
echo "SELINUX=disabled" > /etc/selinux/config
echo "SELINUXTYPE=targeted" >> /etc/selinux/config
setenforce 0
#create partition for disks
echo "======================================"
echo "The next will be create partition for /dev/sdc."
echo "======================================"
fdisk /dev/sdc
echo "======================================"
echo "The next will be create partition for /dev/sdd."
echo "======================================"
fdisk /dev/sdd
echo "======================================"
echo "The next will be create partition for /dev/sde."
echo "======================================"
fdisk /dev/sde
echo "======================================"
echo "The next will be create partition for /dev/sdf."
echo "======================================"
fdisk /dev/sdf
echo "======================================"
echo "The next will be create partition for /dev/sdg."
echo "======================================"
fdisk /dev/sdg
echo "======================================"
echo "The next will be create partition for /dev/sdh."
echo "======================================"
fdisk /dev/sdh
echo "======================================"
echo "The next will be create partition for /dev/sdi."
echo "======================================"
fdisk /dev/sdi
echo "======================================"
echo "The next will be create partition for /dev/sdj."
echo "======================================"
fdisk /dev/sdj
echo "======================================"
echo " create udev raw configuration file:"
echo "======================================"
cat << EOF >/etc/udev/rules.d/60-raw.rules
ACTION=="add", KERNEL=="sdc1", RUN+="/bin/raw /dev/raw/raw1 %N"
KERNEL=="raw1", OWNER="grid",GROUP="dba", MODE="0666"
ACTION=="add", KERNEL=="sdd1", RUN+="/bin/raw /dev/raw/raw2 %N"
KERNEL=="raw2", OWNER="grid",GROUP="dba", MODE="0666"
ACTION=="add", KERNEL=="sde1", RUN+="/bin/raw /dev/raw/raw3 %N"
KERNEL=="raw3", OWNER="grid",GROUP="dba", MODE="0666"
ACTION=="add", KERNEL=="sdf1", RUN+="/bin/raw /dev/raw/raw4 %N"
KERNEL=="raw4", OWNER="grid",GROUP="dba", MODE="0666"
ACTION=="add", KERNEL=="sdg1", RUN+="/bin/raw /dev/raw/raw5 %N"
KERNEL=="raw5", OWNER="grid",GROUP="dba", MODE="0666"
ACTION=="add", KERNEL=="sdh1", RUN+="/bin/raw /dev/raw/raw6 %N"
KERNEL=="raw6", OWNER="grid",GROUP="dba", MODE="0666"
ACTION=="add", KERNEL=="sdi1", RUN+="/bin/raw /dev/raw/raw7 %N"
KERNEL=="raw7", OWNER="grid",GROUP="dba", MODE="0666"
ACTION=="add", KERNEL=="sdj1", RUN+="/bin/raw /dev/raw/raw8 %N"
KERNEL=="raw8", OWNER="grid",GROUP="dba", MODE="0666"
EOF
echo "======================================"
echo "start_udev"
echo "======================================"
start_udev
echo "======================================"
echo "Check the UDEV RAW equipment to create results"
echo "======================================"
raw -qa
2、GRID用户执行下述脚本
cat << EOF >>/home/grid/test.txt
export ORACLE_SID=+ASM
export ORACLE_BASE=/u01/app/grid
export ORACLE_HOME=/u01/app/grid/product/11.2.0/grid
export PATH=$PATH:$ORACLE_HOME/bin
aliassqlplus='rlwrap sqlplus'
alias asmcmd='rlwrap asmcmd'
EOF
source /home/grid/.bash_profile
env|grep ORA
3、oracle用户执行下述脚本
cat << EOF >>/home/oracle/.bash_profile
export ORACLE_SID=tech1
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1
export PATH=$PATH:$ORACLE_HOME/bin
aliassqlplus='rlwrap sqlplus'
aliasrman='rlwrap rman'
EOF
source /home/oracle/.bash_profile
env|grep ORA


partprobe 使能分区立即生效
ls /dev/raw/*
1、创建组,用户
2、创建目录,权限
3、系统,防火墙,selinux
4、准备ASM disk
5、环境变量 添加
grid 用户下, ASMCA 创建快速恢复区
grid 用户下, crs_stat -t (6个在线,2个离线即OK)

点赞
收藏
评论区
推荐文章
blmius blmius
3年前
MySQL:[Err] 1292 - Incorrect datetime value: ‘0000-00-00 00:00:00‘ for column ‘CREATE_TIME‘ at row 1
文章目录问题用navicat导入数据时,报错:原因这是因为当前的MySQL不支持datetime为0的情况。解决修改sql\mode:sql\mode:SQLMode定义了MySQL应支持的SQL语法、数据校验等,这样可以更容易地在不同的环境中使用MySQL。全局s
Easter79 Easter79
3年前
swap空间的增减方法
(1)增大swap空间去激活swap交换区:swapoff v /dev/vg00/lvswap扩展交换lv:lvextend L 10G /dev/vg00/lvswap重新生成swap交换区:mkswap /dev/vg00/lvswap激活新生成的交换区:swapon v /dev/vg00/lvswap
皕杰报表之UUID
​在我们用皕杰报表工具设计填报报表时,如何在新增行里自动增加id呢?能新增整数排序id吗?目前可以在新增行里自动增加id,但只能用uuid函数增加UUID编码,不能新增整数排序id。uuid函数说明:获取一个UUID,可以在填报表中用来创建数据ID语法:uuid()或uuid(sep)参数说明:sep布尔值,生成的uuid中是否包含分隔符'',缺省为
Jacquelyn38 Jacquelyn38
3年前
2020年前端实用代码段,为你的工作保驾护航
有空的时候,自己总结了几个代码段,在开发中也经常使用,谢谢。1、使用解构获取json数据let jsonData  id: 1,status: "OK",data: 'a', 'b';let  id, status, data: number   jsonData;console.log(id, status, number )
Wesley13 Wesley13
3年前
Java获得今日零时零分零秒的时间(Date型)
publicDatezeroTime()throwsParseException{    DatetimenewDate();    SimpleDateFormatsimpnewSimpleDateFormat("yyyyMMdd00:00:00");    SimpleDateFormatsimp2newS
Stella981 Stella981
3年前
KVM调整cpu和内存
一.修改kvm虚拟机的配置1、virsheditcentos7找到“memory”和“vcpu”标签,将<namecentos7</name<uuid2220a6d1a36a4fbb8523e078b3dfe795</uuid
Wesley13 Wesley13
3年前
mysql设置时区
mysql设置时区mysql\_query("SETtime\_zone'8:00'")ordie('时区设置失败,请联系管理员!');中国在东8区所以加8方法二:selectcount(user\_id)asdevice,CONVERT\_TZ(FROM\_UNIXTIME(reg\_time),'08:00','0
Wesley13 Wesley13
3年前
00:Java简单了解
浅谈Java之概述Java是SUN(StanfordUniversityNetwork),斯坦福大学网络公司)1995年推出的一门高级编程语言。Java是一种面向Internet的编程语言。随着Java技术在web方面的不断成熟,已经成为Web应用程序的首选开发语言。Java是简单易学,完全面向对象,安全可靠,与平台无关的编程语言。
Stella981 Stella981
3年前
Django中Admin中的一些参数配置
设置在列表中显示的字段,id为django模型默认的主键list_display('id','name','sex','profession','email','qq','phone','status','create_time')设置在列表可编辑字段list_editable
Wesley13 Wesley13
3年前
MySQL部分从库上面因为大量的临时表tmp_table造成慢查询
背景描述Time:20190124T00:08:14.70572408:00User@Host:@Id:Schema:sentrymetaLast_errno:0Killed:0Query_time:0.315758Lock_
Python进阶者 Python进阶者
10个月前
Excel中这日期老是出来00:00:00,怎么用Pandas把这个去除
大家好,我是皮皮。一、前言前几天在Python白银交流群【上海新年人】问了一个Pandas数据筛选的问题。问题如下:这日期老是出来00:00:00,怎么把这个去除。二、实现过程后来【论草莓如何成为冻干莓】给了一个思路和代码如下:pd.toexcel之前把这