Oracle 11g on ECS 测试实践--安装篇

本文涉及的产品
云服务器 ECS,每月免费额度280元 3个月
云服务器ECS,u1 2核4GB 1个月
简介: Oracle 11.2.0.4 on ECS(CentOS7.6) 测试实践--安装篇

一、环境介绍
1.ECS使用1核2G,系统、数据盘各20G这样的配置。
2.OS使用CentOS7.6
3.Oracle 使用 11.2.0.4
4.存储规划:/u01在系统盘,/oradata(存放数据)和/orabackup(存放备份)分别占用10G空间,存储设备使用上面单独的数据盘
二、安装
1.配置环境
这里我蹭一下Oracle的包,十分便利,参考文档

cd /etc/yum.repos.d/
wget http://public-yum.oracle.com/public-yum-ol7.repo
yum install oracle-rdbms-server-11gR2-preinstall --nogpgcheck
##完成后配置oracle用户的的环境变量
[root@orcl1 ~]# cat /home/oracle/.bashrc 
# .bashrc

# Source global definitions
if [ -f /etc/bashrc ]; then
        . /etc/bashrc
fi

# Uncomment the following line if you don't like systemctl's auto-paging feature:
# export SYSTEMD_PAGER=

# User specific aliases and functions
# Oracle configure profile parameters success
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
export PATH=$ORACLE_HOME/bin:$PATH
export ORACLE_OWNER=oracle
export ORACLE_SID=chsh
export ORACLE_TERM=vt100
export THREADS_FLAG=native
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
export PATH=$ORACLE_HOME/bin:$PATH
#
# change this NLS settings to suit your country:
# example:
# german_germany.we8iso8859p15, american_america.we8iso8859p2 etc.
#
export LANG=en_US 

2.使用静默的方式安装

[root@orcl1 database]# cp ./response/db_install.rsp ./db_install.rsp 
##此处我们对 db_install.rsp文件内容进行修改:
oracle.install.option=INSTALL_DB_SWONLY
ORACLE_HOSTNAME=orcl1
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION=/u01/app/oraInventory
ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1
ORACLE_BASE=/u01/app/oracle
oracle.install.db.InstallEdition=EE
oracle.install.db.EEOptionsSelection=false
oracle.install.db.DBA_GROUP=dba
DECLINE_SECURITY_UPDATES=true
##静默安装
./runInstaller -silent  -responseFile /opt/oracle/install/database/db_install.rsp
##安装及执行root脚本 略

3.善后-DB相关目录

##看下阿里分配的磁盘叫啥
[root@orcl1 database]# fdisk -l

Disk /dev/vda: 21.5 GB, 21474836480 bytes, 41943040 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000b0ebb

   Device Boot      Start         End      Blocks   Id  System
/dev/vda1   *        2048    41943039    20970496   83  Linux

Disk /dev/vdb: 21.5 GB, 21474836480 bytes, 41943040 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
##将/dev/vdb划分成两个分区,划分过程略
[root@orcl1 database]# ls /dev/vdb*
/dev/vdb  /dev/vdb1  /dev/vdb2
##将磁盘设置为自动挂载
[root@orcl1 database]# blkid /dev/vdb1 >> /etc/fstab 
[root@orcl1 database]# blkid /dev/vdb2 >> /etc/fstab 
##/etc/fstab 修改成如下(UUID保平安)
UUID=1cff7e09-01a3-4ae3-a4f1-81590d664a99       /oradata        ext4    defaults        0 0
UUID=4a242a04-ed42-4f61-9f95-781ee264b3f5       /orabackup      ext4    defaults        0 0
##创建文件夹并修改属组
[root@orcl1 database]# mkdir /oradata
[root@orcl1 database]# mkdir /orabackup
[root@orcl1 database]# chown -R oracle.oinstall /ora*
[root@orcl1 database]# mount -a
[root@orcl1 database]# mount
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
devtmpfs on /dev type devtmpfs (rw,nosuid,size=930656k,nr_inodes=232664,mode=755)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpuacct,cpu)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_prio,net_cls)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb)
configfs on /sys/kernel/config type configfs (rw,relatime)
/dev/vda1 on / type ext4 (rw,relatime,data=ordered)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
mqueue on /dev/mqueue type mqueue (rw,relatime)
tmpfs on /run/user/0 type tmpfs (rw,nosuid,nodev,relatime,size=188224k,mode=700)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=26,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=48832)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,relatime)
/dev/vdb1 on /oradata type ext4 (rw,relatime,data=ordered)
/dev/vdb2 on /orabackup type ext4 (rw,relatime,data=ordered)
[root@orcl1 database]# chown -R oracle.oinstall /ora*

基础安装结束

相关实践学习
一小时快速掌握 SQL 语法
本实验带您学习SQL的基础语法,快速入门SQL。
7天玩转云服务器
云服务器ECS(Elastic Compute Service)是一种弹性可伸缩的计算服务,可降低 IT 成本,提升运维效率。本课程手把手带你了解ECS、掌握基本操作、动手实操快照管理、镜像管理等。了解产品详情: https://www.aliyun.com/product/ecs
相关文章
|
7天前
|
网络安全 Apache
Apache服务器安装SSL证书
Apache服务器安装SSL证书
11 0
|
1月前
|
Oracle 关系型数据库 数据库
如何利用 Docker 安装 Oracle 数据库
【2月更文挑战第14天】
86 0
|
3天前
|
Linux 数据安全/隐私保护
Linux基础与服务器架构综合小实践
【4月更文挑战第9天】Linux基础与服务器架构综合小实践
387 6
|
10天前
|
弹性计算 前端开发 JavaScript
高校学生在家实践ECS弹性云服务器
简单谈谈我这几周使用ECS弹性云服务器的体验感
|
15天前
|
Ubuntu Linux 虚拟化
【Linux】ubuntu安装samba服务器
【Linux】ubuntu安装samba服务器
|
15天前
|
Linux
Linux安装bind9搭建自己的域名服务器
Linux安装bind9搭建自己的域名服务器
10 0
|
19天前
|
弹性计算 Serverless 数据库
ECS安装问题之docker安装如何解决
ECS(Elastic Compute Service,弹性计算服务)是云计算服务提供商提供的一种基础云服务,允许用户在云端获取和配置虚拟服务器。以下是ECS服务使用中的一些常见问题及其解答的合集:
|
26天前
|
Linux 数据安全/隐私保护 Docker
linux和windows中安装emqx消息服务器
linux和windows中安装emqx消息服务器
27 0
|
1月前
|
弹性计算 网络安全 文件存储
ECS热门应用 | 安装家用内网穿透服务
使用云服务器ECS,让家庭网络可以被外部网络访问。不在家时,也可以读取备份资料。
|
1月前
|
存储 Oracle 关系型数据库
手把手教你安装Oracle——以oracle 11g为例
手把手教你安装Oracle——以oracle 11g为例
手把手教你安装Oracle——以oracle 11g为例

热门文章

最新文章

推荐镜像

更多