Install Oracle12cR1 on Oracle Linux 6.5 in VirtualBox

My Oralce Linux 6.5 is running on VirtualBox. Basic settings is 4G memory, 50G hard-disk, auto partition when install OL6.5.

 

** Following series of operations need root privilege.

1. Edit /etc/host

Add your hostname. For example, you host name ol65.localdomain then

127.0.0.1   localhost localhost.localdomain ol65 ol65.localdomain
::1              localhost localhost.localdomain ol65 ol65.localdomain

When you install oracle linux6.5 there is one step ask domain name. You should add it into /etc/hosts before you start installing. If there is no this domain name there will be an error, installation can‘t continue.

PRVF-00002: Could not retrieve local nodename

Cause: Unable to determine local host name
using Java network functions.

Action: Ensure that hostname is defined correctly using the ‘hostname‘ command.

2. Add or amend the following lines to the /etc/sysctl.conf

fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 1073741824
kernel.shmmax = 4398046511104
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500

3. Run the following command to change the current kernel parameters

/sbin/sysctl -p

4. Add the following lines to the /etc/security/limits.conf

oracle   soft   nofile   1024
oracle   hard   nofile   65536
oracle   soft   nproc    2047
oracle   hard   nproc    16384
oracle   soft   stack    10240
oracle   hard   stack    32768

5. Check and install following packages

yum install binutils -y
yum install compat-libcap1 -y
yum install compat-libstdc++-33 -y
yum install compat-libstdc++-33.i686 -y
yum install gcc -y
yum install gcc-c++ -y
yum install glibc -y
yum install glibc.i686 -y
yum install glibc-devel -y
yum install glibc-devel.i686 -y
yum install ksh -y
yum install libgcc -y
yum install libgcc.i686 -y
yum install libstdc++ -y
yum install libstdc++.i686 -y
yum install libstdc++-devel -y
yum install libstdc++-devel.i686 -y
yum install libaio -y
yum install libaio.i686 -y
yum install libaio-devel -y
yum install libaio-devel.i686 -y
yum install libXext -y
yum install libXext.i686 -y
yum install libXtst -y
yum install libXtst.i686 -y
yum install libX11 -y
yum install libX11.i686 -y
yum install libXau -y
yum install libXau.i686 -y
yum install libxcb -y
yum install libxcb.i686 -y
yum install libXi -y
yum install libXi.i686 -y
yum install make -y
yum install sysstat -y
yum install unixODBC -y
yum install unixODBC-devel -y

6. Create new group and user

**I install Oracle for learning so I simplified this, only created one new user who will be in charge of all oracle related operations. This‘s not suitable to product environment.

groupadd -g 54321 oracle
useradd -u 54321 -g oracle oracle
passwd oracle

7. Amend the /etc/security/limits.d/90-nproc.conf

# Change this
*          soft    nproc    1024

# To this
* - nproc 16384

8. Change the setting of SELinux to permissive by editing the /etc/selinux/config

SELINUX=permissive

9. Set firewall to enable Oracle DB ports

Open 1521 and 5500, up to you.

10. Create a new file and change its owner

touch /etc/oratab
chown -R oracle:oracle /etc/oratab

11. Create install directory

mkdir -p /u01
chown -R oracle:oracle /u01

** Login as oracle

12. Unzip installer and run installer

Unzip linuxamd64_12102_database_1of2.zip and linuxamd64_12102_database_2of2.zip

Go into database folder

Run ./runInstaller

13. Install

** Stop here! Open console, login as root, run these two scripts

1) /u01/app/oraInventory/orainstRoot.sh

[[email protected] oraInventory]# ./orainstRoot.sh
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.
Changing groupname of /u01/app/oraInventory to oracle.
The execution of the script is complete.

2) /u01/app/oracle/product/12.1.0/dbhome_1/root.sh

[[email protected] dbhome_1]# ./root.sh
Performing root user operation.

The following environment variables are set as:
   ORACLE_OWNER= oracle
   ORACLE_HOME=  /u01/app/oracle/product/12.1.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.

Completed!

14. Access EM Database Express URL to test

15. Login as oracle and edit ~/.bash_profile

Add below part inside

# Oracle12c Settings
export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_HOSTNAME=oracle12c.localdomain
export ORACLE_UNQNAME=oracle12c
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/12.1.0/dbhome_1
export ORACLE_SID=orcl
export 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

16. Set auto startup

Login as root

1) Edit /etc/oratab, change N to Y as below

orcl:/u01/app/oracle/product/12.1.0/dbhome_1:Y

2) Create file /etc/init.d/dbora and add following content

#!/bin/sh
# chkconfig: 345 99 10
# description: Service to start and stop Oracle Database and Listener
#
# processname: oracle
# config: /etc/oratab
# pidfile: /var/run/oracle.pid

# Source function library.
. /etc/init.d/functions

RETVAL=0
ORA_OWNER="oracle"
ORA_HOME="/u01/app/oracle/product/12.1.0/dbhome_1"

# See how we were called.

prog="oracle"

start() {
echo -n $"Starting $prog: "
su - $ORA_OWNER -c "$ORA_HOME/bin/dbstart $ORA_HOME"
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/dbora

return $RETVAL
}

stop() {
echo -n $"Stopping $prog: "
su - $ORA_OWNER -c "$ORA_HOME/bin/dbshut $ORA_HOME"
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -r /var/lock/subsys/dbora

return $RETVAL
}

restart() {
stop
start
}

case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
*)
echo $"Usage: $0 {start|stop|restart}"
exit 1
esac

exit $?

ORA-OWNER and ORA_HOME should math your own condition.

Next you need to run the following commands to change permissions and make the service active.

chgrp oracle /etc/init.d/dbora
chmod 755 /etc/init.d/dbora
chkconfig --level 345 dbora on

3) Reboot server

reboot

Congratulation!

时间: 2024-12-19 20:01:02

Install Oracle12cR1 on Oracle Linux 6.5 in VirtualBox的相关文章

[Oracle] - Install Oracle12cR1 on Oracle Linux 6.5 in VirtualBox

My Oralce Linux 6.5 is running on VirtualBox. Basic settings is 4G memory, 50G hard-disk, auto partition when install OL6.5.   ** Following series of operations need root privilege. 1. Edit /etc/hosts Add your hostname. For example, you host name ol6

Install Oracle12cR1 on Oracle Linux in VirtualBox

Summarized today, using simple several words to describe how to install Oracle Database on Oracle Linux as following. *** Login as root user 1. Update host name in /etc/hosts 2. Update per-requisite packages for Oracle Linux $ yum -y install oracle-r

Install Oracle Linux 7 on Oracle VirtualBox

I'll start coding with JEE soon. Product environment adopts Oracle + WebLogic in Linux, technology adopts EJB3 and JPA. So I'm going to set a development environment in my own computer with them. For iMac installing JDK, Eclipse or Maven will not be

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 comf

Oracel 12cR1 install for Oracle Linux 6.6

Oracel 12cR1install for Oracle Linux 6.5 一.安装前准备 1. 软件下载: Database software: db12102_V46095-01_1of2.zip db12102_V46095-01_2of2.zip 下载地址: http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html 或是:http://edelivery.oracle.com

在Oracle Linux上安装dtrace

http://www.ohsdba.cn/index.php?g=Home&m=Article&a=show&id=171 时间: 2016-10-09 00:40:04  | 作者: ohsdba  | English 如非注明,本站文章皆为原创.欢迎转载,转载时请注明出处和作者信息. DTrace(dynamic tracing)是Sun Solaris系统上主要的性能诊断工具,可以对kernel和用户应用程序进行动态跟踪,并且对系统运行不构成任何危险的技术,后被Oracle公

MySQL 5.6.20-4 and Oracle Linux DTrace

https://blogs.oracle.com/wim/entry/mysql_5_6_20_4?utm_source=tuicool&utm_medium=referral By WimCoekaerts-Oracle on Jul 31, 2014 The MySQL team just released MySQL 5.6.20. One of the cool new things for Oracle Linux users is the addition of MySQL DTra

ORACLE LINUX 6.3 + ORACLE 11.2.0.3 RAC + VBOX安装文档

ORACLE LINUX 6.3 + ORACLE 11.2.0.3 RAC + VBOX安装文档 2015-10-21 12:51 525人阅读 评论(0) 收藏 举报  分类: Oracle RAC 版权声明:本文为博主原创文章,未经博主允许不得转载. VBOX + Oracle Linux 6U3 + ORACLE 11.2.0.3.0 RAC 安装 环境: 虚拟机          VIRTUAL BOX OS                ORACLE LINUX 6.3_X86_64

Oracle linux的安装

第一步 操作系统安装 第二步 防火墙设置 第三步 SELinux设置 一.操作系统安装: next the differences between "Basic Storage Devicec" and "Specialized storage Devices": Basic Storage Devicec: The installer automatically detects any locally attached storagedevices, and di