Install Oracle Enterprise Manager 12C release 4(12.1.0.4) on OEL 5/6

This article presents installation of new Oracle Enterprise Manager 12C version 12.1.0.4 on Oracle Linux OEL5, OEL6. It can be installed using Oracle 12C Release 1 so it’s up to you weather you use database version 11G Release 2 or 12C Release 1 as your repository.

Read following articles to find out how to install Linux OEL5,6.

Read following articles to find out how to install Oracle Database 11G Release 2

Read following articles to find out how to install Oracle Database 12C Release 1

This installation was done using following software:

  • Oracle Virtual Box – 64 bit
  • Oracle Enterprise Linux 6 – 64 bit
  • Oracle Database 11G Release 2(11.2.0.4) – 64 bit for Linux
  • Oracle Oracle Enterprise Manager 12C release 4(12.1.0.4) – 64 bit for Linux

Binaries Oracle Enterprise Manager 12C (12.1.0.4)

em12104_linux64_disk1.zip - enterprise software
em12104_linux64_disk2.zip - enterprise software
em12104_linux64_disk3.zip - enterprise software

You need at least 5GB of memory for this installation so check your VirtualBox settings before proceeding.

1. First step is to deinstall database control from current database as user oracle. This step is required only for version 11G.

emca -deconfig dbcontrol db -repos drop

you will be asked to enter database SID, port, sys and sysman password

[oracle@oel6 ~]$ emca -deconfig dbcontrol db -repos drop

STARTED EMCA at Jun 8, 2014 2:02:03 AM
EM Configuration Assistant, Version 11.2.0.3.0 Production
Copyright (c) 2003, 2011, Oracle.  All rights reserved.

Enter the following information:
Database SID: ORA11G
Listener port number: 1521
Password for SYS user:  
Password for SYSMAN user:  

----------------------------------------------------------------------
WARNING : While repository is dropped the database 
will be put in quiesce mode.
----------------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: y
Jun 8, 2014 2:02:32 AM oracle.sysman.emcp.EMConfig perform
...
Jun 8, 2014 2:05:09 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully dropped
Enterprise Manager configuration completed successfully
FINISHED EMCA at Jun 8, 2014 2:05:13 AM

2. Install extra software as root. Rest you should have from OS installation. You can always download missing packages during installation.

extra libraries for OEL6

yum install glibc-devel.i686

extra libraries for OEL5

yum install glibc-devel.i686
yum install setarch -y 
yum install rng-utils -y

3. Make sure the shared memory filesystem is big enough for Automatic Memory Manager (3GB for database + 500M for other applications) to work. This part must be executed as root.

Add following line to “/etc/fstab” file

tmpfs /dev/shm tmpfs defaults,size=3584m 0 0

Resize /dev/shm size online

mount -o remount,size=3584M /dev/shm

Edit the “/etc/security/limits.conf” file and change set nofile to at least 4096.

oracle   soft   nofile    4096

You have to REBOOT machine after this change

4. Change initialization parameters for minimum database settings. Do all following commands as user oracle.

sqlplus / AS SYSDBA

alter system set processes=300              SCOPE=SPFILE;
alter system set memory_max_target=3G       SCOPE=SPFILE;
alter system set memory_target=3G           SCOPE=SPFILE;
alter system set shared_pool_size=300M      SCOPE=SPFILE;
alter system set session_cached_cursors=100 SCOPE=SPFILE;
alter system set sga_max_size=0G            SCOPE=SPFILE;
alter system set sga_target=0G              SCOPE=SPFILE;
alter system set pga_aggregate_target=0G    SCOPE=SPFILE;

--restart oracle instance.
STARTUP FORCE

5. Create directories for Enterprise Manager and Agent as user oracle

mkdir /ora01/app/oracle/em
mkdir /ora01/app/oracle/em_agent

6. Start installation as user oracle, remember to run command xhost+ as root.

xhost +
access control disabled, clients can connect from any host
mkdir install
unzip -d install em12104_linux64_disk1.zip
unzip -d install em12104_linux64_disk1.zip
unzip -d install em12104_linux64_disk1.zip
cd install
./runInstaller

7.If you don’t want to get email after installation just uncheck “I wish to receive security updates via My Oracle Support” and click “Next” button

em12cr3_oel6_em1

8. You should get following warning message just ignore it and click “Yes” button

em12cr3_oel6_em2

9. Just check “Skip” option to ignore downloading latest patches and click “Next” button

em12cr3_oel6_em3

10. You should see that prerequisite checks are started. If all is fine click “Next” button. If you see errors you need to correct them by reading installation logs.

em12cr3_oel6_em4

11. I just select simple installation method and click “Next” button

em12cr3_oel6_em5

12. You need to specify directory where you want to install Enterprise Manager software and host name. When it’s done click “Next” button.

em12cr3_oel6_em6

13. On this page you need to specify Administration password.The password can be changed later for each components of EM12C. Additional you need to specify details about your database where repository of EM12C will be installed plus password for user SYS. Uncheck checkbox “Configure Oracle Software Library” – warning is displayed. This option is used only when you are planing to install many OMS. When it’s done click “Next” button.

em12cr3_oel6_em8

em12cr3_oel6_em7

14. You can see such error so ignore it and click “Yes” button. Installer will fix it automatically.

em12cr4_oel6_em9

15. In case you get following screen with warning you can ignore it or make appropriate suggestions. In my case my installation is very small so I can ignore it. Just click “OK” button to proceed.

em12cr4_oel6_em10

16. You should see following screen with summary just before installation. You can read here some interesting informations like: space required by installation, installation directories etc. Just click “Install” button.

em12cr4_oel6_em11

17. It can take a lot of time to install all required components. Just run some funny movie :), relax and wait.

em12cr3_oel6_em12

18. As last step you need to run following script as user root. When the script is finished click “OK” button.

em12cr3_oel6_em13

19. You should see installation report with details URL addresses for your EM12C.

Enterprise Manager Cloud Control URL: 
https://oel6.dbaora.com:7802/em
Admin Server URL:
https://oel6.dbaora.com:7102/console

em12cr4_oel6_em14

20. Just enter URL for EM12C cloud control https://oel6.dbaora.com:7802/em and login as user sysman. Password for the user was specified in pt. 13.

em12cr4_oel6_em16

21. You can specify your preferences regarding fonts and contrast on next page. Just click “Save and Continue” button. You should see next screen – just press “I Accept” button to accept “License Agreement”.

em12cr4_oel6_em16_1

22. You should see invitation screen where you can choose your preferred home page. I’m DBA so I click “Databases” for Databases.

em12cr4_oel6_em18

em12cr4_oel6_em19

23. As last step I add new entry to .bash_profile of user oracle for EM12C software and new aliases to quickly navigate between binaries of EM and database. Installation is complete.

export ORACLE_OMS=$ORACLE_BASE/em
export ORACLE_OMS_AGENT=$ORACLE_BASE/em_agent

alias cdo='cd $ORACLE_OMS'
alias cdoa='cd $ORACLE_OMS_AGENT'
[oracle@oel6 ~]$ envo
ORACLE_BASE=/ora01/app/oracle
ORACLE_HOME=/ora01/app/oracle/product/11.2.0/db_1
ORACLE_HOSTNAME=oel6.dbaora.com
ORACLE_OMS_AGENT=/ora01/app/oracle/em_agent
ORACLE_OMS=/ora01/app/oracle/em/oms
ORACLE_SID=ORA11G
ORACLE_UNQNAME=ORA11G
[oracle@oel6 ~]$ alias | grep ORACLE
alias cdo='cd $ORACLE_OMS'
alias cdoa='cd $ORACLE_OMS_AGENT'
alias cdob='cd $ORACLE_BASE'
alias cdoh='cd $ORACLE_HOME'
alias envo='env | grep ORACLE | sort'
alias tns='cd $ORACLE_HOME/network/admin'

24. Quick commands for EM12C – all as user oracle

--start all
$ORACLE_HOME/bin/dbstart $ORACLE_HOME 
$ORACLE_OMS/bin/emctl start oms 
$ORACLE_OMS_AGENT/bin/emctl start agent
# Stop everything
$ORACLE_OMS/bin/emctl stop oms -all
$ORACLE_OMS_AGENT/bin/emctl stop agent
$ORACLE_HOME/bin/dbshut $ORACLE_HOME

25. It’s time add some new targets to monitor in EM12C. If you click in top left menu Targets->Databases you won’t see any database on the screen.It could be surprise for you because we have ORA11G.dbaora.com on our host oel6.dbaora.com.

To add this database click top right menu Setup->Add Target->Add Tragets Manually. Then select “Add Targets Using Guided Process (Also Adds Related Targets)” and select from list “Oracle Database, Listener and Automatic storage Management” then click button “Add Using Guided Process”.

em12cr4_oel6_em20

26. Now you need to enter host where your database is installed. In my case it’s oel6.dbaora.com. Remember agent EM12C must be installed on the host to discover the database !!!. In my case it was installed during installation of EM12C. Then click “Continue” button.

em12cr4_oel6_em21

em12cr4_oel6_em21_1 em12cr4_oel6_em21_2

26. As you can see new 2 targets are discovered on oel6.dbaora.com by agent EM12C:

database:ORA11G.dbaora.com
listener: LISTENER_oel6.dbaora.com

Now you need to configure communication between targets and EM12C. To do this just click on “Configure” for database.

em12cr4_oel6_em22

27.You need to enter password for user DBSNMP to establish communication between database and EM12C. If you don’t know password for user DBSNMP you can always change it via sqlplus. There is possibility to test connection by clicking “Test Connection”.

em12cr4_oel6_em23

28. Just click “OK” button. Then “Save” button. You should be back to main screen so click “Next” button to go to step 3.

em12cr4_oel6_em24

29. Now when connection is established and verified save your new targets by clicking “Save” button.

em12cr4_oel6_em25

30. Summary screen new targets saved. Click “Close” button.

em12cr4_oel6_em26

31. After selecting Targets->Databases you should see list of your databases. Just click on ORA11G.dbaora.com entry now you should see details about your database.

em12cr4_oel6_em27 em12cr4_oel6_em28

Have a fun 🙂

Tomasz

5 thoughts on “Install Oracle Enterprise Manager 12C release 4(12.1.0.4) on OEL 5/6

  1. Very good post, one query, can i use Oracle Database 12c Release 1 (12.1.0.1.0) database for Oracle Enterprise Manager Cloud Control 12c Release 4 (12.1.0.4)?
    Regards,
    Sidharth M.

  2. Hi Team

    Very very good article. I have implemented the 12c Cloud control in my environment with 11gr2 database.

    Now i want to add two nodes production database for monitoring by the cloud control. Can suggest how i can install the agents on those servers..Database version is the same as i used for repository..11.2.0.4..

    Regards

    Deshraj Tripathi

  3. VERY VERY VERY Good article.
    I followed step by step article and I have a perfect installation . Thank you very much.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.