Wednesday, September 19, 2018

How to allow private connectivity across organizations(GCP)?

It's interesting, when you would like to allow private connectivity across two VPC networks that they belong to the different project/organization on Google Cloud Platform (GCP).

As google document that we can use VPC Network Peering? VPC Network Peering is a decentralized or distributed approach to multi-project networking. Additional, it works with Compute Engine, Kubernetes Engine,and App Engine flexible environments.

I did a lab about Virtual Private Cloud (VPC) Network Peering. There shows to do VPC Network Peering between VPC networks in the same project. So, I would like to see how it works on across organizations.

Example: On My Organization (my project), I would like to connect server (Private IP Address) on another Organization (another project).

As a subnet CIDR prefix in one peered VPC network cannot overlap with a subnet CIDR prefix in another peered network. So, both VPC networks must have the different CIDR prefix.

My Organization [myproject] {ubuntu-test, default/10.146.0.2} <======> No organization [qwiklabs-gcp***]{privatenet-us-vm/172.16.0.2}

On No organization [qwiklabs-gcp***]: VPC network name is "privatenet".

VPC:
Firewall:


My Organization [myproject]: I used "default" VPC and default firewall.


Then, starting to create "VPC Network Peering".

- To create "VPC Network Peering" on myproject:
Networking => "VPC network" => "VPC network peering".
Click "Create Peering Connection".  name = "peering-to-lab".
Note: you must know Project ID and VPC network name for network destination.































It should show "Waiting for peer network to connect".

-  To create "VPC Network Peering" on another Project: On No organization [qwiklabs-gcp***], "Create Peering Connection".  name = "peering-to-mygcp".


After clicking "Create". It should show "Connected" on both projects (if configuration corrects) like.

On myproject:

- Finally, test connection: ssh to my vm and test (ssh) connection to {privatenet-us-vm/172.16.0.2}.
Note: (as firewall allow icmp/ssh). No need to do on firewall.

opun@ubuntu-test:~$ ssh 172.16.0.2
opun@172.16.0.2's password:
Linux privatenet-us-vm 4.9.0-8-amd64 #1 SMP Debian 4.9.110-3+deb9u4 (2018-08-21) x86_64
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Wed Sep 19 06:22:05 2018 from 10.146.0.2
Could not chdir to home directory /home/opun: No such file or directory
$ w
 06:22:55 up 43 min,  2 users,  load average: 0.00, 0.00, 0.00
USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT
opun     pts/1    10.146.0.2       06:22    1.00s  0.00s  0.00s w ************
Reference: https://cloud.google.com/vpc/docs/vpc-peering

Saturday, April 21, 2018

GCP - How to manage SSH keys on VM Instance?

On Google Cloud Platform, adding SSH keys in Metadata (project-wide public SSH keys). It can help to ssh to every VM instances on Compute Engine easily but it's not a good idea. We are able to do for test, but should not use on Production. We should add SSH Key in OS login. 
https://cloud.google.com/compute/docs/instances/adding-removing-ssh-keys#risks



Question:
How can we block SSH Keys from Metadata(project-wide public SSH keys) on VM instance?
Answer: We can block by checking "Block project-wide SSH keys" on each instance.

In case we have SSH Key on metadata. We are able to ssh by using private key and login like.

So, we block it... On "Compute Engine" - "VM Instances", click [instance name] and "Edit". To check "Block project-wide SSH keys" and "Save".


VM instance should refuse Key what 's not in SSH  Keys of VM instance. (You can remove SSH Keys of project owner on instance, but it will be automatic added when you click "SSH" on GUI).

Additional, we should review and remove SSH Keys in metadata(project-wide public SSH keys), if we ensure we have not used. (Don't remove ssh key of project owner).

After removing, We would like to add SSH Key and don't want to add it in OS login. We are able to add it in SSH Keys on Instance like.


Assume: username is "myuser".

First of all, we have to generate Private and Public Keys. Example uses "PuTTY Key Generator". Because I use "Putty.


Then "Save private key" (We have to use when putty to server) and "Save public key".

To use public key on VM instance, click "Add item".



Example: It's [public key] [username]  

 then "Save".
Note: In picture, it's highlight about [username]

Open "putty", select "Private key file for authentication", fill in ip address and connect.

it's easy, right?
myuser@centos7:~$ id
uid=1003(myuser) gid=1004(myuser) groups=1004(myuser),4(adm),30(dip),44(video),46(plugdev),1000(google-sudoers)
If we use command "id [user in project-wide SSH keys], we still see it, but it's unable to ssh on this VM instance.
myuser@centos7:~$ id opun
uid=1001(opun) gid=1002(opun) groups=1002(opun),4(adm),30(dip),44(video),46(plugdev),
Reference:

Wednesday, September 14, 2016

Install OEM 13c Silent mode

How to install Oracle EM 13c? It's the first time that I have a chance to install Oracle EM 13c. I remember last time I installed Oracle EM 12c. I have to install weblogic first. On OEM 13c, I don't need to do something like that. It installs WLS -12.1.0.3 , JDK – 1.7.0_80.
In this post, I installed Oracle EM 13c Silent mode with "SMALL" deployment. I assume, I installed Oracle Database Software 12.1.0.2 (Software Only), downloaded "12.1.0.2 DB Template for EM 13.1.0.0 on Linux x86-64" template  and uncompressed it in $ORACLE_HOME/assistants/dbca/templates folder.
OS:
ip_local_port_range parameter is set between 11000 to 65000
soft nofiles = 30000
file max = 65536
Database:
optimizer_adaptive_features = FALSE
Then, created database by using template.
[oracle@em13c ~]$ diff /u01/app/oracle/product/12.1.0/dbhome_1/assistants/dbca/dbca.rsp  dbca-emrep.rsp
78c78
< GDBNAME = "orcl12c.us.oracle.com"
---
> GDBNAME = "emrep"
205c205
< SID = "orcl12c"
---
> SID = "emrep"
265c265
< TEMPLATENAME = "General_Purpose.dbc"
---
> TEMPLATENAME = "12.1.0.2.0_Database_Template_for_EM13_1_0_0_0_Small_deployment.dbc"
286c286
< #SYSPASSWORD = "password"
---
> SYSPASSWORD = "password1"
296c296
< #SYSTEMPASSWORD = "password"
---
> SYSTEMPASSWORD = "password1"
467c467
< #DATAFILEDESTINATION =
---
> DATAFILEDESTINATION =  /u02/oradata
487c487
< #STORAGETYPE=FS
---
> STORAGETYPE=FS
525c525
< #CHARACTERSET = "US7ASCII"
---
> CHARACTERSET = "AL32UTF8"
[oracle@em13c ~]$ export ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_1
[oracle@em13c ~]$ export ORACLE_BASE=/u01/app/oracle
[oracle@em13c ~]$ /u01/app/oracle/product/12.1.0/dbhome_1/bin/dbca -silent -responseFile dbca-emrep.rsp
Copying database files
1% complete
3% complete
10% complete
16% complete
 23% complete
30% complete
33% complete
Creating and starting Oracle instance
35% complete
40% complete
44% complete
49% complete
50% complete
53% complete
55% complete
Completing Database Creation
58% complete
62% complete
65% complete
75% complete
85% complete
88% complete
Running Custom Scripts
100% complete
Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/emrep/emrep.log" for further details.
Checked database after installing.
[oracle@em13c ~]$ . oraenv
ORACLE_SID = [oracle] ? emrep
The Oracle base remains unchanged with value /u01/app/oracle
[oracle@em13c ~]$ sqlplus  / as sysdba
SQL*Plus: Release 12.1.0.2.0 Production on Wed Sep 14 14:39:32 2016
Copyright (c) 1982, 2014, Oracle.  All rights reserved.

Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SQL> select instance_name from v$instance;
INSTANCE_NAME
----------------
emrep
SQL>  select name from v$datafile;
NAME
------------------------------------------------------------------------------------------------------------------------------------------------------
/u02/oradata/emrep/system01.dbf
/u02/oradata/emrep/sysaux01.dbf
/u02/oradata/emrep/undotbs01.dbf
/u02/oradata/emrep/users01.dbf
/u02/oradata/emrep/mgmt_depot.dbf
/u02/oradata/emrep/mgmt.dbf
/u02/oradata/emrep/mgmt_ad4j.dbf
7 rows selected.
SQL> show parameter spfile
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
spfile                               string      /u01/app/oracle/product/12.1.0
                                                 /dbhome_1/dbs/spfileemrep.ora
SQL> show parameter optimizer_adaptive_features
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
optimizer_adaptive_features          boolean     FALSE
SQL> archive log list
Database log mode              No Archive Mode
Automatic archival             Disabled
Archive destination            /u01/app/oracle/product/12.1.0/dbhome_1/dbs/arch
Oldest online log sequence     1
Current log sequence           1
SQL> show parameter control_files
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
control_files                        string      /u02/oradata/emrep/control01.c
                                                 tl, /u02/oradata/emrep/control02.ctl
Configured listener.
[oracle@em13c ~]$ diff /u01/app/oracle/product/12.1.0/dbhome_1/assistants/netca/netca.rsp  /home/oracle/netca.rsp
46c46
< #SHOW_GUI=false
---
> SHOW_GUI=false
60c60
< #LOG_FILE=""/oracle12cHome/network/tools/log/netca.log""
---
> LOG_FILE=""/u01/app/oracle/product/12.1.0/dbhome_1/network/tools/log/netca.log""
113c113
< NSN_NUMBER=1
---
> #NSN_NUMBER=1
117c117
< NSN_NAMES={"EXTPROC_CONNECTION_DATA"}
---
> #NSN_NAMES={"EXTPROC_CONNECTION_DATA"}
121c121
< NSN_SERVICE={"PLSExtProc"}
---
> #NSN_SERVICE={"PLSExtProc"}
127c127
< NSN_PROTOCOLS={"TCP;HOSTNAME;1521"}
---
> #NSN_PROTOCOLS={"TCP;HOSTNAME;1521"}
[oracle@em13c ~]$ netca -silent -orahome /u01/app/oracle/product/12.1.0/dbhome_1 -responsefile /home/oracle/netca.rsp
Wed Sep 14 15:26:52 ICT 2016 Oracle Net Configuration Assistant
Parsing command line arguments:
    Parameter "silent" = true
    Parameter "orahome" = /u01/app/oracle/product/12.1.0/dbhome_1
    Parameter "responsefile" = /home/oracle/netca.rsp
    Parameter "log" = /u01/app/oracle/product/12.1.0/dbhome_1/network/tools/log/netca.log
Done parsing command line arguments.
Oracle Net Services Configuration:
Profile configuration complete.
Oracle Net Listener Startup:
    Running Listener Control:
      /u01/app/oracle/product/12.1.0/dbhome_1/bin/lsnrctl start LISTENER
    Listener Control complete.
    Listener started successfully.
Listener configuration complete.
Oracle Net Services configuration successful. The exit code is 0
[oracle@em13c ~]$ lsnrctl status
LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 14-SEP-2016 15:27:35
Copyright (c) 1991, 2014, Oracle.  All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=em13c.surachartopun.com)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 12.1.0.2.0 - Production
Start Date                14-SEP-2016 15:26:52
Uptime                    0 days 0 hr. 0 min. 42 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/12.1.0/dbhome_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/em13c/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=em13c.surachartopun.com)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "emrep" has 1 instance(s).
  Instance "emrep", status READY, has 1 handler(s) for this service...
Service "emrepXDB" has 1 instance(s).
  Instance "emrep", status READY, has 1 handler(s) for this service...
The command completed successfully
It was time to install Oracle EM 13c Silent mode. 
  • Uncompressed software and created response file.
[oracle@em13c scratch]$ ls em13100*
em13100_linux64-2.zip  em13100_linux64-3.zip  em13100_linux64-4.zip  em13100_linux64-5.zip  em13100_linux64.bin
[oracle@em13c scratch]$ ./em13100_linux64.bin -getResponseFileTemplates -outputLoc /home/oracle/RSP
0%...............................................................100%
Launcher log file is /tmp/OraInstall2016-09-14_03-31-39PM/launcher2016-09-14_03-31-39PM.log.
Copying response file template(s)
to /home/oracle/RSP ...
  Copying response file template upgrade.rsp
  Copying response file template software_only.rsp
  Copying response file template new_install.rsp
Finished copying response file template(s)
  • Modified response file and installed OEM13c. (I chose to use new install)
[oracle@em13c scratch]$ diff /home/oracle/RSP/new_install.rsp  /home/oracle/RSP/my-new_install.rsp
38c38
< UNIX_GROUP_NAME=<string>
---
> UNIX_GROUP_NAME=dba
46c46
< INVENTORY_LOCATION=<string>
---
> INVENTORY_LOCATION=/u01/app/oraInventory
60c60
< DECLINE_SECURITY_UPDATES=false
---
> DECLINE_SECURITY_UPDATES=true
67c67
< MYORACLESUPPORT_USERNAME=<string>
---
> #MYORACLESUPPORT_USERNAME=<string>
74c74
< MYORACLESUPPORT_PASSWORD=<string>
---
> #MYORACLESUPPORT_PASSWORD=<string>
92c92
< STAGE_LOCATION=<string>
---
> #STAGE_LOCATION=<string>
101c101
< MYORACLESUPPORT_USERNAME_FOR_SOFTWAREUPDATES=<string>
---
> #MYORACLESUPPORT_USERNAME_FOR_SOFTWAREUPDATES=<string>
110c110
< MYORACLESUPPORT_PASSWORD_FOR_SOFTWAREUPDATES=<string>
---
> #MYORACLESUPPORT_PASSWORD_FOR_SOFTWAREUPDATES=<string>
117c117
< PROXY_USER=<string>
---
> #PROXY_USER=<string>
124c124
< PROXY_PWD=<string>
---
> #PROXY_PWD=<string>
131c131
< PROXY_HOST=<string>
---
> #PROXY_HOST=<string>
138c138
< PROXY_PORT=<string>
---
> #PROXY_PORT=<string>
145c145
< ORACLE_MIDDLEWARE_HOME_LOCATION=<string>
---
> ORACLE_MIDDLEWARE_HOME_LOCATION=/u01/app/oracle/mw13c
153c153
< ORACLE_HOSTNAME=<string>
---
> ORACLE_HOSTNAME=em13c.surachartopun.com
160c160
< AGENT_BASE_DIR=<string>
---
> AGENT_BASE_DIR=/u01/app/oracle/agent13c
167c167
< WLS_ADMIN_SERVER_USERNAME=<string>
---
> WLS_ADMIN_SERVER_USERNAME=weblogic
174c174
< WLS_ADMIN_SERVER_PASSWORD=<string>
---
> WLS_ADMIN_SERVER_PASSWORD=password1
181c181
< WLS_ADMIN_SERVER_CONFIRM_PASSWORD=<string>
---
> WLS_ADMIN_SERVER_CONFIRM_PASSWORD=password1
188c188
< NODE_MANAGER_PASSWORD=<string>
---
> NODE_MANAGER_PASSWORD=password1
195c195
< NODE_MANAGER_CONFIRM_PASSWORD=<string>
---
> NODE_MANAGER_CONFIRM_PASSWORD=password1
202c202
< ORACLE_INSTANCE_HOME_LOCATION=<string>
---
> ORACLE_INSTANCE_HOME_LOCATION=/u01/app/oracle/gc_inst
221c221
< SOFTWARE_LIBRARY_LOCATION=<string>
---
> SOFTWARE_LIBRARY_LOCATION=/u01/app/oracle/swlib
229c229
< DATABASE_HOSTNAME=<string>
---
> DATABASE_HOSTNAME=em13c.surachartopun.com
237c237
< LISTENER_PORT=<string>
---
> LISTENER_PORT=1521
245c245
< SERVICENAME_OR_SID=<string>
---
> SERVICENAME_OR_SID=emrep
253c253
< SYS_PASSWORD=<string>
---
> SYS_PASSWORD=password1
261c261
< SYSMAN_PASSWORD=<string>
---
> SYSMAN_PASSWORD=password1
268c268
< SYSMAN_CONFIRM_PASSWORD=<string>
---
> SYSMAN_CONFIRM_PASSWORD=password1
275c275
< DEPLOYMENT_SIZE=MEDIUM
---
> DEPLOYMENT_SIZE=SMALL
283c283
< MANAGEMENT_TABLESPACE_LOCATION=<string>
---
> #MANAGEMENT_TABLESPACE_LOCATION=<string>
291c291
< CONFIGURATION_DATA_TABLESPACE_LOCATION=<string>
---
> #CONFIGURATION_DATA_TABLESPACE_LOCATION=<string>
299c299
< JVM_DIAGNOSTICS_TABLESPACE_LOCATION=<string>
---
> #JVM_DIAGNOSTICS_TABLESPACE_LOCATION=<string>
306c306
< AGENT_REGISTRATION_PASSWORD=<string>
---
> AGENT_REGISTRATION_PASSWORD=password1
313c313
< AGENT_REGISTRATION_CONFIRM_PASSWORD=<string>
---
> AGENT_REGISTRATION_CONFIRM_PASSWORD=password1
320c320
< STATIC_PORTS_FILE=<string>
---
> #STATIC_PORTS_FILE=/u01/app/oracle/mw13c/install/portlist.ini
368c368
< CONFIG_LOCATION=<string>
---
> #CONFIG_LOCATION=<string>
376c376
< CLUSTER_LOCATION=<string>
---
> #CLUSTER_LOCATION=<string>
Note: As I created database from template. So. I didn't set *TABLESPACE_LOCATION variables. For variables, that didn't define. we should comment it.
[oracle@em13c scratch]$ ./em13100_linux64.bin -silent -ignoreSysPrereqs  -responseFile /home/oracle/RSP/my-new_install.rsp
0%...............................................................100%
Launcher log file is /tmp/OraInstall2016-09-14_05-56-59PM/launcher2016-09-14_05-56-59PM.log.
Starting Oracle Universal Installer
Checking if CPU speed is above 300 MHz.   Actual 2300.094 MHz    Passed
Checking swap space: must be greater than 512 MB.   Actual 0 MB    Failed <<<<
Checking if this platform requires a 64-bit JVM.   Actual 64    Passed (64-bit not required)
Checking temp space: must be greater than 300 MB.   Actual 32844 MB    Passed
>>> Ignoring failure(s) of required prerequisite checks.  Continuing...

Preparing to launch the Oracle Universal Installer from /tmp/OraInstall2016-09-14_05-56-59PM
====Prereq Config Location main===
/tmp/OraInstall2016-09-14_05-56-59PM/stage/prereq
EMGCInstaller args -scratchPath
EMGCInstaller args /tmp/OraInstall2016-09-14_05-56-59PM
EMGCInstaller args -sourceType
EMGCInstaller args network
EMGCInstaller args -timestamp
EMGCInstaller args 2016-09-14_05-56-59PM
EMGCInstaller args -paramFile
EMGCInstaller args /tmp/sfx_g7ViFx/Disk1/install/linux64/oraparam.ini
EMGCInstaller args -silent
EMGCInstaller args -ignoreSysPrereqs
EMGCInstaller args -responseFile
EMGCInstaller args /home/oracle/RSP/my-new_install.rsp
EMGCInstaller args -nocleanUpOnExit
DiskLoc inside SourceLoc/u02/SRC/EM13c/scratch
EMFileLoc:/tmp/OraInstall2016-09-14_05-56-59PM/oui/em/
ScratchPathValue :/tmp/OraInstall2016-09-14_05-56-59PM
EMGCInstallUpdatesInfoOnNext:: calling actionOnClickofNext
Now in EMGCInstallUpdatesInfoOnNext.actionsOnClickofNext
EMGCInstallUpdatesInfoOnNext:: End of actionOnClickofNext
Session log file is /tmp/OraInstall2016-09-14_05-56-59PM/install2016-09-14_05-56-59PM.log
.
.
.
Setup in progress (Wednesday, September 14, 2016 6:03:38 PM ICT)
Setup successful
Saving inventory (Wednesday, September 14, 2016 6:03:38 PM ICT)
Saving inventory complete
End of install phases.(Wednesday, September 14, 2016 6:03:39 PM ICT)
&Decline License Agreement/u01/app/oracle/mw13c/sysman/install/plugins/oracle.sysman.si/13.1.1.0.0/oracle.sysman.si.discovery.plugin-13.1.1.0.0.farb
Session log file is /tmp/OraInstall2016-09-14_05-56-59PM/install2016-09-14_05-56-59PM.log
........................................................................
Installation in progress (Wednesday, September 14, 2016 6:03:40 PM ICT)
                                                        72% Done.
Install successful
Linking in progress (Wednesday, September 14, 2016 6:03:40 PM ICT)
Link successful
Setup in progress (Wednesday, September 14, 2016 6:03:40 PM ICT)
Setup successful
Saving inventory (Wednesday, September 14, 2016 6:03:40 PM ICT)
Saving inventory complete
End of install phases.(Wednesday, September 14, 2016 6:03:41 PM ICT)
OMS OracleHome :/u01/app/oracle/mw13c
Applying the required one-off patches.
13NGCHEKAGGREGATE  : oracle.sysman.top.agent
13NGCHEKAGGREGATE  : oracle.sysman.top.oms
13NGCHEKAGGREGATE  : encap_oms
13NGCHEKAGGREGATE  : OuiConfigVariables
13NGCHEKAGGREGATE  : OuiConfigVariables
2016-09-14_06-07-13PM: Configuration Assistant "Plugins Prerequisites Check" is in progress.
2016-09-14_06-07-32PM: Configuration Assistant "Plugins Prerequisites Check" has Succeeded.
2016-09-14_06-07-32PM: Configuration Assistant "Repository Out Of Box Configuration" is in progress.
2016-09-14_06-42-39PM: Configuration Assistant "Repository Out Of Box Configuration" has Succeeded.
2016-09-14_06-42-39PM: Configuration Assistant "OMS Configuration" is in progress.

 Executing the OMSCA command...
 Check the log files of the OMS Configuration Assistant at: /u01/app/oracle/mw13c/cfgtoollogs/omsca


 OMS Configuration Assistant completed successfully.

2016-09-14_06-51-03PM: Configuration Assistant "OMS Configuration" has Succeeded.
2016-09-14_06-51-03PM: Configuration Assistant "Plugins Deployment and Configuration" is in progress.

2016-09-14_06-59-48PM: Configuration Assistant "Plugins Deployment and Configuration" has Succeeded.
2016-09-14_06-59-48PM: Configuration Assistant "BI Publisher Configuration" is in progress.
2016-09-14_07-05-20PM: Configuration Assistant "BI Publisher Configuration" has Succeeded.
2016-09-14_07-05-20PM: Configuration Assistant "Start Oracle Management Service" is in progress.
Starting OMS ...
Executing the command: /u01/app/oracle/mw13c/bin/emctl start oms
Starting of OMS is successful.
Starting export oms config...
Executing command: /u01/app/oracle/mw13c/bin/emctl exportconfig oms -dir  /u01/app/oracle/gc_inst/em/EMGC_OMS1/sysman/backup
Export config of OMS is successful.
2016-09-14_07-09-43PM: Configuration Assistant "Start Oracle Management Service" has Succeeded.
2016-09-14_07-09-43PM: Configuration Assistant "Agent Configuration Assistant" is in progress.
Getting Inet Addresses for host em13c.surachartopun.com
** Agent Port Check completed successfully.**
AgentConfiguration:agent configuration has been started
Validating OMS_HOST and EM_UPLOAD_PORT
Performing free port detection..
AgentConfiguration: Executing emctl deploy agent command...
AgentConfiguration: Executing emctl config agent command...
AgentConfiguration:agent configuration finished with status = true
2016-09-14_07-12-12PM: Configuration Assistant "Agent Configuration Assistant" has Succeeded.
*** The Installation was Successful. ***

This information is also available at:
        /u01/app/oracle/mw13c/install/setupinfo.txt
See the following for information pertaining to your Enterprise Manager installation:

Use the following URL to access:
        1. Enterprise Manager Cloud Control URL: https://em13c.surachartopun.com:7803/em
        2. Admin Server URL: https://em13c.surachartopun.com:7102/console
        3. BI Publisher URL: https://em13c.surachartopun.com:9803/xmlpserver
The following details need to be provided while installing an additional OMS:
        1. Admin Server Host Name: em13c.surachartopun.com
        2. Admin Server Port: 7102
You can find the details on ports used by this deployment at : /u01/app/oracle/mw13c/install/portlist.ini


 NOTE:
 An encryption key has been generated to encrypt sensitive data in the Management Repository. If this key is lost, all encrypted data in the Repository becomes unusable.
 A backup of the OMS configuration is available in /u01/app/oracle/gc_inst/em/EMGC_OMS1/sysman/backup on host em13c.surachartopun.com. See Cloud Control Administrators Guide for details on how to back up and recover an OMS.
 NOTE: This backup is valid only for the initial OMS configuration. For example, it will not reflect plug-ins installed later, topology changes like the addition of a load balancer, or changes to other properties made using emctl or emcli. Backups should be created on a regular basis to ensure they capture the current OMS configuration. Use the following command to backup the OMS configuration:
/u01/app/oracle/mw13c/bin/emctl exportconfig oms -dir <backup dir>
Logs successfully copied to /u01/app/oraInventory/logs.
Note: su to "root" and run /u01/app/oracle/mw13c/allroot.sh script.
Starting to execute allroot.sh .........
Starting to execute /u01/app/oracle/mw13c/root.sh ......
/etc exist
Creating /etc/oragchomelist file...
/u01/app/oracle/mw13c
Finished product-specific root actions.
/etc exist
Finished execution of  /u01/app/oracle/mw13c/root.sh ......

Starting to execute /u01/app/oracle/agent13c/agent_13.1.0.0.0/root.sh ......
Finished product-specific root actions.
/etc exist
Finished execution of  /u01/app/oracle/agent13c/agent_13.1.0.0.0/root.sh ......

[root@em13c ~]# cat /etc/oragchomelist
/u01/app/oracle/mw13c
/u01/app/oracle/agent13c/agent_13.1.0.0.0:/u01/app/oracle/agent13c/agent_inst
[root@em13c ~]# find /etc/ -name ???gcstartup
/etc/rc.d/rc2.d/S98gcstartup
/etc/rc.d/rc2.d/K19gcstartup
/etc/rc.d/rc3.d/S98gcstartup
/etc/rc.d/rc3.d/K19gcstartup
/etc/rc.d/rc5.d/S98gcstartup
/etc/rc.d/rc5.d/K19gcstartup
[root@em13c ~]# cat /etc/oragchomelist
/u01/app/oracle/mw13c
/u01/app/oracle/agent13c/agent_13.1.0.0.0:/u01/app/oracle/agent13c/agent_inst
[root@em13c ~]# find /etc/ -name gcstartup
/etc/rc.d/init.d/gcstartup
[root@em13c ~]# find /etc/ -name ???gcstartup
/etc/rc.d/rc2.d/S98gcstartup
/etc/rc.d/rc2.d/K19gcstartup
/etc/rc.d/rc3.d/S98gcstartup
/etc/rc.d/rc3.d/K19gcstartup
/etc/rc.d/rc5.d/S98gcstartup
/etc/rc.d/rc5.d/K19gcstartup
  • After installed, I was able to check OMS and agent status.
[oracle@em13c scratch]$  /u01/app/oracle/mw13c/bin/emctl status oms -details
Oracle Enterprise Manager Cloud Control 13c Release 1
Copyright (c) 1996, 2015 Oracle Corporation.  All rights reserved.
Enter Enterprise Manager Root (SYSMAN) Password :
Console Server Host        : em13c.surachartopun.com
HTTP Console Port          : 7788
HTTPS Console Port         : 7803
HTTP Upload Port           : 4889
HTTPS Upload Port          : 4903
EM Instance Home           : /u01/app/oracle/gc_inst/em/EMGC_OMS1
OMS Log Directory Location : /u01/app/oracle/gc_inst/em/EMGC_OMS1/sysman/log
OMS is not configured with SLB or virtual hostname
Agent Upload is locked.
OMS Console is locked.
Active CA ID: 1
Console URL: https://em13c.surachartopun.com:7803/em
Upload URL: https://em13c.surachartopun.com:4903/empbs/upload
WLS Domain Information
Domain Name            : GCDomain
Admin Server Host      : em13c.surachartopun.com
Admin Server HTTPS Port: 7102
Admin Server is RUNNING
Oracle Management Server Information
Managed Server Instance Name: EMGC_OMS1
Oracle Management Server Instance Host: em13c.surachartopun.com
WebTier is Up
Oracle Management Server is Up
JVMD Engine is Up
BI Publisher Server Information
BI Publisher Managed Server Name: BIP
BI Publisher Server is Up
BI Publisher HTTP Managed Server Port   : 9701
BI Publisher HTTPS Managed Server Port  : 9803
BI Publisher HTTP OHS Port              : 9788
BI Publisher HTTPS OHS Port             : 9851
BI Publisher is locked.
BI Publisher Server named 'BIP' running at URL: https://em13c.surachartopun.com:9851/xmlpserver
BI Publisher Server Logs: /u01/app/oracle/gc_inst/user_projects/domains/GCDomain/servers/BIP/logs/
BI Publisher Log        : /u01/app/oracle/gc_inst/user_projects/domains/GCDomain/servers/BIP/logs/bipublisher/bipublisher.log
[oracle@em13c scratch]$  /u01/app/oracle/agent13c/agent_13.1.0.0.0/bin/emctl status agent
[Oracle Enterprise Manager Cloud Control 13c Release 1
Copyright (c) 1996, 2015 Oracle Corporation.  All rights reserved.
---------------------------------------------------------------
Agent Version          : 13.1.0.0.0
OMS Version            : 13.1.0.0.0
Protocol Version       : 12.1.0.1.0
Agent Home             : /u01/app/oracle/agent13c/agent_inst
Agent Log Directory    : /u01/app/oracle/agent13c/agent_inst/sysman/log
Agent Binaries         : /u01/app/oracle/agent13c/agent_13.1.0.0.0
Core JAR Location      : /u01/app/oracle/agent13c/agent_13.1.0.0.0/jlib
Agent Process ID       : 26632
Parent Process ID      : 26568
Agent URL              : https://em13c.surachartopun.com:3872/emd/main/
Local Agent URL in NAT : https://em13c.surachartopun.com:3872/emd/main/
Repository URL         : https://em13c.surachartopun.com:4903/empbs/upload
Started at             : 2016-09-14 19:11:49
Started by user        : oracle
Operating System       : Linux version 3.10.0-327.28.3.el7.x86_64 (amd64)
Number of Targets      : 32
Last Reload            : (none)
Last successful upload                       : 2016-09-14 20:03:22
Last attempted upload                        : 2016-09-14 20:03:22
Total Megabytes of XML files uploaded so far : 1.56
Number of XML files pending upload           : 0
Size of XML files pending upload(MB)         : 0
Available disk space on upload filesystem    : 40.54%
Collection Status                            : Collections enabled
Heartbeat Status                             : Ok
Last attempted heartbeat to OMS              : 2016-09-14 20:05:00
Last successful heartbeat to OMS             : 2016-09-14 20:05:00
Next scheduled heartbeat to OMS              : 2016-09-14 20:06:00
---------------------------------------------------------------
Agent is Running and Ready
  • Connected OEM 13c by browser.




Reference:
http://www.oracle.com/technetwork/oem/install-upgrade/pr-install-em13-2835293.pdf