The Musings of CrashSensei

Random thoughts caught by the InterWeb

Install Oracle Enterprise Manager 13c

By crashsensei | November 30, 2017 | 0 Comment

Configure environment

  1. Update the LinearSoft oracle.conf file
    sed -i "s/LSOFT_ORACLE_EM=.*/LSOFT_ORACLE_EM=yes/g" /etc/linearsoft/oracle.conf
  2. Create the middleware home
    mkdir /opt/oracle/app/oracle/middleware
    mkdir /opt/oracle/app/oracle/agent
    mkdir /opt/oracle/emrepo/swlib
    chown oracle:oinstall /opt/oracle/app/oracle/middleware
    chown oracle:oinstall /opt/oracle/app/oracle/agent
    chown oracle:oinstall /opt/oracle/emrepo/swlib
    ln -s /opt/oracle/emrepo/swlib /opt/oracle/app/oracle/swlib

Create OEM Database

  1. Launch DBCA
    1. Login or Switch to the Oracle user su - oracle
    2. Setup the DISPLAY environment variable if needed
      [ `env | grep DISPLAY` ] && echo "Display already set" || \
      export DIPLAY=<MACHINE-NAME>:0.0
    3. Start DBCA dbca
  2. Ensure Create a database is selected and then click Next
  3. Select Advanced Configuration and then click Next
  4. Ensure Database type is Oracle Single Instance database.
    Ensure the General Purpose or Transaction Processing database template is selected.
    Click Next
  5. Database Identification
    1. Set the database name to oemrepo
    2. Uncheck Create as Container database

    3. Click Next
  6. Storage Options
    1. Select Use following for the database storage attributes
    2. Ensure Database files storage type is File System
    3. Ensure Database files location is {ORACLE_BASE}/oradata/{DB_UNIQUE_NAME}
    4. Select Use Oracle-Managed Files

    5. Click Next
  7. Recovery Options
    1. Enable Specify Fast Recovery Area
    2. Set Fast Recovery Area location to {ORACLE_BASE}/fast_recovery_area (OMF will create DB directory)
    3. Set Fast Recovery Area size to 25 GB (value based upon Small OMS Environment)
    4. Check Enable archiving
    5. Click Next
  8. Accept the default listener options by clicking Next
  9. Skip Data Vault configuration by clicking Next
  10. Configuration Options (values based upon Small OMS environment)
    1. Ensure Use Automatic Shared Memory Management is selected
    2. Set SGA size to 3888 MB
    3. Set PGA size to 1296 MB
    4. Click Next
  11. Deselect Configure Enterprise Manager (EM) database express and click Next
  12. Enter in the passwords for the SYS and SYSTEM accounts and then click Next
  13. Database Creation Options
    1. Click All Initialization Parameters…
    2. Update the online log destination parameters
      db_create_online_log_dest_1   =>   {ORACLE_BASE}/oradata
      db_create_online_log_dest_2   =>   {ORACLE_BASE}/fast_recovery_area

    3. Click Close
    4. Click Customize Storage Locations…
    5. Click on Redo Log Groups and then on the first cell under the column Size(MB)
    6. For Change All Size(MB) enter 350 and click Update All
    7. Click Apply then click OK
    8. Click Next
  14. Click Finish
  15. Wait for database creation to complete
  16. Click close

Finalize OEM Database setup

  1. Patch database (if not done by DBCA)
  2. Enable startup script
    1. Switch to the root user
    2. Create the systemd link systemctl enable oradb@oemrepo
  3. Disable the db optimizer
    1. Switch to the oracle user and connect to the database
      su - oracle
      chdb oemrepo
      sqlplus / as sysdba
    2. Issue the SQL commands
      alter system set optimizer_adaptive_plans=false scope=both;
      alter system set optimizer_adaptive_statistics=false scope=both;
      alter system set "_allow_insert_with_update_check"=true scope=both;
      alter system set session_cached_cursors=300 scope=spfile;
      
      shutdown immediate
      startup
      
      quit

Install OEM Software

  1. Launch the Installer
    1. Login or Switch to the Oracle user su - oracle
    2. Setup the DISPLAY environment variable if needed
      [ `env | grep DISPLAY` ] && echo "Display already set" || \
      export DIPLAY=<MACHINE-NAME>:0.0
    3. Run the installer
      cd /opt/oracle/dump
      ./em13200p1_linux64.bin -J-Djava.io.tmpdir=/opt/oracle/dump/emtmp
    4. Wait as it extracts
      [oracle@oraman13c dump]$ ./em13200p1_linux64.bin -J-Djava.io.tmpdir=/opt/oracle/dump/emtmp
      0%...............................................................................100%
      Launcher log file is /opt/oracle/dump/emtmp/OraInstall2017-12-19_02-54-05PM/launcher2017-12-19_02-54-05PM.log.
      Starting Oracle Universal Installer
      
      Checking if CPU speed is above 300 MHz.   Actual 2496.656 MHz    Passed
      Checking monitor: must be configured to display at least 256 colors.   Actual 16777216    Passed
      Checking swap space: must be greater than 512 MB.   Actual 8190 MB    Passed
      Checking if this platform requires a 64-bit JVM.   Actual 64    Passed (64-bit not required)
      
      
      Preparing to launch the Oracle Universal Installer from /opt/oracle/dump/emtmp/OraInstall2017-12-19_02-54-05PM
      ====Prereq Config Location main===
      /opt/oracle/dump/emtmp/OraInstall2017-12-19_02-54-05PM/stage/prereq
      EMGCInstaller args -scratchPath
      EMGCInstaller args /opt/oracle/dump/emtmp/OraInstall2017-12-19_02-54-05PM
      EMGCInstaller args -sourceType
      EMGCInstaller args network
      EMGCInstaller args -timestamp
      EMGCInstaller args 2017-12-19_02-54-05PM
      EMGCInstaller args -paramFile
      EMGCInstaller args /opt/oracle/dump/emtmp/sfx_X3xG5o/Disk1/install/linux64/oraparam.ini
      EMGCInstaller args -nocleanUpOnExit
      DiskLoc inside SourceLoc/opt/oracle/dump
      EMFileLoc:/opt/oracle/dump/emtmp/OraInstall2017-12-19_02-54-05PM/oui/em/
      ScratchPathValue :/opt/oracle/dump/emtmp/OraInstall2017-12-19_02-54-05PM
      
  2. Deselect I wish to receive security updates via My Oracle Support and click Next
  3. Acknowledge the warning message by clicking Yes

  4. Download Updates
    1. Enter your My Oracle Support User Name and Password
    2. Click Search for Updates
    3. After updates are downloaded, click Next
  5. Prerequisite Checks
    1. The kernel checks will issue a warning for ip_local_port_range. (This can be safely ignored because our configured range is larger then the check range)
    2. Highlight the kernel check warning line and click Ignore
    3. Click Next
  6. Select Advanced and then click Next
  7. Installation Details
    1. For Middleware Home Location enter  /opt/oracle/app/oracle/middleware
    2. For Agent Base directory enter  /opt/oracle/app/oracle/agent
    3. Click Next
  8. Accept the default plug-in selection by clicking Next
  9. Enter in the desired passwords for the WebLogic and Node Manager users and then click Next
  10. Database Connection Details
    1. For the Database Host Name enter  localhost
    2. For the Port enter  1521
    3. For the Service/SID enter  oemrepo
    4. Enter the SYS password for the oemrepo database
    5. Ensure Deployment Size is SMALL
    6. Click Next
    7. Acknowledge AL32UTF8 dialog by clicking OK
    8. Allow the installer to temporary alter settings for stats jobs and parallel servers by clicking Yes
    9. The Shared Pool size warning can safely be ignored by clicking OK because we are using ASMM
    10. Fill in the SYSMAN and Agent Registration passwords then click Next
    11. Share Location Details
      1. Ensure the Sofware Library Location is /opt/oracle/app/oracle/swlib
      2. Deselect Configure a Shared Location for Oracle BI Publisher
      3. Click Next
    12. Accept the default ports by clicking Next
    13. Click Install to begin the installation process
    14. Wait for the install to progress
      Note: Repository Configuration will take a VERY, VERY long time.
    15. Execute script as Root
      1. Near the end of the installation the Execute Configuration Scripts dialog will appear
      2. Launch a new console as Root
      3. Run the Oracle Middleware script /opt/oracle/app/oracle/middleware/allroot.sh
        # /opt/oracle/app/oracle/middleware/allroot.sh
        
        Starting to execute allroot.sh .........
        
        Starting to execute /opt/oracle/app/oracle/middleware/root.sh ......
        /etc exist
        
        Creating /etc/oragchomelist file...
        /opt/oracle/app/oracle/middleware
        Finished product-specific root actions.
        /etc exist
        Finished execution of  /opt/oracle/app/oracle/middleware/root.sh ......
        
        
        Starting to execute /opt/oracle/app/oracle/agent/agent_13.2.0.0.0/root.sh ......
        Finished product-specific root actions.
        /etc exist
        Finished execution of  /opt/oracle/app/oracle/agent/agent_13.2.0.0.0/root.sh ......
        
      4. Return back to the Oracle installer in click OK
    16. Take note of the information and then click Close
    17. Setup SystemD scripts
      1. Login/switch to the root user
      2. Stop the init.d services
        /etc/init.d/gcstartup stop
        /etc/init.d/unlockgcstartup
      3. Wait until all services are stopped before continuing
        while ps -ef | grep -i [g]c_inst > /dev/null; do 
        echo "Waiting..."
        sleep 10
        done
      4. Remove init.d RC links
        find /etc/rc.d/rc* -name *gcstartup* -exec rm {} \;
      5. Copy & enable SystemD files
        cp /opt/linearsoft/toolbag/oracle/systemd/oraem.service /etc/systemd/system/oraem.service
        systemctl enable oraem.service
        #Note starting the oraem service will take a very long time
        systemctl start oraem.service
        cp /opt/linearsoft/toolbag/oracle/systemd/oraagent.service /etc/systemd/system/oraagent.service
        systemctl enable oraagent.service
        systemctl start oraagent.service
TAGS

0 Comments