前言----------公司数据库用的是oracle,由于oracle数据库没有做监控,所有搭个环境用于测试zabbix通过orabbix插件监控oracle数据库,下面先搭建oracle数据库。

简单介绍

ORACLE数据库系统是美国ORACLE公司(甲骨文)提供的以分布式数据库为核心的一组软件产品,是目前最流行的客户/服务器(CLIENT/SERVER)或B/S体系结构的数据库之一。比如SilverStream就是基于数据库的一种中间件。ORACLE数据库是目前世界上使用最为广泛的数据库管理系统,作为一个通用的数据库系统,它具有完整的数据管理功能;作为一个关系数据库,它是一个完备关系的产品;作为分布式数据库它实现了分布式处理功能。但它的所有知识,只要在一种机型上学习了ORACLE知识,便能在各种类型的机器上使用它。
Oracle数据库最新版本为Oracle Database 12c。Oracle数据库12c 引入了一个新的多承租方架构,使用该架构可轻松部署和管理数据库云。此外,一些创新特性可最大限度地提高资源使用率和灵活性,如Oracle Multitenant可快速整合多个数据库,而Automatic Data Optimization和Heat Map能以更高的密度压缩数据和对数据分层。这些独一无二的技术进步再加上在可用性、安全性和大数据支持方面的主要增强,使得Oracle数据库12c 成为私有云和公有云部署的理想平台。
废话不多说直接开撸~~~~~
系统环境:

[root@oracle ~]$ cat /etc/redhat-release
CentOS release 6.9 (Final)
[oracle@oracle ~]$ uname -a
Linux oracle 2.6.32-696.el6.x86_64 #1 SMP Tue Mar 21 19:29:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux #关闭iptables
/etc/init.d/iptables stop 1 编辑/etc/hosts加入主机名和ip
vim /etc/hosts
192.168.24.133 oracle 2 安装常用软件及oracle依赖
yum -y install autoconf automake binutils-devel bison cpp dos2unix ftp gcc gcc-c++ lrzsz python-devel #安装常用软件
yum -y --setopt=protected_multilib=false install compat-db compat-gcc-34 compat-gcc-34-c++ compat-libstdc++-33 glibc-* glibc-*.i686 libXpm-*.i686 libXp.so.6 libXt.so.6 libXtst.so.6 libgcc_s.so.1 ksh libXp libaio-devel numactl numactl-devel unixODBC unixODBC-devel #安装oracle依赖,一定要加--setopt=protected_multilib=false这个参数,老系统可能存在库冲突,加上这个参数忽略。 3 创建oracle相关用户和目录
groupadd oinstall
groupadd dba
useradd -g oinstall -G dba oracle
passwd oracle
usermod -g oinstall -G dba oracle
mkdir -p /usr/local/oracle
chown -R oracle:oinstall /usr/local/oracle
chmod -R 755 /usr/local/oracle 4 修改内核参数
cat >> /etc/sysctl.conf << EOF
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65500
net.core.rmem_default = 4194304
net.core.wmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_max = 262144
EOF
修改完成之后命令行执行sysctl –p 5 为oracle用户设置shell限制
5.1 编辑/etc/security/limits.conf添加黄色内容,以下命令可直接在命令行执行
cat >> /etc/security/limits.conf << EOF
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
EOF 5.2 编辑vim /etc/pam.d/login添加黄色内容,以下命令可直接在命令行执行
cat >> /etc/pam.d/login << EOF
session required pam_limits.so
EOF 5.3 编辑/etc/profile添加如下内容
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
# 添加完成以后执行source /etc/profile 或者 . /etc/profile 5.4 编辑/etc/csh.login添加如下内容
if ( $USER == "oracle") then
limit maxproc 16384
limit descriptors 65536
endif 5.5 编辑/home/oracle/.bash_profile,在最后添加如下内容
export ORACLE_BASE=/usr/local/oracle
export ORACLE_HOME=/usr/local/oracle/product/12201 #安装包版本号
export ORACLE_SID=bill
export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin # 添加完成以后执行或soucre /home/oracle/.bash_profile者 . /home/oracle/.bash_profile
#这里面的oracle_sid这个值,是安装数据库实例时候用到的SID

下载Oracle数据库:

地址:http://www.oracle.com/technetwork/database/enterprise-edition/downloads/oracle12c-linux-12201-3608234.html

1、勾选Accept License Agreement

2、点击File下载

3、弹出用户登录界面需要登录才能下载,没有账号就注册一个

4.下载完成后的安装包如下

5、通过FTP上传到系统里我的路径是/application/tools下

6、系统上查看已经存在

[root@oracle ~]# cd /application/tools/
[root@oracle tools]# ll
total 3381964
drwxr-xr-x. 9 root root 4096 Mar 23 13:11 apache-tomcat-8.0.50
-rw-r--r--. 1 root root 9417189 Feb 7 12:52 apache-tomcat-8.0.50.tar.gz
drwxr-xr-x. 7 oracle oracle 4096 Jan 26 2017 database
-rw-r--r--. 1 root root 3453696911 Apr 11 00:15 linuxx64_12201_database.zip
[root@oracle tools]# pwd
/application/tools

7、安装依赖包

[root@oracle tools]# yum install gcc gcc-c++ ksh libaio-devel libstdc++-devel compat-libstdc++-33 compat-libcap1 -y

8、添加oracle用户和oracle 组

[root@oracle tools]# useradd oracle
[root@oracle tools]# groupadd oracle
[root@oracle tools]# passwd oracle

9、由于我们是图形界面安装oracle数据库,我装的是minimal版系统,需再安装图形界面系统,已安装的网友可以忽略这步。

安装方法:http://www.cnblogs.com/Dev0ps/p/8795809.html

10、切换到oracle用户下

11、进入oracle安装包路径下,解压出一个名为database的目录

[root@oracle tools]# su oracle
[oracle@oracle tools]$ unzip linuxx64_12201_database.zip
[oracle@oracle tools]$ ls
apache-tomcat-8.0.50 apache-tomcat-8.0.50.tar.gz database linuxx64_12201_database.zip

12、运行runInstaller脚本

[oracle@oracle tools]$ cd database/
[oracle@oracle database]$ ./runInstaller

13、出现oracle安装界面

14、配置输入邮箱地址取消oracle支持,点击下一步

15、选择创建和配置新数据库,点击下一步

16、选择服务器类型,点击下一步

17、选择单实例安装,点击下一步

18、选择高级安装,自定义安装

19、选择企业版安装,点击下一步

20、指定安装目录,默认安装就好注意空间要足够.注意要有足够的空间安装,否则报错。

21、指点产品项目清单,默认就好

22、创建数据类型,选择数据仓库。

23、设置数据库名称,默认即可。

24、设置内存大小,根据实际情况调整。

25、字符集选择utf-8

26、安装实例,生产环境建议不用安装了。

27、选择数据存储方式

28、云管理,这里跳过

29、开启数据恢复

30、设置密码,为方便我设置相同密码“oracle”,生产环境建议不要设置相同。

31、选择数据库操作类型(默认即可)

32、开始安装

33、检查错误并用“root”用户执行,该脚本文件。

切换到root下执行以下脚本,提示successfully说明成功。

[root@localhost ~]# bash /tmp/CVU_12.2.0.1.0_oracle/runfixup.sh

34、修复后点击下一步继续

35、开始安装

36、再以“root”执行以下2个脚本。

root@localhost ~]# sh /home/oracle/app/oraInventory/orainstRoot.sh
Changing permissions of /home/oracle/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world. Changing groupname of /home/oracle/app/oraInventory to oracle.
The execution of the script is complete.
[root@localhost ~]# sh /home/oracle/app/oracle/product/12.2.0/dbhome_1/root.sh
Performing root user operation. The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /home/oracle/app/oracle/product/12.2.0/dbhome_1 Enter the full pathname of the local bin directory: [/usr/local/bin]: 回车
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ... Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Do you want to setup Oracle Trace File Analyzer (TFA) now ? yes|[no] :
yes
Installing Oracle Trace File Analyzer (TFA).
Log File: /home/oracle/app/oracle/product/12.2.0/dbhome_1/install/root_localhost.localdomain_2018-04-17_17-02-45-547313350.log

37、结束安装

38、浏览器登录,地址根据提示输入。账号: system 我的密码:Oracle123

总结:安装期间出现一次报错

[INS-20802] Oracle Database Configuration Assistant 失败,我重新安装第二次就可以了。

Oracle Database 12c Release 2安装过程实录的更多相关文章

  1. Oracle Database 12c Release 2安装详解

    第1章 Oracle Database 12c Release 2安装详解 1.1 下载方法 oracle官网https://www.oracle.com 1)打开官方网站,找到下载连接 2)选择更多 ...

  2. Windows下安装Oracle Database 12c Release 1(12.1.0.2.0) - Enterprise Edition

    Windows下安装Oracle Database 12c Release 1(12.1.0.2.0) 最近因需要在Oracle 数据库上建立ODI的资料档案库,需要安装Oracle Database ...

  3. Oracle Database 12c Release 1下载安装(自身经历)

    1.访问Oracle官网:https://www.oracle.com/index.html,下载Oracle Database 12c Release 1 (注意:File1和File2都要下载!! ...

  4. 转: Windows下安装Oracle Database 12c Release 1(12.1.0.2.0) - Enterprise Edition

    http://www.cnblogs.com/xqzt/p/4395053.html Windows下安装Oracle Database 12c Release 1(12.1.0.2.0) - Ent ...

  5. Upgrade Oracle Database 12c Release 2(12.2) RAC on RHEL7.3 with RU

    Upgrade Oracle Database 12c Release 2(12.2) RAC on RHEL7.3 -- [ RU: 26610291 (GRID INFRASTRUCTURE RE ...

  6. Oracle列自增实现(2)-Identity Columns in Oracle Database 12c Release 1 (12.1)

    Oracle列自增-Identity Columns in Oracle Database 12c Release 1 (12.1) 在ORACLE 12C以前的版本中,如果要实现列自增长,需要通过序 ...

  7. 12 Things Developers Will Love About Oracle Database 12c Release 2

    by Chris Saxon-Oracle It's Here: Oracle Database 12c Release 2 (12.2) Is available on Oracle Cloud. ...

  8. Oracle Database 12c Release 1 Installation On Oracle Linux 6.4 x86_64

    Create groups and users [root@vmdb12c ~]# groupadd oinstall [root@vmdb12c ~]# groupadd dba [root@vmd ...

  9. Installing Oracle Database 12c Release 2(12.2) RAC on RHEL7.3 in Silent Mode

    概要 在RHEL7静默方式安装oracle database 12.2 RAC. 一.环境配置 1. 配置hosts文件 cp /etc/hosts /etc/hosts_$(date +%Y%d%m ...

随机推荐

  1. HDU 6304 Chiaki Sequence Revisited

    题目链接 : http://acm.hdu.edu.cn/showproblem.php?pid=6304 多校contest1   Problem Description Chiaki is int ...

  2. 微信小程序记账本进度六

    //app.jsApp({ onLaunch: function () { //调用API从本地缓存中获取数据 var logs = wx.getStorageSync('logs') || [] l ...

  3. LAB4

    鼠标放上去可以看文件说明,exception则在exception中处理 文件头里面穿信息,为404 out.flush();把以前的全部冲掉了,所以需要放在后面

  4. laravel简书(1)

    Laravel的社区生态 中文社区(http://laravel-china.org) 5.4中文文档(http://d.laravel-china.org/docs/5.4) Laravel源码地址 ...

  5. Python之路(第三十篇) 网络编程:socket、tcp/ip协议

    一.客户端/服务器架构 1.硬件C/S架构(打印机) 打印机作为一个服务端,电脑连接打印机进行打印 2.软件C/S架构 互联网中处处是C/S架构 如谷歌网站是服务端,你的浏览器是客户端(B/S架构也是 ...

  6. IFrame跨域访问&&IFrame跨域访问自定义高度

    1.IFrame跨域访问: http://blog.csdn.net/fdipzone/article/details/17619673 2.IFrame跨域访问自定义高度: 由于JS禁止跨域访问,如 ...

  7. MySQL5.7 Group Replication (MGR)--Mysql的组复制之多主模式

    MGR——Mysql的组复制之多主模式 以下测试在VMware环境: 操作系统:Centos 6.9 X86_64 数据库:Mysql 5.7 (mysql  Ver 14.14 Distrib 5. ...

  8. Nodejs之路:异步I/O的过程

    对于Node中的异步I/O调用,从发出调用到回调执行,看起来像普通的js异步,但是流程却和普通js那些消息队列完全不同,整个过程经历了哪些? 下面以Windows平台下为例: 一,异步调用第一阶段: ...

  9. 2019.02.12 bzoj3944: Sum(杜教筛)

    传送门 题意: 思路:直接上杜教筛. 知道怎么推导就很简单了,注意预处理的范围. 然后我因为预处理范围不对被zxyoi教育了(ldx你这个傻×两倍常数活该被卡TLE) 喜闻乐见 代码: #includ ...

  10. 第40章:MongoDB-集群--Replica Sets(副本集)---副本集的管理

    ①以单机模式启动成员 由于很多维护的工作需要写入操作,所以不合适在副本集中操作,可以以单机模式启动成员,也就是不要使用副本的选项,就跟以前启动单独的服务器一样.一般使用一个跟副本集配置中不一样的端口号 ...