Oracle Database and Enterprise Manager Cloud Control 12c Installation on Ubuntu
Pre-Requisites
1. Perform
pre-requisites as listed in Linux install of Oracle Database and Oracle
Enterprise Manager for 12c version, this would include:
- Linux
Packages required
apt-get -y install elfutils libaio1 libaio-dev libstdc++* numactl pdksh sysstat unixodbc-dev unixodbc build-essential gawk ksh libmotif* libXtst* alien libtool glibc-* binutils cpp-* debhelper g++* gcc* gcc-*-base gettext html2text lib32z1 lib32ncurses5 intltool-debian lib32z1-dev libc6 libc6-dev libc6-dev-i386 libelf-dev libelf1 libltdl-dev libltdl7 libodbcinstq4-1 libodbcinstq4-1:i386 libqt*-core libqt*-gui libsqlite3-0 lsb lsb-core make odbcinst pax po-debconf rpm rpm-common unzip lib*crypt xorg* glibc-devel.i386 setarch rng-utils - Kernel
Configuration
echo "#" | sudo tee -a /etc/sysctl.conf
echo "# Oracle 12C entries" | sudo tee -a /etc/sysctl.conf
echo "fs.aio-max-nr=1048576" | sudo tee -a /etc/sysctl.conf
echo "fs.file-max=6815744" | sudo tee -a /etc/sysctl.conf
echo "kernel.shmall=2097152" | sudo tee -a /etc/sysctl.conf
echo "kernel.shmmni=4096" | sudo tee -a /etc/sysctl.conf
echo "kernel.sem=250 32000 100 128" | sudo tee -a /etc/sysctl.conf
echo "net.ipv4.ip_local_port_range=9000 65500" | sudo tee -a /etc/sysctl.conf
echo "net.core.rmem_default=262144" | sudo tee -a /etc/sysctl.conf
echo "net.core.rmem_max=4194304" | sudo tee -a /etc/sysctl.conf
echo "net.core.wmem_default=262144" | sudo tee -a /etc/sysctl.conf
echo "net.core.wmem_max=1048586" | sudo tee -a /etc/sysctl.conf
echo "kernel.shmmax=1073741824" | sudo tee -a /etc/sysctl.conf
Run command to make changes effective:
sysctl -p - Security
Limits
cp /etc/security/limits.conf /etc/security/limits.conf.original
echo "#Oracle 12C shell limits:" | sudo tee -a /etc/security/limits.conf
echo "oracle soft nproc 2048" | sudo tee -a /etc/security/limits.conf
echo "oracle hard nproc 16384"| sudo tee -a /etc/security/limits.conf
echo "oracle soft nofile 1024" | sudo tee -a /etc/security/limits.conf
echo "oracle hard nofile 65536" | sudo tee -a /etc/security/limits.conf - It is required to create softlinks to below lib files to avoid installation failure when Oracle looks up for them
mkdir /usr/lib64
ln -s /usr/lib /usr/lib/lib64
ln -s /lib/x86_64-linux-gnu/libgcc_s.so.1 /lib64/
ln -s /usr/bin/awk /bin/awk
ln -s /usr/bin/basename /bin/basename
ln -s /usr/bin/rpm /bin/rpm
ln -s /usr/lib/x86_64-linux-gnu/libc_nonshared.a /usr/lib64/
ln -s /usr/lib/x86_64-linux-gnu/libpthread_nonshared.a /usr/lib64/
ln -s /usr/lib/x86_64-linux-gnu/libstdc++.so.6 /lib64/
ln -s /usr/lib/x86_64-linux-gnu/libstdc++.so.6 /usr/lib64/
ln /usr/lib/x86_64-linux-gnu/libpthread_nonshared.a /usr/lib64/libpthread_nonshared.a
In case if you get missing reference for below library, make soft link and try relinking: (you may verify using ldd command for references of library that fails linking)
ln -s <ORACLE_HOME>/lib/libclntshcore.so.12.1 /usr/lib/
To make it short I have summarized the changes below, you would require to add "-Wl,--no-as-needed" for modules that fail in compiling.
<ORACLE_HOME>/rdbms/lib$ cat env_rdbms.mk | grep "-Wl,--no-as-needed"
ORACLE_LINKLINE=$(ORACLE_LINKER) -Wl,--no-as-needed $(PL_FLAGS) $(ORAMAI) $(SSORED) $(TTCSOI) \
EXTPROC_LINKLINE=$(LINK) $(OPT) -Wl,--no-as-needed $(EXTPMAI) $(PROD_EXTPROC_OPT) \
HSDEPXA_LINKLINE=$(LINK) $(OPT) -Wl,--no-as-needed $(HSDEPMAI) $(HSALIB_SUBSET1) \
HSOTS_LINKLINE=$(LINK) $(OPT) -Wl,--no-as-needed $(HSOTSMAI) $(HSALIB_SUBSET1) \
KFED_LINKLINE=$(LINK) $(S0MAIN) -Wl,--no-as-needed $(SSKFEDED) $(SKFEDPT) \
KFOD_LINKLINE=$(LINK) $(S0MAIN) -Wl,--no-as-needed $(SSKFODED) $(SKFODPT) $(KFODOBJ) \
KFNDG_LINKLINE=$(LINK) $(S0MAIN) -Wl,--no-as-needed $(SSKFNDGED) $(SKFNDGPT) $(KFNDGOBJ) \
AMDU_LINKLINE=$(LINK) $(S0MAIN) -Wl,--no-as-needed $(SSKFMUED) $(SKFMUPT) $(LLIBCLNTSH) \
Specify library file names for below modules in ins_rdbms.mk, and the ones that may fail, if any, during linking.
<ORACLE_HOME>/rdbms/lib$ cat ins_rdbms.mk | grep lnnz12
$(ORAPWD_LINKLINE) -lnnz12
$(TG4PWD_LINKLINE) -lnnz12
<ORACLE_HOME>/rdbms/lib$ cat ins_rdbms.mk | grep lons
$(PLSHPROF_LINKLINE) -lons
$(RMAN_LINKLINE) -lons
<ORACLE_HOME>/rdbms/lib$ cat ins_rdbms.mk | grep lagtsh
$(EXTPROC_LINKLINE) -lagtsh
$(HSOTS_LINKLINE) -lagtsh
<ORACLE_HOME>/network/lib$ cat ins_net_server.mk | grep "\-l"
$(TNSLSNR_LINKLINE) -lnnz12 -lons
Installation
1. Downloaded softwares
Database -> /u01/stage/DB12c
OEM -> /u01/stage/OMS
2. Add user “oracle” and groups “dba” and “oinstall” and prepare directories
# groupadd -g 202 dba
# groupadd -g 203 oinstall
# useradd -m -d /home/oracle -u 203 -g oinstall -G dba -s /bin/bash -p <pass> oracle
# mkdir -p /u01/{oem12c,db12c,admin}
# mkdir -p /u01/oem12c/{middleware,agent12c}
# chown -R oracle:oinstall /u01/*
# chmod 755 -R /u01/*
3. Install Oracle Database Software and create database EMREP to be used as OEM repository
a. Unzip software as “oracle”
$ cd /u01/stage/DB12c
$ unzip linuxamd64_12102_database_1of2.zip
$ unzip linuxamd64_12102_database_2of2.zip
b. After unzipping prepare response file
$ cd /u01/stage/DB12c/database/response
$ vi oemdb.rsp
db_install.rsp is sample file provided by Oracle that can be used as a template after modification, the parameters that I used are:
oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v12.1.0
oracle.install.option=INSTALL_DB_SWONLY
ORACLE_HOSTNAME=symgrNCS01
UNIX_GROUP_NAME=oinstall
SELECTED_LANGUAGES=en
ORACLE_HOME=/u01/db12c
ORACLE_BASE=/u01/admin
oracle.install.db.InstallEdition=EE
oracle.install.db.DBA_GROUP=dba
oracle.install.db.OPER_GROUP=dba
oracle.install.db.BACKUPDBA_GROUP=dba
oracle.install.db.DGDBA_GROUP=dba
oracle.install.db.KMDBA_GROUP=dba
SECURITY_UPDATES_VIA_MYORACLESUPPORT=false
DECLINE_SECURITY_UPDATES=true
c. Invoke Silent Installation
$ cd /u01/stage/DB12c/database
$ ./runInstaller -ignoreSysPrereqs -silent -responseFile /u01/stage/DB12c/database/response/oemdb.rsp
d. Prepare pfile and create spfile for instance
Although DBUA can be used to create database, I preferred to go with manual method.
*.compatible='12.1.0.2'
*.control_files='/u02/oradb/control01.ctl'
*.db_block_size=8192
*.db_create_file_dest='/u02/oradb/'
*.db_create_online_log_dest_1='/u02/oradb/redologs/'
*.db_create_online_log_dest_2='/u02/oradb/mirrlogs/'
*.db_name='EMREP'
*.db_securefile='PERMITTED'
*.diagnostic_dest='/u02/data/admin/'
*.job_queue_processes=50
*.log_archive_dest='/u02/oradb/arch/'
*.log_archive_format='log%t_%s_%r.arc'
*.memory_target=6G
*.open_cursors=350
*.parallel_max_servers=8
*.processes=300
*.undo_tablespace='UNDOTBS1'
e. Startup nomount instance and run create database script
$ sqlplus / as sysdba
SQL> CREATE DATABASE EMREP ARCHIVELOG
DATAFILE SIZE 500M AUTOEXTEND ON
SYSAUX DATAFILE SIZE 300M AUTOEXTEND ON
UNDO TABLESPACE UNDOTBS1 DATAFILE SIZE 200M AUTOEXTEND ON
DEFAULT TEMPORARY TABLESPACE TEMP1 TEMPFILE SIZE 200M AUTOEXTEND ON
LOGFILE
GROUP 1 SIZE 500M,
GROUP 2 SIZE 500M,
GROUP 3 SIZE 500M
CHARACTER SET AL32UTF8;
Run catalog.sql, catproc.sql and pupbld.sql respectively.
f. Create password file and listener for database
$ cd $ORACLE_HOME/dbs
$ orapwd file=orapwEMREP password=<pass> ignorecase=y
$ vi $ORACLE_HOME/network/admin/listener.ora
EMREP =
(DESCRIPTION=
(ADDRESS=(PROTOCOL=TCP)(HOST=srv01)(PORT=1521)
(CONNECT_DATA=(SID=EMREP))
)
)
SID_LIST_EMREP=
(SID_LIST=
(SID_DESC=
(ORACLE_HOME=/u01/db12c)
(SID_NAME=EMREP)
)
)
$ lsnrctl start EMREP
4. Install Oracle Enterprise Manager
a. Unzip software and prepare response file
$ cd /u01/stage/OMS/
$ unzip em12105_linux64_disk1.zip
$ unzip em12105_linux64_disk2.zip
$ unzip em12105_linux64_disk3.zip
$ cd /u01/stage/OMS/em12105_linux/response
$ vi oms_new_install.rsp
new_install.rsp is sample file provided by Oracle that can be used as a template after modification, the parameters that I used are:
RESPONSEFILE_VERSION=2.2.1.0.0
UNIX_GROUP_NAME="dba"
INVENTORY_LOCATION="/u01/oraInventory"
SECURITY_UPDATES_VIA_MYORACLESUPPORT=false
DECLINE_SECURITY_UPDATES=true
INSTALL_UPDATES_SELECTION="skip"
ORACLE_MIDDLEWARE_HOME_LOCATION=/u01/oem12c/middleware
ORACLE_HOSTNAME=srv01
AGENT_BASE_DIR=/u01/oem12c/agent12c
WLS_ADMIN_SERVER_USERNAME="weblogic"
WLS_ADMIN_SERVER_PASSWORD="oracle12"
WLS_ADMIN_SERVER_CONFIRM_PASSWORD="oracle12"
NODE_MANAGER_PASSWORD="oracle12"
NODE_MANAGER_CONFIRM_PASSWORD="oracle12"
ORACLE_INSTANCE_HOME_LOCATION=/u01/oem12c/middleware/gc_inst
CONFIGURE_ORACLE_SOFTWARE_LIBRARY=false
DATABASE_HOSTNAME="srv01"
LISTENER_PORT="1521"
SERVICENAME_OR_SID="EMREP"
SYS_PASSWORD="oracle12"
SYSMAN_PASSWORD="oracle12"
SYSMAN_CONFIRM_PASSWORD="oracle12"
DEPLOYMENT_SIZE="SMALL"
MANAGEMENT_TABLESPACE_LOCATION="/media/itadmin/oradb/EMREP/datafile/mgmt01.dbf"
CONFIGURATION_DATA_TABLESPACE_LOCATION="/media/itadmin/oradb/EMREP/datafile/mgmt_emc_depot01.dbf"
JVM_DIAGNOSTICS_TABLESPACE_LOCATION="/media/itadmin/oradb/EMREP/datafile/mgmt_deepdive01.dbf"
AGENT_REGISTRATION_PASSWORD="oracle12"
AGENT_REGISTRATION_CONFIRM_PASSWORD="oracle12"
FROM_LOCATION="../oms/Disk1/stage/products.xml"
DEINSTALL_LIST={"oracle.sysman.top.oms","12.1.0.5.0"}
b_upgrade=false
EM_INSTALL_TYPE="NOSEED"
CONFIGURATION_TYPE="ADVANCED"
TOPLEVEL_COMPONENT={"oracle.sysman.top.oms","12.1.0.5.0"}
b. Invoke OEM installation
$ cd /u01/stage/OMS/em12105_linux/
$ ./runInstaller -silent -responseFile /u01/stage/OMS/em12105_linux/response/oms_new_install.rsp
c. Obtain Oracle Management Agent for AIX
Since this OEM is a Linux install and all monitored servers are running AIX, we would require OEM to be equipped with software of Oracle Management Agent 12c for AIX to monitor them, this can be obtained using ONLINE method or OFFLINE method.
ONLINE method: https://docs.oracle.com/cd/E24628_01/install.121/e39876/downloading_agent_sw.htm#EMGSG111
OFFLINE method: https://docs.oracle.com/cd/E24628_01/install.121/e22624/install_agent.htm#EMBSC294
d. Add Targets for Monitoring
After downloading agent software using any of above two methods, proceed with deployment using “Add Targets” menu
5. Configure Alerts and Notification Methods.
We are all done with installation, you may proceed with configuring alerts and notifications!
Enjoy.
-Anurag