Install Oracle 11G Release 2 (11.2) on Oracle Linux 7 (OEL7)

Install Oracle 11G Release 2 (11.2) on Oracle Linux 7 (OEL7)

This article presents how to install Oracle 11G on Oracle Enterprise Linux 7 (OEL7).

Read following article how to install Oracle Enterprise Linux 7: Install Oracle Linux 7 (OEL7) (for comfort set 2G memory for your virtual machine before proceeding with Oracle software installation).

Installation software is available on OTN version 11.2.0.1 or metalink 11.2.0.4. In this installation I’m presenting installation for 11.2.0.4 but for previous version 11.2.0.X it shouldn’t be different.

Oracle software which I verified

release 11.2.0.4

p13390677_112040_Linux-x86-64_1of7.zip
p13390677_112040_Linux-x86-64_2of7.zip

OS configuration and preparation

OS configuration is executed as root. To login as root just execute following command in terminal.

su - root

Add groups

--required groups
/usr/sbin/groupadd -g 501 oinstall
/usr/sbin/groupadd -g 502 dba
/usr/sbin/groupadd -g 503 oper
Add user Oracle
/usr/sbin/useradd -u 502 -g oinstall -G dba,oper oracle

Change password for user

passwd oracle
Add kernel parameters to /etc/sysctl.conf
kernel.shmmni = 4096
kernel.shmmax = 4398046511104
kernel.shmall = 1073741824
kernel.sem = 250 32000 100 128

fs.aio-max-nr = 1048576
fs.file-max = 6815744
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

Apply kernel parameters

/sbin/sysctl -p

Add following lines to set shell limits for user oracle in file /etc/security/limits.conf

oracle   soft   nproc    131072
oracle   hard   nproc    131072
oracle   soft   nofile   131072
oracle   hard   nofile   131072
oracle   soft   core     unlimited
oracle   hard   core     unlimited
oracle   soft   memlock  50000000
oracle   hard   memlock  50000000

The “/etc/hosts” file must contain a fully qualified name for the server.

<IP-address>  <fully-qualified-machine-name>  <machine-name>

For example.

127.0.0.1 oel7 oel7.dbaora.com localhost localhost.localdomain

Modify .bash_profile for user oracle in his home directory

# Oracle Settings
export TMP=/tmp

export ORACLE_HOSTNAME=oel7.dbaora.com
export ORACLE_UNQNAME=ORA11G
export ORACLE_BASE=/ora01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
export ORACLE_SID=ORA11G

PATH=/usr/sbin:$PATH:$ORACLE_HOME/bin

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib;
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib;

alias cdob=‘cd $ORACLE_BASE‘
alias cdoh=‘cd $ORACLE_HOME‘
alias tns=‘cd $ORACLE_HOME/network/admin‘
alias envo=‘env | grep ORACLE‘

umask 022

Check which packages are installed and which are missing

rpm -q --qf ‘%{NAME}-%{VERSION}-%{RELEASE}(%{ARCH})\n‘ binutils elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibc glibc-common glibc-devel glibc-headers ksh libaio libaio-devel libgcc libstdc++ libstdc++-devel make sysstat unixODBC unixODBC-devel

In my case it returns following

binutils-2.23.52.0.1-12.el7(x86_64)
elfutils-libelf-0.157-2.el7(x86_64)
package elfutils-libelf-devel is not installed
gcc-4.8.2-3.el7(x86_64)
gcc-c++-4.8.2-3.el7(x86_64)
glibc-2.17-36.el7(x86_64)
glibc-common-2.17-36.el7(x86_64)
glibc-devel-2.17-36.el7(x86_64)
glibc-headers-2.17-36.el7(x86_64)
package ksh is not installed
libaio-0.3.109-9.el7(x86_64)
package libaio-devel is not installed
libgcc-4.8.2-3.el7(x86_64)
libstdc++-4.8.2-3.el7(x86_64)
libstdc++-devel-4.8.2-3.el7(x86_64)
make-3.82-19.el7(x86_64)
sysstat-10.1.5-1.el7(x86_64)
package unixODBC is not installed
package unixODBC-devel is not installed

You need to install missing from dvd. Just mount it and install missing packages using rpm -Uvh command from directory <mount dvd>/Packages.

NOTE – I’m using x86_64 version of packages

rpm -Uvh elfutils-libelf-devel*.x86_64.rpm
rpm -Uvh libaio-devel*.x86_64.rpm
rpm -Uvh unixODBC*.x86_64.rpm
rpm -Uvh ksh*.x86_64.rpm

Create directory structure

mkdir -p /ora01/app
chown oracle:oinstall /ora01/app
chmod 775 /ora01/app

create ORACLE_BASE directory for oracle

mkdir -p /ora01/app/oracle
chown oracle:oinstall /ora01/app/oracle
chmod 775 /ora01/app/oracle

Create ORACLE_HOME directory for oracle

mkdir -p /ora01/app/oracle/product/11.2.0/db_1
chown oracle:oinstall -R /ora01/app/oracle

Disable secure linux by editing the “/etc/selinux/config” file, making sure the SELINUX flag is set as follows. It requires REBOOT to be effective !!!

SELINUX=permissive

In Oracle Enterprise Linux 7 /tmp data is stored on tmpfs which consumes memory and is too small. To revert it back to storage just run following command and REBOOT machine to be effective.

systemctl mask tmp.mount

Install database software

Let’s start with database software installation as oracle user.

su - oracle

--unzip software 11.2.0.4
unzip p13390677_112040_Linux-x86-64_1of7.zip
unzip p13390677_112040_Linux-x86-64_2of7.zip
--I defined 4 aliases in .bash_profile of user oracle to make
--administration heaven :)

[[email protected] ~]$ alias envo cdob cdoh tns
alias envo=‘env | grep ORACLE‘
alias cdob=‘cd $ORACLE_BASE‘
alias cdoh=‘cd $ORACLE_HOME‘
alias tns=‘cd $ORACLE_HOME/network/admin‘

--run alias command envo to display environment settings
envo
ORACLE_UNQNAME=ORA11G
ORACLE_SID=ORA11G
ORACLE_BASE=/ora01/app/oracle
ORACLE_HOSTNAME=oel7.dbaora.com
ORACLE_HOME=/ora01/app/oracle/product/11.2.0/db_1

--run alias command cdob and cdoh to check ORACLE_BASE, ORACLE_HOME
[[email protected] ~]$ cdob
[[email protected] oracle]$ pwd
/ora01/app/oracle

[[email protected] db_1]$ cdoh
[[email protected] db_1]$ pwd
/ora01/app/oracle/product/11.2.0/db_1

--run installation
./runInstall
时间: 2024-08-04 07:51:52

Install Oracle 11G Release 2 (11.2) on Oracle Linux 7 (OEL7)的相关文章

Install Oracle 11G Release 2 (11.2) on Centos Linux 7

Install Oracle 11G Release 2 (11.2) on Centos Linux 7 This article presents how to install Oracle 11G on Centos Linux 7. Read following article how to install Centos Linux 7: Install Centos Linux 7 (for comfort set 2G memory for your virtual machine

[转]Installation of Oracle 11g Release 2 on Solaris 11 Express x86 and SPARC

在 Solaris 11上安装Oracle 11g 转自:http://ivan.kartik.sk/oracle/install_ora11gR2_solaris11.html Installation of Oracle 11g Release 2 on Solaris 11 Express x86 and SPARC This paper (HOWTO) describes step-by-step installation of Oracle 11g release 2 database

centos 7 安装Oracle Database 11g Release 2 (11.2.0.4)

参考文章: http://www.cnblogs.com/lightnear/archive/2012/10/07/2714247.html http://www.cnblogs.com/xqzt/p/5456401.html http://www.cnblogs.com/anzerong2012/p/7528311.html 一.安装环境 CentOS Linux release 7.2.1511 (Core) Oracle Database 11g Release 2 (11.2.0.4)

Oracle Database 11g Release 2(11.2.0.3.0) RAC On Redhat Linux 5.8 Using Vmware Workstation 9.0

一,简介 二,配置虚拟机 1,创建虚拟机 (1)添加三块儿网卡: 主节点 二节点 eth0:    公网  192.168.1.20/24   NAT eth0:    公网  192.168.1.21/24   NAT eth1:私网  192.168.2.20/24     host-only eth1:      私网  192.168.2.21/24   host-only eth2:    DHCP    Bridged eth2:     DHCP    Bridged 主机名: t

Oracle 11g单实例RMAN恢复到Oracle 11g RAC

一.环境说明 操作系统版本: RHEL 6.5 x64 1. 源数据库服务器 Oracle版本: Oracle 11g 11.2.0.4 64位(单机)Oracle_SID: orcl db_name   : orcl 背景:一台生产oracle10g(10.2.0.5)数据库计划迁移到Oracle 11.2.0.4.0 RAC.1) 先oracle10g(10.2.0.5)升级到Oracle 11.2.0.4(过程略)2)再Oracle 11.2.0.4单实例迁移到Oracle 11.2.0.

Oracle 数据库 Database Express Edition 11g Release 2 (11.2) 错误解决集锦

前言:第一次接触数据库,想下载个oracle试玩下(虽然听说一般大企业才用),到 官网下载 了个简易版 XE 版本,安装时要注意记住自己输入的数据库密码(口令)  还有安装路径不能含有空格(Do not select a directory that has spaces in its name), 安装完后什么都没反应,唯一的帮助就是开始菜单->Oracle Database Express Edition ->获取帮助    点击 阅读文档 可以到官网看基本使用说明. 基本的操作问题在 阅

Oracle 数据库 Database Express Edition 11g Release 2 (11.2) 错误解决集锦(使用语法)

ORA-14552: 在查询或 DML 中无法执行 DDL, 提交或回退 PL/SQL“ORA-14551:无法在查询中执行DML操作 解决:在声明函数时加上: PRAGMA AUTONOMOUS_TRANSACTION;  link

oracle 11g ocp 笔记(6)-- oracle安全

1.创建和管理账号 用户.用户帐户.模式术语 用户.用户帐户.模式常替换使用,但这些术语并不完全相同. 用户通过建立到实例的会话连接到用户帐户,并基于用户帐户名登录. 模式(schema)是用户帐户拥有的一组对象. 用户账户的属性:   用户名 身份认证方式 默认表空间 表空间配额 临时表空间 用户配置文件 状态 1)用户名: 字母开头.只能包含字母.数字.美元符$.下划线_,不能是保留字,字母自动转化成大写,不按规则则需要双引号指定,不能超过30个字符.一旦创建不能修改. ·身份验证方法: 2

ORACLE 11G中PLSQL中文显示乱码、Linux下sqlplus查询中文乱码

问题描述: 本地是win7操作系统,cmd里面sqlplus进去连接oracle数据库,中文可以正常显示,但是plsql连接oracle数据库,中文显示乱码,还有xshell远程连接oracle服务器登录进去使用sqlplus登录也显示中文乱码. 1.检查windows7下面cmd里面sqlplus中oracle server端的字符集. 打开cmd,用sqlplus登录,输入下面SQL查询服务端的字符集. SQL> select userenv('language') fromdual; US