Thursday 2 April 2015

Install and Troubleshoot Oracle 12c Database and Cloud Control Without ASM.

                                                   
Install and Troubleshoot Oracle 12c Database and Cloud Control Without ASM.

This Document is divided in to three parts. 


1. Oracle Database 12c Release 1 (12.1) Installation on Oracle Linux 6 Using Virtual Box

2.Oracle Enterprise Manager Cloud Control 12c Release 5 Installation on Oracle Linux 6.5
3. Troubleshoot Oracle 12c Database and Cloud Control

1. Oracle Database 12c Release 1 (12.1) Installation on Oracle Linux 6 Using Virtual Box

Preparing Virtual Machine

Create the Main installation Disk with 80 GB
Allocate 6GB memory to Virtual Machine
Adapter 1 attached to Bridged Adapter.

Mount Point Space Distribution
/         - 15360 MB
swap   - 6300 MB
/home - 2048
/u01   - 57232 MB
/boot  - 500 MB 
Space required for Linux Installation - 4 GB
Space required for Cloud Control  Installation – 14 GB
Space Required for Database Installation – 6.4 GB
Space required for repository Database - 5 GB

Download Oracle Database 12c Release 1 (12.1.0.2.0) Media Pack v2 for Linux x86-64 from Oracle e-delivery site.


Download Oracle Enterprise Manager Cloud Control 12c Release 5 (12.1.0.5) v6, Linux x86-64 from Oracle e-delivery site.


Unzip the Database files to a single directory called "database"

Unzip the Cloud Control media to a single directory.


Install Linux

Allocate swap space equal to memory Size
HOSTNAME used is ol12c.localdomain

Base System > Base
Base System > Client management tools
Base System > Compatibility libraries
Base System > Hardware monitoring utilities
Base System > Large Systems Performance
Base System > Network file system client
Base System > Performance Tools
Base System > Perl Support
Servers > Server Platform
Servers > System administration tools
Desktops > Desktop
Desktops > Desktop Platform
Desktops > Fonts
Desktops > General Purpose Desktop
Desktops > Graphical Administration Tools
Desktops > Input Methods
Desktops > X Window System
Applications > Internet Browser
Development > Additional Development
Development > Development Tools

Network Configuration

System>Preferences>Network Connections

Edit Network Connections
eth0
Enable Connect Automatically
Enable Available to all users

IPV4 Settings
Method - Manual
Address - 192.168.1.104
Netmask - 255.255.255.0
Gateway - 192.168.0.1

Add another wired Connection

Enable Connect Automatically
Enable Available to all users
IPV4 Settings
Method - Automatic(DHCP)
Click Apply

Select Newly created Wired Connection as active.

Edit /etc/hosts

127.0.0.1   localhost.localdomain    localhost
192.168.1.104   ol12c.localdomain        ol12c

Install Guest Additions as root user

Click on the "Devices > Install Guest Additions" menu option at the top of the VM screen. Run it using the auto-run option.

Reboot the System

Install Oracle Clusterware Installation Prerequisites as root user

# yum install oracle-rdbms-server-12cR1-preinstall -y

Cleanup YUM repositories:

yum clean all

Create the new groups and users.

groupadd -g 54321 oinstall
groupadd -g 54322 dba
groupadd -g 54323 oper
groupadd -g 54324 backupdba
groupadd -g 54325 dgdba
groupadd -g 54326 kmdba

Create and add user oracle to oinstall,dba,vboxsf,oper, groups

# useradd -u 54321 -g oinstall -G dba,oper oracle
# usermod -g oinstall -G dba,oinstall,oper,backupdba,kmdba,dgdba oracle

If you are installing on Oracle Virtual Box you should also run the below line

usermod -G vboxsf oracle

You can also use the GUI for user management : System>Administration>Users and Group

Change the setting of SELinux to permissive by editing the "/etc/selinux/config" file, making sure the SELINUX flag is set as follows.

SELINUX=permissive

Once the change is complete, restart the server or run the following command.



# setenforce Permissive

If you have the Linux firewall enabled, you will need to disable it.


Create the directories in which the Oracle software will be installed.

mkdir -p /u01/app/oracle/product/12.1.0.2/db_1
mkdir /u01/app/oracle/oradata
chown -R oracle:oinstall /u01
chmod -R 775 /u01/

Logout root and login as oracle user.

update oracle user's .bash_profile

export TMP=/tmp
export TMPDIR=$TMP

export ORACLE_HOSTNAME=ol12c.localdomain
export ORACLE_UNQNAME=em12rep
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/12.1.0.2/db_1
export ORACLE_TERM=xterm

export ORACLE_SID=em12rep
export BASE_PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$BASE_PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib

Shutdown VM and add shared directory containing Oracle S/W

Restart VM and login as oracle user. Change directory to "/media/sf_oracle_sw" - this is where VirtualBox maps Host OS shared folder. Note that VirtualBox added prefix "sf_" to the name of the folder. List 'ls' content of the folder:

$ cd /media/sf_oracle_sw
$ ls
database
$
Start the Oracle Universal Installer (OUI) by issuing the following command in the database directory.

./runInstaller

Create database em12rep during the database installation.

In the Configuration Page uncheck Enable Automatic Memory Management

2. Oracle Enterprise Manager Cloud Control 12c Release 5 Installation on Oracle Linux 6.5

Install additional Packages using yum Installer
yum install make -y
yum install binutils -y
yum install gcc -y
yum install libaio -y
yum install glibc-common -y
yum install libstdc++ -y
yum install libXtst -y
yum install sysstat -y
yum install glibc-devel -y
yum install glibc -y
yum install libaio -y
yum install glibc-devel.i686 -y

logout root user and login as oracle user.

update oracle user .bash_profile

export OMS_HOME=/u01/app/oracle/oms12cr5/oms
export AGENT_HOME=/u01/app/oracle/agent12cr5/core/12.1.0.5.0

Make the following directories to hold the management server and agent.

$ mkdir -p /u01/app/oracle/oms12cr5
$ mkdir -p /u01/app/oracle/agent12cr5


Login to em12rep database as sys user. Make the following initialization parameter changes and restart the instance.

sqlplus / AS SYSDBA

ALTER SYSTEM SET processes=300 SCOPE=SPFILE;
ALTER SYSTEM SET session_cached_cursors=200 SCOPE=SPFILE;
ALTER SYSTEM SET sga_target=2G SCOPE=SPFILE;
ALTER SYSTEM SET shared_pool_size=600M SCOPE=SPFILE;
ALTER SYSTEM SET pga_aggregate_target=1G SCOPE=SPFILE;
ALTER SYSTEM SET job_queue_processes=20 SCOPE=SPFILE;
ALTER SYSTEM SET db_securefile=PERMITTED SCOPE=BOTH;

-- May be required if using older versions of DB.

--ALTER SYSTEM SET log_buffer=10485760 SCOPE=SPFILE;
--ALTER SYSTEM SET open_cursors=300 SCOPE=SPFILE;

-- Restart the instance.

SHUTDOWN IMMEDIATE
STARTUP


Edit the "/etc/security/limits.conf" file as root user, increasing the following entry to 4096 if it is less than that. You will need to reboot after this.

oracle   soft   nofile    4096
oracle   hard  nofile    4096


check if the changes are applied using below command

ulimit -n

If it is not set update orale users .bash_profile file

ulimit -n 4096


Unzip the Cloud Control media, the start the installation by running the "runInstller" script.

Before Installation Make sure the repository database and Listener is up.

$ ./runInstaller







Installation Type
        Create New Enterprise Manager System
                Simple


Installation Details
        Middleware Home Location : /u01/app/oracle/oms12cr5
        Agent Base Directory : /u01/app/oracle/agent12cr5



Configuration Details
        Administration Password :
        Database Host Name : ol12c.localdomain
        Port : 1521
        Service/SID : em12rep
        SYS Password :


Ignore the below error and click on yes
       




















Login to Database

. oraenv ---> em12rep
sqlplus "/ as sysdba"

To find details of Cloud control, check the setupinfo.txt  file located in the $OMS_HOME/install directory.
/u01/app/oracle/oms12cr4/oms/install/setupinfo.txt

login to Cloud control using the link in the setupinfo.txt.   https://ol12c.localdomain:7802/em


Login using the username sysman and password

3. Troubleshoot Oracle 12c Database and Cloud Control


Starting 12c Cloud Control


1. Start the repository database instance and Listener.
2. $OMS_HOME/bin/emctl start oms
3. $AGENT_HOME/bin/emctl start agent

Stopping 12c Cloud Control

1. $AGENT_HOME/bin/emctl stop agent
2. $OMS_HOME/bin/emctl stop oms -all
3. Stop the repository database instance and listener.

Use netca for configuring the network

Disabling the Automatic Start and Stop Features of the Enterprise Manager Grid Control Agent After Host Reboot (Doc ID 1478617.1)

The scripts controlling the automatic startup or shutdown are:

$OMS_HOME/install/unix/scripts/omsstup
$AGENT_HOME/install/unix/scripts/agentstup

There is also a general startup script, gcstartup, that will be run by the Linux boot up process and is located at /etc/rc.d/init.d/gcstartup.

1) edit the gcstartup script as root user:

vi /etc/init.d/gcstartup

comment out the following lines with a hash:

from:

/bin/su - oracle -c "{agent home}/install/unix/scripts/agentstup $1"

to:

#/bin/su - oracle -c "{agent home}/install/unix/scripts/agentstup $1"


or

 2) edit the agentsetup script being called above and comment out these lines:

$ORACLE_HOME/bin/emctl start agent

$SU -u $installUser $ORACLE_HOME/bin/emctl start agent



Resolving  ORA-00845 Error

check the tmpfs size. Increase the size of tmpfs equal to the MEMORY_TARGET size.

mount -t tmpfs shmfs -o size=3072m /dev/shm

The shared memory file system should be big enough to accommodate the MEMORY_TARGET and MEMORY_MAX_TARGET values, or Oracle will throw the ORA-00845 error

To make the change persistent, edit your /etc/fstab file to include the option you specified above:

[root@oracle-em ~]# cat /etc/fstab
[..]
tmpfs                   /dev/shm                tmpfs   size=3072m        0 0
[..]


Changing sysman Password

1. Shutdown OMS
$OMS_HOME/bin/emctl stop oms

2. Change sysman Password.
$OMS_HOME/bin/emctl config oms -change_repos_pwd -use_sys_pwd -sys_pwd <SYSPASSWORD> -new_pwd <NEW SYSMAN PASSWORD>

3. Stop all OMS services.
$OMS_HOME/bin/emctl stop oms -all

4. Restart OMS
$OMS_HOME/bin/emctl start oms





 Related Metalink Docs 

How To De-Install the Enterprise Manager 12c Cloud Control (Doc ID 1363418.1)

How to De-install the Enterprise Manager Cloud Control 12c Agent (Doc ID 1368088.1)

How To Install the Database Plug-ins on the Enterprise Manager Cloud Control 12.1.0.1 Agent (Doc ID 1386599.1)

How to Manually Remove an Agent From 12C Cloud Control (Doc ID 1380846.1)

How to run the "Targets Status Diagnostics Report" to Troubleshoot Target Status Availability Issues (up, down, metric collection error,pending,unreachable) for all Targets (Doc ID 1546575.1)

Troubleshooting the Metric Collection Error for a Database Instance Target in Enterprise Manager 12c Cloud Control (Doc ID 1533617.1)

Troubleshooting the Metric Collection Error for a Database Instance Target in Enterprise Manager 12c Cloud Control (Doc ID 1533617.1)

How to Delete a Database and Listener Target in Enterprise Manager 12c (Doc ID 1905181.1)

No comments:

Post a Comment