下面不过多介绍,请阅读OEL6上安装Oracle 12c。

1、系统信息:

  1. [root@12c ~]# uname -a

  2. Linux 12c.luocs.com 2.6.32-300.10.1.el5uek #1 SMP Wed Feb 22 17:37:40 EST 2012 x86_64 x86_64 x86_64 GNU/Linux

  3. [root@12c ~]# grep MemTotal /proc/meminfo

  4. MemTotal:        3273192 kB

  5. [root@12c ~]# grep SwapTotal /proc/meminfo

  6. SwapTotal:       8285752 kB

  7. [root@12c ~]# df -h

  8. Filesystem            Size  Used Avail Use% Mounted on

  9. /dev/sda3              36G  3.8G   31G  12% /

  10. /dev/sda1              99M   22M   72M  24% /boot

  11. tmpfs                 1.6G     0  1.6G   0% /dev/shm

  12. /dev/sdb1             5.0G  5.0G     0 100% /usr/swap

这里简单说明下,我安装的OEL5 SWAP空间仍然不够大,因此我就扩展了下,扩展方法:
我在虚拟机新增一块儿5G的disk,启动后fdisk分区了下:

  1. [root@12c ~]# fdisk -l

  2. Disk /dev/sda: 42.9 GB, 42949672960 bytes

  3. 255 heads, 63 sectors/track, 5221 cylinders

  4. Units = cylinders of 16065 * 512 = 8225280 bytes

  5. Device Boot      Start         End      Blocks   Id  System

  6. /dev/sda1   *           1          13      104391   83  Linux

  7. /dev/sda2              14         421     3277260   82  Linux swap / Solaris

  8. /dev/sda3             422        5221    38556000   83  Linux

  9. Disk /dev/sdb: 5368 MB, 5368709120 bytes

  10. 255 heads, 63 sectors/track, 652 cylinders

  11. Units = cylinders of 16065 * 512 = 8225280 bytes

  12. Device Boot      Start         End      Blocks   Id  System

  13. /dev/sdb1               1         652     5237158+  83  Linux

ext3格式化:

  1. [root@12c ~]# mkfs.ext3 /dev/sdb1

  2. mke2fs 1.39 (29-May-2006)

  3. Filesystem label=

  4. OS type: Linux

  5. Block size=4096 (log=2)

  6. Fragment size=4096 (log=2)

  7. 655360 inodes, 1309289 blocks

  8. 65464 blocks (5.00%) reserved for the super user

  9. First data block=0

  10. Maximum filesystem blocks=1342177280

  11. 40 block groups

  12. 32768 blocks per group, 32768 fragments per group

  13. 16384 inodes per group

  14. Superblock backups stored on blocks:

  15. 32768, 98304, 163840, 229376, 294912, 819200, 884736

  16. Writing inode tables: done

  17. Creating journal (32768 blocks): done

  18. Writing superblocks and filesystem accounting information: done

  19. This filesystem will be automatically checked every 31 mounts or

  20. 180 days, whichever comes first.  Use tune2fs -c or -i to override.

创建一个目录,准备将此文件系统挂载:

  1. [root@12c ~]# mkdir /usr/swap

  2. [root@12c ~]# mount /dev/sdb1 /usr/swap

在/usr/swap下dd出5GB的空间

  1. [root@12c ~]# dd if=/dev/zero of=/usr/swap/swapdisk bs=10240Kcount=500

  2. dd: writing `/usr/swap/swapdisk': No space left on device

  3. 490+0 records in

  4. 489+0 records out

  5. 5128712192 bytes (5.1 GB) copied, 33.1548 seconds, 155 MB/s

创建新交换分区空间

  1. [root@12c ~]# mkswap /usr/swap/swapdisk

  2. Setting up swapspace version 1, size = 5128708 kB

查看原先的分区空间

  1. [root@12c ~]# free -m

  2. total       used       free     shared    buffers     cached

  3. Mem:          3196       2778        417          0         20       2502

  4. -/+ buffers/cache:        255       2941

  5. Swap:         3200          0       3200

启动新增加的swaptest的交换空间

  1. [root@12c ~]# swapon /usr/swap/swapdisk

查看增加后的交换空间

  1. [root@12c ~]# free -m

  2. total       used       free     shared    buffers     cached

  3. Mem:          3196       3146         49          0          8       2885

  4. -/+ buffers/cache:        252       2944

  5. Swap:         8091          0       8091

将新增加交换分区空间添加进开机启动

  1. [root@12c ~]# vi /etc/fstab

  2. – 添加一行

  3. /dev/sdb1               /usr/swap               ext3    defaults        0 0

  4. /usr/swap/swapdisk      swap                    swap    defaults        0 0

最后reboot重启验证

安装rlwrap

  1. [root@12c ~]# rpm -ivh /install/rlwrap-0.37-1.el5.x86_64.rpm

  2. warning: /install/rlwrap-0.37-1.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 217521f6

  3. Preparing…                ########################################### [100%]

  4. 1:rlwrap                 ########################################### [100%]

修改/etc/hosts

  1. [root@12c ~]# vi /etc/hosts

  2. # Do not remove the following line, or various programs

  3. # that require network functionality will fail.

  4. 127.0.0.1               localhost.localdomain localhost

  5. ::1             localhost6.localdomain6 localhost6

  6. 192.168.80.139  12c.luocs.com   12c

配置yum源,这里我参考了http://public-yum.oracle.com,其中有如下内容:
Getting Started
1. Download and Install Oracle Linux
2. Download and copy the appropriate yum configuration file in place, by running the following commands as root:
Oracle Linux 4, Update 6 or Newer
# cd /etc/yum.repos.d
# mv Oracle-Base.repo Oracle-Base.repo.disabled
# wget http://public-yum.oracle.com/public-yum-el4.repo

Oracle Linux 5
# cd /etc/yum.repos.d
# wget http://public-yum.oracle.com/public-yum-el5.repo

Oracle Linux 6
# cd /etc/yum.repos.d
# wget http://public-yum.oracle.com/public-yum-ol6.repo

Oracle VM 2
# cd /etc/yum.repos.d
# wget http://public-yum.oracle.com/public-yum-ovm2.repo
3. Enable the appropriate repository by editing the yum configuration file
 ○ Open the yum configuration file in a text editor
 ○ Locate the section in the file for the repository you plan to update from, e.g. [el4_u6_base]
 ○ Change enabled=0 to enabled=1
4. Begin using yum, for example:
yum list
yum install firefox
You may be prompted to confirm the import of the Oracle OSS Group GPG key.

首先下载linux 5 对应的yum配置文件

  1. [root@12c ~]# cd /etc/yum.repos.d/

  2. [root@12c yum.repos.d]# wget http://public-yum.oracle.com/public-yum-el5.repo

  3. –2013-06-27 10:16:02–  http://public-yum.oracle.com/public-yum-el5.repo

  4. Resolving public-yum.oracle.com… 137.254.56.43

  5. Connecting to public-yum.oracle.com|137.254.56.43|:80… connected.

  6. HTTP request sent, awaiting response… 200 OK

  7. Length: 4220 (4.1K) [text/plain]

  8. Saving to: `public-yum-el5.repo'

  9. 100%[===============================================================================>] 4,220       11.8K/s   in 0.4s

  10. 2013-06-27 10:16:03 (11.8 KB/s) – `public-yum-el5.repo' saved [4220/4220]

配置文件中将enable全部启动,0改为1。

安装oracle-validated

  1. [root@12c yum.repos.d]# yum install oracle-validated -y

安装完成之后,基本的预安装条件都已经满足了

  1. [root@12c ~]# id oracle

  2. uid=54321(oracle) gid=54321(oinstall) groups=54321(oinstall),54322(dba)

创建安装目录并授权

  1. [root@12c ~]# mkdir -p /u01/app/oracle/product/12.1.0/db_1

  2. [root@12c ~]# chown -R oracle:oinstall /u01

  3. [root@12c ~]# chmod -R 775 /u01

配置环境变量

  1. [oracle@12c ~]$ vi .bash_profile

  2. export PATH

  3. export TMP=/tmp

  4. export TMPDIR=$TMP

  5. export ORACLE_HOSTNAME=12c.luocs.com

  6. export ORACLE_UNQNAME=luocs12c

  7. export ORACLE_BASE=/u01/app/oracle

  8. export ORACLE_HOME=$ORACLE_BASE/product/12.1.0/dbhome_1

  9. export ORACLE_SID=luocs12c

  10. export PATH=/usr/sbin:$PATH

  11. export PATH=$ORACLE_HOME/bin:$PATH

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

  13. export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib

  14. alias sqlplus="rlwrap sqlplus"

  15. alias rman="rlwrap rman"

解压介质

  1. [root@12c ~]# chown -R oracle.oinstall /install/

  2. [root@12c ~]# su – oracle

  3. [oracle@12c ~]$ cd /install/

  4. [oracle@12c install]$ unzip linuxamd64_12c_database_1of2.zip

  5. [oracle@12c install]$ unzip linuxamd64_12c_database_2of2.zip

这里我先仅安装数据库软件,然后netca配置了监听器,略

dbca建库,参考图为主

这里稍作解释,我勾选了Create As Container Database,然后选择了Create a Container Database with one or more PDBs,数量为2个,PDB Name为luocs,到时候就以luocs1、luocs2形式出现。当然,我们也可以在后续手动方式创建或者克隆出PDBs

这里出现网络配置页面,可能在没有提前配置监听的情况下在这里进行配置,这个我没有尝试过

这里备份出脚本来,供手动建库参考

最后简单查看,发现CDB,PDB数据库都有自己的system、sysaux、default tablespace、temp是独立的,但undo、control、redo是共享的

  1. SQL> set line 150 pages 9999

  2. SQL> select name from v$datafile;

  3. NAME

  4. —————————————————————————————–

  5. /u01/app/oracle/oradata/luocs12c/system01.dbf

  6. /u01/app/oracle/oradata/luocs12c/sysaux01.dbf

  7. /u01/app/oracle/oradata/luocs12c/undotbs01.dbf

  8. /u01/app/oracle/oradata/luocs12c/pdbseed/system01.dbf

  9. /u01/app/oracle/oradata/luocs12c/users01.dbf

  10. /u01/app/oracle/oradata/luocs12c/pdbseed/sysaux01.dbf

  11. /u01/app/oracle/oradata/luocs12c/luocs1/system01.dbf

  12. /u01/app/oracle/oradata/luocs12c/luocs1/sysaux01.dbf

  13. /u01/app/oracle/oradata/luocs12c/luocs1/luocs1_users01.dbf

  14. /u01/app/oracle/oradata/luocs12c/luocs2/system01.dbf

  15. /u01/app/oracle/oradata/luocs12c/luocs2/sysaux01.dbf

  16. /u01/app/oracle/oradata/luocs12c/luocs2/luocs2_users01.dbf

  17. 12 rows selected.

  18. sys@LUOCS12C> select name from v$tempfile;

  19. NAME

  20. —————————————————————————————————-

  21. /u01/app/oracle/oradata/luocs12c/temp01.dbf

  22. /u01/app/oracle/oradata/luocs12c/pdbseed/pdbseed_temp01.dbf

  23. /u01/app/oracle/oradata/luocs12c/luocs1/temp01.dbf

  24. /u01/app/oracle/oradata/luocs12c/luocs2/temp01.dbf

  25. sys@LUOCS12C> select member from v$logfile;

  26. MEMBER

  27. —————————————————————————————————-

  28. /u01/app/oracle/oradata/luocs12c/redo03.log

  29. /u01/app/oracle/oradata/luocs12c/redo02.log

  30. /u01/app/oracle/oradata/luocs12c/redo01.log

  31. sys@LUOCS12C> select name from v$controlfile;

  32. NAME

  33. —————————————————————————————————-

  34. /u01/app/oracle/oradata/luocs12c/control01.ctl

  35. /u01/app/oracle/fast_recovery_area/luocs12c/control02.ctl

如下方式查看两个pdbs目前没有open

  1. sys@LUOCS12C> select DBID, NAME, OPEN_MODE, CREATE_SCN from v$pdbs;

  2. DBID NAME                           OPEN_MODE  CREATE_SCN

  3. ———- —————————— ———- ———-

  4. 4061811736 PDB$SEED                       READ ONLY     1720764

  5. 1340482989 LUOCS1                         MOUNTED       1915011

  6. 770810334 LUOCS2                         MOUNTED       1915984

先到这里。

原文链接:http://www.luocs.com/archives/800.html

转载于:https://blog.51cto.com/lucifer119/1262430

Oracle Eneterprise Linux 5.8上安装Database 12c相关推荐

  1. 红旗linux安装oracle,红旗linux 4.1上安装oracle 9204

    本文是在参照和实践网上相关安装文档后整理其流程如下.[@more@] 一.红旗linux4.1的安装介质是光盘,oracle 9204为ISO文件: 红旗linux必须为最大化安装,否则其不能安装or ...

  2. 在 Oracle Enterprise Linux 和 iSCSI 上构建您自己的 Oracle RAC 11g 集群 (2)

    13. 创建任务角色划分操作系统权限组.用户和目录 在集群的两个 Oracle RAC 节点上针对 grid 和 oracle 用户执行以下用户.组和目录配置并设置 shell 限制的任务.     ...

  3. 在 Oracle Enterprise Linux 和 iSCSI 上构建您自己的 Oracle RAC 集群(续)

    DBA:Linux    下载  Oracle 数据库 11g    标签 linux, rac, clustering, 全部 在 Oracle Enterprise Linux 和 iSCSI 上 ...

  4. 在 Oracle Enterprise Linux 和 iSCSI 上构建您自己的 Oracle RAC 11g 集群

    作者:Jeffrey Hunter 了解如何以低于 2,700 美元的费用在 Oracle Enterprise Linux 上安装并配置 Oracle RAC 11g 第 2 版开发集群. 本指南中 ...

  5. 使用 VMware 在 Linux 5.4 上安装、升级及维护 Oracle 10gR2 RAC

    使用 VMware 在 Linux 5.4 上安装.升级及维护 Oracle 10gR2 RAC ---- 实验名称 使用 VMware Server 2.0 在 Linux Enterprise 5 ...

  6. 如何在Linux/MacOS系统上安装Microsoft SQL Server

    转载来源:https://hub.docker.com/_/mssql-server-linux 如何在Linux/MacOS系统上安装Microsoft SQL Server 快速安装 # 首先在L ...

  7. kali2020 vnc安装,在Kali Linux 2020.x上安装和卸载VLC媒体播放器的方法

    本文介绍在Kali Linux 2020.x系统上安装和卸载VLC media Player(VLC媒体播放器)的方法.大多数Linux发行版在其上游存储库中包含VLC软件包,要在Kali Linux ...

  8. Linux发行版上安装Netbeans IDE的各种方法

    在本文中,您将学习在Ubuntu和其他Linux发行版上安装Netbeans IDE的各种方法. NetBeans是一个开源的集成开发环境,具有良好的跨平台支持.该工具已被Java和C/C ++开发社 ...

  9. 在CentOS/RHEL/Scientific Linux 6 7 上安装Telnet

    在CentOS/RHEL/Scientific Linux 6 & 7 上安装Telnet 声明: 在安装和使用Telnet之前,需要记住以下几点. 在公网(WAN)中使用Telnet是非常不 ...

最新文章

  1. 盘点2021:数据中心行业迎来转折点
  2. opengl编程从入门到精通-hello,window
  3. java设计单词英译汉小助手_拣单词|第八期第3天:第521528个单词宝藏
  4. 【渝粤教育】广东开放大学 动画原画设计 形成性考核 (22)
  5. [读书笔记]TCP/IP详解V1读书笔记-4 5
  6. 解决css冲突的问题
  7. 一个黑客都要学习什么语言呢?
  8. 毕业那天我们一起失恋
  9. java 如何执行dig 命令_linux dig 命令使用方法
  10. 一篇文章,读懂9种优先的管理之道
  11. C与C++中的符号隐藏
  12. nu.xom:Serializer
  13. python常用的正则符号汇总
  14. Dubbo comsumer 远程调用流程分析
  15. 深入理解git push
  16. TimeSformer:抛弃CNN的Transformer视频理解框架
  17. greenDao框架浅入深出
  18. 分组ListView使用技巧
  19. 简体繁体转换功能php,PHP输出控制功能在简繁体转换中的应用
  20. vim:vim从入门到放弃

热门文章

  1. mysql数据库怎样添加字段_MySQL添加字段和修改字段的方法
  2. 定义一个dto对象_正确理解DTO、值对象和POCO
  3. 路由器距离向量算法计算举例_距离向量路由选择是什么 距离向量路由选择原理介绍【图文】...
  4. Intel汇编程序设计-整数算术指令(下)
  5. 【数字信号处理】基本序列 ( 单位阶跃序列 | 单位阶跃序列与单位脉冲序列关系 | 矩形序列 | 矩形序列与单位阶跃序列关系 | 矩形序列作用 )
  6. 【Android 安装包优化】使用 lib7zr.so 动态库处理压缩文件 ( 测试 lib7zr.so 动态库调用 )
  7. 【Android 安装包优化】WebP 应用 ( 4.0 以下兼容 WebP | Android Studio 中使用 libwebp.so 库向下兼容版本 | libwebp 库测试可用性 )
  8. 【RecyclerView】 十三、RecyclerView 数据更新 ( 移动数据 | 数据改变 )
  9. 【Android 高性能音频】Oboe 开发流程 ( Oboe 完整代码示例 )
  10. 【集合论】序关系 ( 偏序集元素之间的关系 | 可比 | 严格小于 | 覆盖 | 哈斯图 )