Friday, December 28, 2018

RHEL7 - Splunk server installation



[root@server2 network-scripts]# nmcli dev status
DEVICE       TYPE      STATE                                  CONNECTION
virbr0       bridge    connected                              virbr0
eno16780032  ethernet  connected                              ens192
eno33559296  ethernet  connected                              devi2
eno50338560  ethernet  connected                              team0-port1
eno67109888  ethernet  connected                              team0-port2
virbr0-nic   ethernet  connected                              virbr0-nic
team0        team      connected                              team0
eno83889152  ethernet  connecting (getting IP configuration)  team-port1
eno2         team      connecting (getting IP configuration)  team1
lo           loopback  unmanaged                              --
[root@server2 network-scripts]# ls -l ifcfg-devi2
-rw-r--r--. 1 root root 308 Dec 23 13:01 ifcfg-devi2
[root@server2 network-scripts]# more ifcfg-devi2
TYPE=Ethernet
BOOTPROTO=none
IPADDR=192.168.10.122
PREFIX=24
GATEWAY=192.168.10.1
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
NAME=devi2
UUID=025ddafc-d79e-4b5f-a3df-23bd9c60ba34
DEVICE=eno33559296
ONBOOT=yes
[root@server2 network-scripts]# netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
0.0.0.0         192.168.10.1    0.0.0.0         UG        0 0          0 eno16780032
192.168.10.0    0.0.0.0         255.255.255.0   U         0 0          0 eno16780032
192.168.10.0    0.0.0.0         255.255.255.0   U         0 0          0 team0
192.168.122.0   0.0.0.0         255.255.255.0   U         0 0          0 virbr0
[root@server2 network-scripts]# nmcli connection up devi2
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/25)
[root@server2 network-scripts]# ifconfig | more


[root@server2 network-scripts]# pwd
/etc/sysconfig/network-scripts
[root@server2 network-scripts]# cd
[root@server2 ~]# ls
anaconda-ks.cfg  createusers        Downloads        random     testfile
ca.crt           createweb.sh       Music            random1    Videos
ca.csr           createweb.sh.orig  original-ks.cfg  script.sh
ca.key           Desktop            Pictures         stderr
create12         Documents          Public           Templates

[root@server2 ~]# cd Downloads/
[root@server2 Downloads]# pwd
/root/Downloads
[root@server2 Downloads]# df -h
Filesystem               Size  Used Avail Use% Mounted on
/dev/mapper/centos-root  8.0G  4.5G  3.6G  56% /
devtmpfs                 905M     0  905M   0% /dev
tmpfs                    921M  320K  920M   1% /dev/shm
tmpfs                    921M   64M  858M   7% /run
tmpfs                    921M     0  921M   0% /sys/fs/cgroup
/dev/sda1                497M  180M  318M  37% /boot
tmpfs                    185M   32K  185M   1% /run/user/0
tmpfs                    185M   20K  185M   1% /run/user/1000
/dev/sr0                 507M  507M     0 100% /run/media/kamal/CentOS 7 x86_64
tmpfs                    921M   76K  921M   1% /tmp
[root@server2 Downloads]# rpm -ivh splunk-7.2.3-06d57c595b80-linux-2.6-x86_64.rp                                                      m
warning: splunk-7.2.3-06d57c595b80-linux-2.6-x86_64.rpm: Header V4 RSA/SHA256 Si                                                      gnature, key ID b3cd4420: NOKEY
Preparing...                          ################################# [100%]
useradd: cannot create directory /opt/splunk
Updating / installing...
   1:splunk-7.2.3-06d57c595b80        ################################# [100%]
complete
[root@server2 Downloads]# ls -ld /opt/splunk
drwxr-xr-x. 8 splunk splunk 222 Dec 28 23:57 /opt/splunk
[root@server2 Downloads]# cd /opt/splunk
[root@server2 splunk]# ls
bin            license-eula.txt
copyright.txt  openssl
etc            README-splunk.txt
ftr            share
include        splunk-7.2.3-06d57c595b80-linux-2.6-x86_64-manifest
lib
[root@server2 splunk]# /opt/splunk/bin/^C
[root@server2 splunk]# cd /opt/splunk/bin/
[root@server2 bin]# ls
bloom                   jars                            scripts
bottle.py               jp.py                           scrubber.py
btool                   jsmin                           searchtest
btprobe                 locktest                        setSplunkEnv
bzip2                   locktool                        shc_upgrade_template.py
cherryd                 mongod                          signtool
classify                mongod-3.4                      slim
ColdStorageArchiver.py  mongod_cc                       splunk
coldToFrozenExample.py  node                            splunkd
copyright.txt           openssl                         splunkdj
dbmanipulator.py        parsetest                       splunkmon
exporttool              parse_xml_buckets.py            splunk-optimize
fill_summary_index.py   pcregextest                     splunk-optimize-lex
genAuditKeys.py         pid_check.sh                    srm
genRootCA.sh            python                          tarit.py
genSignedServerCert.py  python2                         tocsv.py
genSignedServerCert.sh  python2.7                       tsidxprobe
genWebCert.py           recover-metadata                tsidxprobe_plo
genWebCert.sh           rest_handler.py                 tsidx_scan.py
importtool              runScript.py                    untarit.py
installit.py            safe_restart_cluster_master.py  walklex
[root@server2 bin]# ls -l splunk
splunk               splunkdj             splunk-optimize
splunkd              splunkmon            splunk-optimize-lex
[root@server2 bin]# ls -l splunk^C
[root@server2 bin]# cp /root/
anaconda-ks.cfg    .createusers.swp   .ICEauthority      script.sh
.bash_history      createweb.sh       .lesshst           .ssh/
.bash_logout       createweb.sh.orig  .local/            stderr
.bash_profile      .cshrc             .mozilla/          .targetcli/
.bashrc            .dbus/             Music/             .tcshrc
.cache/            Desktop/           .mysql_history     Templates/
ca.crt             Documents/         original-ks.cfg    testfile
ca.csr             Downloads/         Pictures/          Videos/
ca.key             .elinks/           Public/            .xauth2PhtaQ
.config/           .esd_auth          random             .Xauthority
create12           .gnome2/           random1
createusers        .gnome2_private/   .rnd
[root@server2 bin]# cp /root/Downloads/Splunk-Enterprise-v7.1.2-x86_Technet24/
CRACK/
ReadMe.txt
splunk-7.1.2-a0c72a66db66-x86-release.msi
splunk-7.1.2-a0c72a66db66-x86-release.msi.md5
Technet24.url
[root@server2 bin]# cp /root/Downloads/Splunk-Enterprise-v7.1.2-x86_Technet24/CR                                                      ACK/
adsldpc.dll                    traitor.dll
splunkEnterpriseTechnet24.lic
[root@server2 bin]# cp /root/Downloads/Splunk-Enterprise-v7.1.2-x86_Technet24/CR                                                      ACK/splunkEnterpriseTechnet24.lic .
[root@server2 bin]# sp
spacewalk-channel  spdsend            spice-vdagent      split
spd-conf           speaker-test       spice-vdagentd     sprof
spd-say            speech-dispatcher  splain
[root@server2 bin]# pwd
/opt/splunk/bin
[root@server2 bin]# /opt/splunk/bin/./splunk start
SPLUNK SOFTWARE LICENSE AGREEMENT

............
modification, disclosure or transfer of this commercial product and data, is
restricted in accordance with 48 C.F.R. Section 12.211, 48 C.F.R. Section
12.212, 48 C.F.R. Section 227.7102-2, and 48 C.F.R. Section 227.7202, as
applicable. Consistent with 48 C.F.R. Section 12.211, 48 C.F.R. Section
--More--(52%)


Splunk Software License Agreement 10.01.2018
Do you agree with this license? [y/n]:      y
Do you agree with this license? [y/n]: y

This appears to be your first time running this version of Splunk.

Splunk software must create an administrator account during startup. Otherwise,
Create credentials for the administrator account.
Characters do not appear on the screen when you type in credentials.

Please enter an administrator username: root
Password must contain at least:
   * 8 total printable ASCII character(s).
Please enter a new password:
Please confirm new password:
Copying '/opt/splunk/etc/openldap/ldap.conf.default' to '/opt/splunk/etc/openldap/ldap.conf'.
Generating RSA private key, 2048 bit long modulus
.......................................+++++
........................................................................................+++++
e is 65537 (0x10001)
writing RSA key

Generating RSA private key, 2048 bit long modulus
..............................................................................................................+++++
........+++++
e is 65537 (0x10001)
writing RSA key

Moving '/opt/splunk/share/splunk/search_mrsparkle/modules.new' to '/opt/splunk/share/splunk/search_mrsparkle/modules'.

Splunk> Like an F-18, bro.

Checking prerequisites...
        Checking http port [8000]: open
        Checking mgmt port [8089]: open
        Checking appserver port [127.0.0.1:8065]: open
        Checking kvstore port [8191]: open
        Checking configuration...  Done.
                Creating: /opt/splunk/var/lib/splunk
                Creating: /opt/splunk/var/run/splunk
                Creating: /opt/splunk/var/run/splunk/appserver/i18n
                Creating: /opt/splunk/var/run/splunk/appserver/modules/static/cs                                                      s
                Creating: /opt/splunk/var/run/splunk/upload
                Creating: /opt/splunk/var/spool/splunk
                Creating: /opt/splunk/var/spool/dirmoncache
                Creating: /opt/splunk/var/lib/splunk/authDb
                Creating: /opt/splunk/var/lib/splunk/hashDb
New certs have been generated in '/opt/splunk/etc/auth'.
        Checking critical directories...        Done
        Checking indexes...
                Validated: _audit _internal _introspection _telemetry _thefishbucket history main summary
        Done
        Checking filesystem compatibility...  Done
        Checking conf files for problems...
        Done
        Checking default conf files for edits...
        Validating installed files against hashes from '/opt/splunk/splunk-7.2.3-06d57c595b80-linux-2.6-x86_64-manifest'
        All installed files intact.
        Done
All preliminary checks passed.

Starting splunk server daemon (splunkd)...
Generating a 2048 bit RSA private key
...+++++
................................................................................                                                      ........................+++++
writing new private key to 'privKeySecure.pem'
-----
Signature ok
subject=/CN=server2.expanor.local/O=SplunkUser
Getting CA Private Key
writing RSA key
Done
                                                           [  OK  ]

Waiting for web server at http://127.0.0.1:8000 to be available...... Done


If you get stuck, we're here to help.
Look for answers here: http://docs.splunk.com

The Splunk web interface is at http://server2.expanor.local:8000

[root@server2 bin]#


[root@server2 bin]# firewall-cmd --add-port=8000/tcp --permanent
success
[root@server2 bin]# firewall-cmd --reload
success
[root@server2 bin]# firewall-cmd --list-all
public (default, active)
  interfaces: eno16780032 eno33559296 eno50338560 eno67109888 team0
  sources:
  services: dhcpv6-client mysql smtp ssh
  ports: 3306/tcp 8085/tcp 8000/tcp 5423/tcp
  masquerade: no
  forward-ports:
  icmp-blocks:
  rich rules:

[root@server2 bin]#

Wednesday, December 26, 2018

RHEL - Remove old Kernals on RHEL based systems

Remove old Kernals on RHEL based systems
===================================

1. Check current version of installed Kernel
[root@sam ~]# uname -a
Linux sam.expanor.local 3.10.0-327.el7.x86_64 #1 SMP Thu Nov 19 22:10:57 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

2. List all installed Kernels on your system

[root@sam ~]# rpm -q kernel
kernel-3.10.0-229.el7.x86_64
kernel-3.10.0-327.el7.x86_64


3. Remove old kernel packages
- You need to install cleanup package tool which in part of yum-utils package.

[root@sam ~]# yum search yum-utils
[root@sam ~]# yum install yum-utils
Package yum-utils-1.1.31-34.el7.noarch already installed and latest version
Nothing to do

[root@sam ~]# package-cleanup --help | grep old
    usage: package-cleanup --problems or --leaves or --orphans or --oldkernels
    --oldkernels        -> Remove old kernel and kernel-devel packages
[root@sam ~]# package-cleanup --help | grep count
    --count=KERNELCOUNT -> Number of kernel packages to keep on the system (default 2)

# package-cleanup -–oldkernels -–count=1

4. Now review the remaining kernels on your system

[root@sam ~]# rpm -q kernel
kernel-3.10.0-229.el7.x86_64
kernel-3.10.0-327.el7.x86_64

5. Automatically remove old kernels
Edit a file /etc/yum.conf and check the value for installonly_limit=. Change the vlue to the one you like. Just keep minimum of 2 version so set 2 or more number.

Thursday, December 20, 2018

vi editor - arrow key now working properly

By default, we use h, j, k and l keys for navigation on vi/vim text editor.
You can use arrow key to navigate around.
But sometimes, when you press arrow keys in the insert mode, it will insert newlines and prints A, B, C, D capital letters.

To fix this issue, set the following,
:set nocompatible

or add this entry to user's home directory

$ echo "set nocompatible" >> ~/.vimrc
$ echo "set nocompatible" >> ~/.exrc

RHEL - How to Reduce PDF file size

How to Reduce PDF file size

If you have a large size pdf file due to scanned document, you can reduce it using the tool called ps2pdf.
ps2pdf is available on linux based systems and its a part of ghostscript package.

Installation of a software

Redhat based systems
# yum install ghostscript

On Debian based systems
$ sudo apt-get install ghostscript

Compress PDF File In Linux
Once package is installed, run the command below.
$ ps2pdf old_file.pdf new_file.pdf

$ du -sh *.pdf
5M old_file.pdf
500K new_file.pdf

Tuesday, December 18, 2018

RHEL7 - Set up a secure HTTPS server with SSL


  1. Install httpd packages for default page display

Verify that you have httpd package is installed and default page is working as expected.
[root@server2 ~]# rpm -qa | grep httpd
httpd-tools-2.4.6-40.el7.x86_64
httpd-manual-2.4.6-40.el7.noarch
httpd-2.4.6-40.el7.x86_64
[root@server2 ~]# yum install httpd
[root@server2 ~]# echo "This is a test default page" >/var/www/html/index.html
[root@server2 ~]# systemctl status httpd
[root@server2 ~]# systemctl start httpd
[root@server2 ~]# systemctl enable httpd
[root@server2 ~]# elinks http://localhost

  1. Allow http on firewall

Allow apache http port 80 and https port 443

To check run the command
[root@server2 ~]# firewall-cmd --list-all
if you didn't see the ports on output, add them

[root@server2 ~]# firewall-cmd --permanent --add-port=80/tcp
[root@server2 ~]# firewall-cmd --permanent --add-port=443/tcp
[root@server2 ~]# firewall-cmd --reload


  1. Now, Install SSL packages

We need ssl package to generate the keys. Check to see if its already installed.
[root@server2 ~]# rpm -qa | grep mod_ssl
mod_ssl-2.4.6-40.el7.x86_64
[root@server2 ~]# rpm -qa | grep openssl
openssl-1.0.1e-42.el7_1.9.x86_64
openssl-libs-1.0.1e-42.el7_1.9.x86_64

If not installed, install it
[root@server2 ~]# yum install mod_ssl openssl


  1. Now, generate certificates.

a. Generate self-signed certificate (key) with 2048 bit encryption
[root@server2 ~]# openssl genrsa -out ca.key 2048
Generating RSA private key, 2048 bit long modulus
.........................................................................................................................+++
............................................+++
e is 65537 (0x10001)
[root@server2 ~]#

b. Generate certificate signing request (csr)
[root@server2 ~]# openssl req -new -key ca.key -out ca.csr
just follow the prompt.

c. SSL certificate
Note: self-signed certificate (csr of x509 type) is valid for a year.

[root@server2 ~]# openssl x509 -req -days 365 -in ca.csr -signkey ca.key -out ca.crt
Signature ok
Getting Private key

[root@server2 ~]# ls -ltr
-rw-r--r--. 1 root root 1679 Dec 18 23:07 ca.key
-rw-r--r--. 1 root root  997 Dec 18 23:10 ca.csr
-rw-r--r--. 1 root root 1188 Dec 18 23:11 ca.crt

Once these certificates are created, you need to copy to the right directory location as follows.

[root@server2 ~]# cp ca.crt /etc/pki/tls/certs/
[root@server2 ~]# cp ca.key ca.csr /etc/pki/tls/private/

Note: if you copied these certs from different location, you have
to run the semanage command to apply right context. Just verify ..
for eg,
[root@server2 ~]# wget http://192.168.10.120/certs/ca.crt
[root@server2 ~]# mv ca.crt /etc/pki/tls/certs/
[root@server2 ~]# ls -lZd /etc/pki/tls/certs/
drwxr-xr-x. root root system_u:object_r:cert_t:s0      /etc/pki/tls/certs/
[root@server2 ~]# ls -lZd /etc/pki/tls/certs/ca.crt
-rw-r--r--. root root unconfined_u:object_r:cert_t:s0  /etc/pki/tls/certs/ca.crt
and so on

  1. Now, configure your server with the certificates.

[root@server2 ~]# mkdir /var/www/html/best.expanor.local
[root@server2 ~]# echo "Best.expanor.local" >/var/www/html/best.expanor.local/index.html
[root@server2 ~]# systemctl restart httpd
[root@server2 ~]# cat /etc/httpd/conf.d/spage.conf
<virtualhost 192.168.10.122:443>
        servername best.expanor.local
        documentroot best.expanor.local
        directoryindex  index.html
        sslengine on
        sslcertificatefile /etc/pki/tls/certs/ca.crt
        sslcertificatekeyfile /etc/pki/tls/private/ca.key
</virtualhost>

Note: You append/specify sslengine , sshcertificate file, and sslcertificatekeyfile.

[root@server2 ~]# vi /etc/hosts
192.168.10.122  best.expanor.local
[root@server2 ~]# systemctl restart httpd

Or

You can directly edit ssl.conf file which is created by default.

# vi /etc/httpd/conf.d/ssl.conf
Go to the section <VirtualHost _default_:443>.
Uncomment the DocumentRoot and ServerName line and replace example.com with your domain/ipaddress.

<VirtualHost _default_:443>
DocumentRoot "/var/www/html"
ServerName 192.168.10.122:443

Now, go to line SSLCertificateFile and SSLCertificateKeyFile and change with your cert.

SSLEngine on
SSLCertificateFile /etc/pki/tls/certs/ca.crt
SSLCertificateKeyFile /etc/pki/tls/private/ca.key

Save the file and restart the service
# systemctl restart httpd

Or
[root@server2 ~]# cat /etc/httpd/conf.d/webpage.conf
<virtualhost 192.168.10.122:443>
        servername best.expanor.local
        documentroot /var/www/html/best.expanor.local
        directoryindex  index.html
        sslengine on
        sslcertificatefile /etc/pki/tls/certs/ca.crt
        sslcertificatekeyfile /etc/pki/tls/private/ca.key
</virtualhost>
[root@server2 ~]#

Note: Make sure to add hosts entry of domain
# cat /etc/hosts
192.168.10.122  best.expanor.local

  1. Verify it. Open your browser and type

Sunday, December 16, 2018

Monday, December 10, 2018

RHEL7 - Installing OpenStack



  rubygem-io-console.x86_64 0:0.4.2-34.el7_6
  rubygem-json.x86_64 0:1.7.7-34.el7_6
  rubygem-psych.x86_64 0:2.0.0-34.el7_6
  rubygem-rdoc.noarch 0:4.0.0-34.el7_6
  rubygem-rgen.noarch 0:0.6.6-2.el7
  rubygems.noarch 0:2.0.14.1-34.el7_6

Complete!
[root@ipa ~]# yum install openstack-packstack
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirror.cogentco.com
 * extras: mirror.cogentco.com
 * updates: mirror.cogentco.com
Package 1:openstack-packstack-12.0.0-2.el7.noarch already installed and latest version
Nothing to do
[root@ipa ~]# clear
[root@ipa ~]# echo "disable selinux"
disable selinux
[root@ipa ~]# df -h
Filesystem               Size  Used Avail Use% Mounted on
/dev/mapper/centos-root  8.0G  4.2G  3.9G  52% /
devtmpfs                 903M     0  903M   0% /dev
tmpfs                    920M     0  920M   0% /dev/shm
tmpfs                    920M   22M  898M   3% /run
tmpfs                    920M     0  920M   0% /sys/fs/cgroup
/dev/sda1                497M  212M  286M  43% /boot
tmpfs                    184M  4.0K  184M   1% /run/user/42
tmpfs                    184M   44K  184M   1% /run/user/1000
[root@ipa ~]# pvs
  PV         VG     Fmt  Attr PSize  PFree
  /dev/sda2  centos lvm2 a--  10.00g 4.00m
[root@ipa ~]# vgs
  VG     #PV #LV #SN Attr   VSize  VFree
  centos   1   2   0 wz--n- 10.00g 4.00m
[root@ipa ~]# fdisk -l

Disk /dev/sda: 17.2 GB, 17179869184 bytes, 33554432 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000d8fa2

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048     1026047      512000   83  Linux
/dev/sda2         1026048    22013951    10493952   8e  Linux LVM

Disk /dev/mapper/centos-root: 8589 MB, 8589934592 bytes, 16777216 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/centos-swap: 2147 MB, 2147483648 bytes, 4194304 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

[root@ipa ~]# vi /etc/selinux/config
[root@ipa ~]# systemctl disable firewalld
Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
[root@ipa ~]# systemctl status firewalld
● firewalld.service - firewalld - dynamic firewall daemon
   Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
   Active: active (running) since Fri 2018-12-07 08:33:36 EST; 3 days ago
     Docs: man:firewalld(1)
 Main PID: 5649 (firewalld)
   CGroup: /system.slice/firewalld.service
           └─5649 /usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid

Dec 07 08:33:34 rhel7.6.expanor.local systemd[1]: Starting firewalld - dynamic firewall dae.....
Dec 07 08:33:36 rhel7.6.expanor.local systemd[1]: Started firewalld - dynamic firewall daemon.
Hint: Some lines were ellipsized, use -l to show in full.
[root@ipa ~]# systemctl status NetworkManager status
● NetworkManager.service - Network Manager
   Loaded: loaded (/usr/lib/systemd/system/NetworkManager.service; enabled; vendor preset: enabl                                                                        ed)
   Active: active (running) since Fri 2018-12-07 08:33:36 EST; 3 days ago
     Docs: man:NetworkManager(8)
 Main PID: 5697 (NetworkManager)
   CGroup: /system.slice/NetworkManager.service
           └─5697 /usr/sbin/NetworkManager --no-daemon

Dec 08 22:09:30 rhel7.6.expanor.local NetworkManager[5697]: <info>  [1544324970.5305] device...)
Dec 08 22:09:30 rhel7.6.expanor.local NetworkManager[5697]: <info>  [1544324970.5308] device...)
Dec 08 22:09:30 rhel7.6.expanor.local NetworkManager[5697]: <info>  [1544324970.5310] manage...L
Dec 08 22:09:30 rhel7.6.expanor.local NetworkManager[5697]: <info>  [1544324970.5778] manage...E
Dec 08 22:09:30 rhel7.6.expanor.local NetworkManager[5697]: <info>  [1544324970.5780] policy...S
Dec 08 22:09:30 rhel7.6.expanor.local NetworkManager[5697]: <info>  [1544324970.5810] device....
Dec 08 22:09:30 rhel7.6.expanor.local NetworkManager[5697]: <info>  [1544324970.5816] manage...L
Dec 08 22:14:31 ipa.expanor.local NetworkManager[5697]: <info>  [1544325271.8679] hostname: ..."
Dec 08 22:14:31 ipa.expanor.local NetworkManager[5697]: <info>  [1544325271.8725] policy: se...)
Dec 10 22:42:02 ipa.expanor.local NetworkManager[5697]: <info>  [1544499722.2493] manager: k...d
Unit status.service could not be found.
Hint: Some lines were ellipsized, use -l to show in full.
[root@ipa ~]# systemctl disable NetworkManager
Removed symlink /etc/systemd/system/multi-user.target.wants/NetworkManager.service.
Removed symlink /etc/systemd/system/dbus-org.freedesktop.NetworkManager.service.
Removed symlink /etc/systemd/system/dbus-org.freedesktop.nm-dispatcher.service.
Removed symlink /etc/systemd/system/network-online.target.wants/NetworkManager-wait-online.servi                                                                        ce.
[root@ipa ~]# systemctl mask firewalld
Created symlink from /etc/systemd/system/firewalld.service to /dev/null.
[root@ipa ~]# systemctl mask NetworkManager
Created symlink from /etc/systemd/system/NetworkManager.service to /dev/null.
[root@ipa ~]# echo " 1. Make sure you have enought disk space available.
> 2. Assign Static IP address
> 3. Disable Selinux/Firewall
> 4. Disable NetworkManager"
 1. Make sure you have enought disk space available.
2. Assign Static IP address
3. Disable Selinux/Firewall
4. Disable NetworkManager
[root@ipa ~]# cat /etc/sysconfig/network-scripts/ifcfg-
ifcfg-ens192  ifcfg-lo
[root@ipa ~]# cat /etc/sysconfig/network-scripts/ifcfg-ens192
TYPE="Ethernet"
PROXY_METHOD="none"
BROWSER_ONLY="no"
#BOOTPROTO="dhcp"
BOOTPROTO="static"
DEFROUTE="yes"
IPV4_FAILURE_FATAL="no"
IPV6INIT="yes"
IPV6_AUTOCONF="yes"
IPV6_DEFROUTE="yes"
IPV6_FAILURE_FATAL="no"
IPV6_ADDR_GEN_MODE="stable-privacy"
NAME="ens192"
UUID="ddaf1fdc-e7c6-474d-8713-2b19315bf41f"
DEVICE="ens192"
ONBOOT="yes"
ETHTOOL_OPTS="wol d"
IPADDR="192.168.10.140"
PREFIX="24"
GATEWAY="192.168.10.1"
DNS1="192.168.10.110"
DOMAIN="192.168.10.120"
IPV6_PRIVACY="no"
[root@ipa ~]# echo "Now install OpenStack"
Now install OpenStack
[root@ipa ~]# packstack --allinone
Welcome to the Packstack setup utility

The installation log file is available at: /var/tmp/packstack/20181210-225648-zoz5cX/openstack-s                                                                        etup.log
Packstack changed given value  to required value /root/.ssh/id_rsa.pub

Installing:
Clean Up                                             [ DONE ]
Discovering ip protocol version                      [ DONE ]
Setting up ssh keys                                  [ DONE ]
Preparing servers                                    [ DONE ]
Pre installing Puppet and discovering hosts' details [ DONE ]
Preparing pre-install entries                        [ DONE ]
Setting up CACERT                                    [ DONE ]
Preparing AMQP entries                               [ DONE ]
Preparing MariaDB entries                            [ DONE ]
Fixing Keystone LDAP config parameters to be undef if empty[ DONE ]
Preparing Keystone entries                           [ DONE ]
Preparing Glance entries                             [ DONE ]
Checking if the Cinder server has a cinder-volumes vg[ DONE ]
Preparing Cinder entries                             [ DONE ]
Preparing Nova API entries                           [ DONE ]
Creating ssh keys for Nova migration                 [ DONE ]
Gathering ssh host keys for Nova migration           [ DONE ]
Preparing Nova Compute entries                       [ DONE ]
Preparing Nova Scheduler entries                     [ DONE ]
Preparing Nova VNC Proxy entries                     [ DONE ]
Preparing OpenStack Network-related Nova entries     [ DONE ]
Preparing Nova Common entries                        [ DONE ]
Preparing Neutron LBaaS Agent entries                [ DONE ]
Preparing Neutron API entries                        [ DONE ]
Preparing Neutron L3 entries                         [ DONE ]
Preparing Neutron L2 Agent entries                   [ DONE ]
Preparing Neutron DHCP Agent entries                 [ DONE ]
Preparing Neutron Metering Agent entries             [ DONE ]
Checking if NetworkManager is enabled and running    [ DONE ]
Preparing OpenStack Client entries                   [ DONE ]
Preparing Horizon entries                            [ DONE ]
Preparing Swift builder entries                      [ DONE ]
Preparing Swift proxy entries                        [ DONE ]
Preparing Swift storage entries                      [ DONE ]
Preparing Gnocchi entries                            [ DONE ]
Preparing Redis entries                              [ DONE ]
Preparing Ceilometer entries                         [ DONE ]
Preparing Aodh entries                               [ DONE ]
Preparing Puppet manifests                           [ DONE ]
Copying Puppet modules and manifests                 [ DONE ]
Applying 192.168.10.140_controller.pp
Testing if puppet apply is finished: 192.168.10.140_controller.pp  [ | ]


RHEL7- Extending xfs root filesystem on CentOS 7

kamal@192.168.10.140's password:
Last login: Mon Dec 10 22:35:38 2018 from 192.168.10.2
[kamal@ipa ~]$ df -h
Filesystem               Size  Used Avail Use% Mounted on
/dev/mapper/centos-root  8.0G  4.4G  3.7G  55% /
devtmpfs                 903M     0  903M   0% /dev
tmpfs                    920M     0  920M   0% /dev/shm
tmpfs                    920M   22M  898M   3% /run
tmpfs                    920M     0  920M   0% /sys/fs/cgroup
/dev/sda1                497M  212M  286M  43% /boot
tmpfs                    184M  4.0K  184M   1% /run/user/42
tmpfs                    184M   44K  184M   1% /run/user/1000
tmpfs                    184M     0  184M   0% /run/user/0
[kamal@ipa ~]$ su -
Password:
Last login: Mon Dec 10 22:35:52 EST 2018 on pts/1
[root@ipa ~]# fdisk -l

Disk /dev/sda: 17.2 GB, 17179869184 bytes, 33554432 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000d8fa2

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048     1026047      512000   83  Linux
/dev/sda2         1026048    22013951    10493952   8e  Linux LVM

Disk /dev/mapper/centos-root: 8589 MB, 8589934592 bytes, 16777216 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/centos-swap: 2147 MB, 2147483648 bytes, 4194304 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

[root@ipa ~]# fdisk /dev/sda
Welcome to fdisk (util-linux 2.23.2).

Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): n
Partition type:
   p   primary (2 primary, 0 extended, 2 free)
   e   extended
Select (default p):
Using default response p
Partition number (3,4, default 3):
First sector (22013952-33554431, default 22013952):
Using default value 22013952
Last sector, +sectors or +size{K,M,G} (22013952-33554431, default 33554431): $
Last sector, +sectors or +size{K,M,G} (22013952-33554431, default 33554431):
Using default value 33554431
Partition 3 of type Linux and of size 5.5 GiB is set

Command (m for help): p

Disk /dev/sda: 17.2 GB, 17179869184 bytes, 33554432 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000d8fa2

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048     1026047      512000   83  Linux
/dev/sda2         1026048    22013951    10493952   8e  Linux LVM
/dev/sda3        22013952    33554431     5770240   83  Linux

Command (m for help): t
Partition number (1-3, default 3):
Hex code (type L to list all codes): 8e
Changed type of partition 'Linux' to 'Linux LVM'

Command (m for help): p

Disk /dev/sda: 17.2 GB, 17179869184 bytes, 33554432 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000d8fa2

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048     1026047      512000   83  Linux
/dev/sda2         1026048    22013951    10493952   8e  Linux LVM
/dev/sda3        22013952    33554431     5770240   8e  Linux LVM

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)
Syncing disks.
[root@ipa ~]# partprobe -s
/dev/sda: msdos partitions 1 2 3
[root@ipa ~]# echo "If it does not work, you can use partx"
If it does not work, you can use partx
[root@ipa ~]# partx  -v -a /dev/sda
partition: none, disk: /dev/sda, lower: 0, upper: 0
/dev/sda: partition table type 'dos' detected
partx: /dev/sda: adding partition #1 failed: Device or resource busy
partx: /dev/sda: adding partition #2 failed: Device or resource busy
partx: /dev/sda: adding partition #3 failed: Device or resource busy
partx: /dev/sda: error adding partitions 1-3
[root@ipa ~]# fdisk -l

Disk /dev/sda: 17.2 GB, 17179869184 bytes, 33554432 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000d8fa2

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048     1026047      512000   83  Linux
/dev/sda2         1026048    22013951    10493952   8e  Linux LVM
/dev/sda3        22013952    33554431     5770240   8e  Linux LVM

Disk /dev/mapper/centos-root: 8589 MB, 8589934592 bytes, 16777216 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/centos-swap: 2147 MB, 2147483648 bytes, 4194304 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

[root@ipa ~]# pvcreate /dev/sda3
  Physical volume "/dev/sda3" successfully created.
[root@ipa ~]# vgs
  VG     #PV #LV #SN Attr   VSize  VFree
  centos   1   2   0 wz--n- 10.00g 4.00m
[root@ipa ~]# vgextend centos /dev/sda3
  Couldn't create temporary archive name.
[root@ipa ~]# vgs
  VG     #PV #LV #SN Attr   VSize  VFree
  centos   1   2   0 wz--n- 10.00g 4.00m
[root@ipa ~]# df -h .
Filesystem               Size  Used Avail Use% Mounted on
/dev/mapper/centos-root  8.0G  4.8G  3.3G  60% /
[root@ipa ~]# vgextend centos /dev/sda3
  Volume group "centos" successfully extended
[root@ipa ~]# pvscan
  PV /dev/sda2   VG centos          lvm2 [10.00 GiB / 4.00 MiB free]
  PV /dev/sda3   VG centos          lvm2 [5.50 GiB / 5.50 GiB free]
  Total: 2 [15.50 GiB] / in use: 2 [15.50 GiB] / in no VG: 0 [0   ]
[root@ipa ~]# vgs
  VG     #PV #LV #SN Attr   VSize  VFree
  centos   2   2   0 wz--n- 15.50g 5.50g
[root@ipa ~]# df -h .
Filesystem               Size  Used Avail Use% Mounted on
/dev/mapper/centos-root  8.0G  4.9G  3.2G  61% /
[root@ipa ~]# xfs_info /dev/mapper/centos-root
meta-data=/dev/mapper/centos-root isize=512    agcount=4, agsize=524288 blks
         =                       sectsz=512   attr=2, projid32bit=1
         =                       crc=1        finobt=0 spinodes=0
data     =                       bsize=4096   blocks=2097152, imaxpct=25
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0 ftype=1
log      =internal               bsize=4096   blocks=2560, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0
[root@ipa ~]# echo "now, extend your logical volume using whole partition, rather then specifyting particular size"
now, extend your logical volume using whole partition, rather then specifyting particular size
[root@ipa ~]# lvextend /dev/mapper/centos-root /dev/sda3
  Size of logical volume centos/root changed from 8.00 GiB (2048 extents) to 13.50 GiB (3456 extents).
  Logical volume centos/root successfully resized.
[root@ipa ~]# lvs
  LV   VG     Attr       LSize  Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  root centos -wi-ao---- 13.50g
  swap centos -wi-ao----  2.00g
[root@ipa ~]# lvscan
  ACTIVE            '/dev/centos/root' [13.50 GiB] inherit
  ACTIVE            '/dev/centos/swap' [2.00 GiB] inherit
[root@ipa ~]# df -h .
Filesystem               Size  Used Avail Use% Mounted on
/dev/mapper/centos-root  8.0G  4.9G  3.2G  62% /
[root@ipa ~]# echo "You just extended LVM, now you have to extend xfs filessytem"
You just extended LVM, now you have to extend xfs filessytem
[root@ipa ~]# xfs_growfs /dev/mapper/centos-root
meta-data=/dev/mapper/centos-root isize=512    agcount=4, agsize=524288 blks
         =                       sectsz=512   attr=2, projid32bit=1
         =                       crc=1        finobt=0 spinodes=0
data     =                       bsize=4096   blocks=2097152, imaxpct=25
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0 ftype=1
log      =internal               bsize=4096   blocks=2560, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0
data blocks changed from 2097152 to 3538944
[root@ipa ~]# echo "It says data blocks changed from 2097152 to 3538944"
It says data blocks changed from 2097152 to 3538944
[root@ipa ~]# df -h .
Filesystem               Size  Used Avail Use% Mounted on
/dev/mapper/centos-root   14G  5.0G  8.6G  37% /
[root@ipa ~]#

Thursday, November 15, 2018

From Code to Package

Here is an basic steps that involve writing simple code and packaging code into software bundle.

1. Write simple code
- Write simple code first. Test it. Document it. and gradually add more code.

2. Save code on easyly accessible location
- If its a larger program, make it available to everyone in your group.

3. Compile the code
-  Once you write code, the code need to compile.

4. Review error and code
- If you find any error on code, fix it.

5. Perform unit test
- What that particular block code does, test it. Review the error.

6. Test the functionality
- Make sure verify what code need to do, and how it does after compiling the code.

7. Build a software package
- After installing, testing, validating the functionality of your code/software, bundle a software package for the operating system you intend to install. We will build RPM package.

8. Store on repository
- Store your software package on easily accessible locatin such as software repository.


Next, creating RPM package

Friday, October 5, 2018

Ops Center Instalation and Configuration

OpsCenter : 192.168.10.80
physical host: 192.168.10.85
physical host: 192.168.10.90

Ops_Center_instalation_and_Configuration

Download the software from oracle.com
Follow the installation document
https://docs.oracle.com/cd/E27363_01/doc.121/e27333/toc.htm#OPCHK111
https://www.oracle.com/technetwork/oem/host-server-mgmt/opscenterhareference-2030037.pdf


root@vcloud-mg-v01:/var/tmp/downloads# cd /var/opt
root@vcloud-mg-v01:/var/opt# ls
BART  sun
root@vcloud-mg-v01:/var/opt# cd sun
root@vcloud-mg-v01:/var/opt/sun# ls
root@vcloud-mg-v01:/var/opt/sun# ls -ltr
total 0
root@vcloud-mg-v01:/var/opt/sun# ulimit -a
core file size          (blocks, -c) unlimited
data seg size           (kbytes, -d) unlimited
file size               (blocks, -f) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 10
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 29995
virtual memory          (kbytes, -v) unlimited
root@vcloud-mg-v01:/var/opt/sun# ulimit -Sn
1024
root@vcloud-mg-v01:/var/opt/sun# ulimit -Hn
65536
root@vcloud-mg-v01:/var/tmp# mkdir Software
root@vcloud-mg-v01:/var/tmp# cd Software/
root@vcloud-mg-v01:/var/tmp/Software# unzip ../OCDoctor-latest.zip
Archive:  ../OCDoctor-latest.zip
   creating: OCDoctor/
   creating: OCDoctor/proxy/

root@vcloud-mg-v01:/var/tmp#

root@vcloud-mg-v01:/var/tmp/Software/OCDoctor#  ./OCDoctor.sh --ec-prereq
Ops Center Doctor 4.68  [SunOS11.3.34.4]
========== Checking 12c Enterprise Controller Requirements ... ====================
OK: Size of Main Memory: 24576 MB
OK: ZFS ARC cache is already limited
OK: Size of swap space is good for local or remote database installation:  16383 MB
OK: /tmp size is not limited in /etc/vfstab
OK: Found enough disk space on /var/opt/sun (244G)
OK: Found enough disk space on /opt (49G)
OK: Found enough disk space on /tmp (35G)
OK: no running Cacao instance found
OK: None or unique Cacao SMF instance found
OK: All required packages are installed
OK: No leftover package from OS Provisioning found
OK: Connected to the Solaris repository successfully (http://192.168.10.200/)
OK: Found only one pkg/server instance
WARNING: Did not find /etc/netboot folder (Bug 15781475).
         Run 'mkdir /etc/netboot' prior to installing the EC to avoid issues with Linux OS provisioning from this S11 colocated proxy.
         You can ignore this message if you are not planning on using the colocated proxy for Linux OS provisioning.

OK: Solaris 11 Update 3 is installed
OK: Not Solaris 11.3.14|15|16
OK: No known conflicting packages exist
OK: Patches for extendedFILE library are installed
OK: /etc/profile has the umask of 022
OK: /etc/profile.secld-100218:122302 has the umask of 022
OK: Verified correct umask
OK: Network ports needed by Management node and Proxy are not in use
OK: All required SMF services are online
OK: Checked for ssh requirements
OK: No SUNWjass installed
OK: Checked for user & group 'webservd'
OK: Checked for output messages from /etc/profile
OK: No partially installed packages
OK: prtdiag doesn't hang
OK: This is not a T3 machine (if it was then a workaround may be needed)
OK: No Solaris 11 leftover packages found
OK: /usr/local is writeable.
OK: Locales are OK ("en_US.UTF-8")
OK: No '*' in /etc/auto_home
OK: Directory /guests does not exist.
OK: Hostname vcloud-mg-v01 doesn't resolve to 127.0.0.1
OK: Hostname vcloud-mg-v01 resolves to 192.168.10.80 and back properly
OK: localhost resolves to 127.0.0.1
OK: DNS does not unexpectedly resolve hostname '_default_'
OK: No development build of cacao is installed
WARNING: The service filesystem/autofs is not online.
         The installation may fail trying to add the 'oracleoc' user.
         To enable it, run 'svcadm enable autofs'.

OK: package hmp-tools@2.2.1 is not installed
OK: package hmp-libs@2.2.1 is not installed
OK: ulimit -Sn is 1024
OK: ulimit -Hn is 65536
OK: No leftover /var/js directory from a previous installation found.
OK: No leftover SMF services from a previous OpsCenter EC, PC or Agent installation found.
OK: Found 2 DB installation files for OpsCenter 12.3.1 or higher in /var/tmp/downloads

        A co-located Oracle Database will get installed as part of the overall OpsCenter installation.
        To improve DB performance it is recommended to use dedicated zpools for DB Datafiles and redo logs.
        The OCDoctor toolbox contains the script '.../OCDoctor/toolbox/colo_db_zfs_layout' to assist
        you in creating dedicated filesystems with the recommended zfs filesystem parameter prior to
        the OpsCenter installation.

        Please, review the document '.../OCDoctor/howto/howto_improve_DB_performance_using_zfs_layout.txt'
        for more details.



root@vcloud-mg-v01:/var/tmp/Software/OCDoctor# svcadm enable autofs
root@vcloud-mg-v01:/var/tmp/Software/OCDoctor# ls -l howto/howto_improve_DB_performance_using_zfs_layout.txt
-rwxr-xr-x   1 root     root        3637 May 29  2017 howto/howto_improve_DB_performance_using_zfs_layout.txt
root@vcloud-mg-v01:/var/tmp/Software/OCDoctor# rmdir /etc/netboot


#./colo_db_zfs_layout
Usage: colo_db_zfs_layout [-v|--pre-install|--post-install]
                -v              # prints out script version number
                --pre-install   # Prepares zfs filesystems before EC installation to optimize
                                  database performance and configures the database to use the
                                  new layout if required
                --post-install  # Creates zfs filesystems after EC installation and
                                  relocates/reconfigures the database files to optimize
                                  database performance

====================================================================
 --pre-install    *** Detailed Description ***
The user will be prompted for zpool names for the desired location of key Ops Center components.

This script will layout separate zfs filesystems for /var/opt/sun/xvm (base Ops Center directories) and
/var/opt/sun/xvm/oracle/oradata/OCDB (database files and redo logs) directories on the zpool specified
[Ops Center pool]. In addition, it will tune the zfs filesystem under the database toan 8K blocksize to
match the Oracle database and improve database performance.

If a different zpool is specified for the [REDO log pool], a separate zfs filesystem
/var/opt/sun/xvm/oracle/oradata/OCDB/REDO will be created on this zpool and tuned toan 8K blocksize. It will
also create a script and sql file in /var/tmp that will have to be executed after the completion of the Ops
Center install, to move the redo logs into the new REDO filesystem. Placing the database redo logs on a
separate zpool (separate disk spindle) will spread thedatabase IOPS load across more disk spindles further

 --post-install   *** Detailed Description ***
IMPORTANT: This functionality is not implemented yet.
root@vcloud-mg-v01:/var/tmp/Software/OCDoctor#

================================

You have new mail.
root@vcloud-mg-v01:~# cd /var/tmp
root@vcloud-mg-v01:/var/tmp# ls
bart
bart11022016.tar
coreutils-8.13
coreutils-8.13.tar
downloads
enterprise-controller.Solaris.i386.12.3.3.1801.tar
enterprise-controller.Solaris.i386.12.3.3.1801.tar.zip
errlog-secld-100218:122302
gdate
jdk-8u162-solaris-x64.tar
OC
OCDoctor-latest.zip
secld-solaris11
secld-solaris11-new.tar
Software
standalone-1002.tar.gz
VmTools
root@vcloud-mg-v01:/var/tmp# ls -ltr
total 18914986
drwxr-xr-x   2 root     root           7 Nov  2  2016 bart
-rw-------   1 kancho  staff     253440 Nov  2  2016 bart11022016.tar
drwxr-xr-x   2 root     root          14 Jan  4  2017 secld-solaris11
-rw-r--r--   1 root     root     4755434496 Sep 22  2017 enterprise-controller.S                                                                                                                                                             olaris.i386.12.3.3.1801.tar
drwxr-xr-x   3 root     root           5 Oct  1 14:50 VmTools
-rw-r--r--   1 root     root     1883451 Oct  1 16:10 OCDoctor-latest.zip
-rw-r--r--   1 root     root     263990272 Oct  1 16:56 jdk-8u162-solaris-x64.ta                                                                                                                                                             r
drwxrwxrwx   2 root     root           4 Oct  2 00:27 downloads
-rw-r--r--   1 root     root     4104073727 Oct  2 02:30 enterprise-controller.S                                                                                                                                                             olaris.i386.12.3.3.1801.tar.zip
-rw-r--r--   1 root     root      129536 Oct  2 12:20 secld-solaris11-new.tar
-rw-r--r--   1 root     root           0 Oct  2 12:23 errlog-secld-100218:122302
-rw-------   1 kancho  staff    45608960 Oct  2 13:28 coreutils-8.13.tar
drwxr-xr-x  12 root     root          48 Oct  2 13:32 coreutils-8.13
-rwx------   1 kancho  staff     184548 Oct  2 13:52 gdate
drwxr-xr-x   4 root     root           4 Oct  2 15:12 Software
drwxr-xr-x   4 root     root           4 Oct  2 16:43 OC
-rw-------   1 root     root     505798159 Oct  2 20:12 standalone-1002.tar.gz
root@vcloud-mg-v01:/var/tmp# cd Software
root@vcloud-mg-v01:/var/tmp/Software# ls
OCDoctor           xvmoc_full_bundle
root@vcloud-mg-v01:/var/tmp/Software# cd xvmoc_full_bundle/
root@vcloud-mg-v01:/var/tmp/Software/xvmoc_full_bundle# ls
install                   OpsCenterUpgrades.README  xvmoc_proxy_update
Linux_i686                SunOS_i386                xvmoc_update_bundle
ocasmp                    SunOS_sparc
root@vcloud-mg-v01:/var/tmp/Software/xvmoc_full_bundle# w
  9:37am  up 20:57,  1 user,  load average: 0.00, 0.00, 0.00
User     tty           login@  idle   JCPU   PCPU  what
kaledai  pts/1         9:35am                      w
root@vcloud-mg-v01:/var/tmp/Software/xvmoc_full_bundle# w
  9:37am  up 20:57,  1 user,  load average: 0.00, 0.00, 0.00
User     tty           login@  idle   JCPU   PCPU  what
kaledai  pts/1         9:35am                      w
root@vcloud-mg-v01:/var/tmp/Software/xvmoc_full_bundle# sync;sync;sync
root@vcloud-mg-v01:/var/tmp/Software/xvmoc_full_bundle# beadm list
BE                    Flags Mountpoint Space  Policy Created
--                    ----- ---------- -----  ------ -------
pBE_07202018          NR    /          52.40G static 2018-10-01 12:47
pBE_07202018-backup-1 -     -          63.51M static 2018-10-02 12:24
pBE_10022018_preSTIG  -     -          63.42M static 2018-10-02 12:20
solaris               -     -          15.86M static 2018-10-01 12:20
root@vcloud-mg-v01:/var/tmp/Software/xvmoc_full_bundle# reboot

Password:
kaledai@vcloud-mg-v01:~$ sudo su -

root@vcloud-mg-v01:~# df -h
Filesystem             Size   Used  Available Capacity  Mounted on
rpool/ROOT/pBE_07202018
                        98G   5.3G        40G    12%    /
/devices                 0K     0K         0K     0%    /devices
/dev                     0K     0K         0K     0%    /dev
ctfs                     0K     0K         0K     0%    /system/contract
proc                     0K     0K         0K     0%    /proc
mnttab                   0K     0K         0K     0%    /etc/mnttab
swap                    38G   804K        38G     1%    /system/volatile
objfs                    0K     0K         0K     0%    /system/object
sharefs                  0K     0K         0K     0%    /etc/dfs/sharetab
rpool/ROOT/pBE_07202018/var
                        98G    21G        40G    35%    /var
/usr/lib/libc/libc_hwcap1.so.1
                        45G   5.3G        40G    12%    /lib/libc.so.1
fd                       0K     0K         0K     0%    /dev/fd
swap                    38G     4K        38G     1%    /tmp
rpool/VARSHARE          98G   2.6M        40G     1%    /var/share
rpool/VARSHARE/zones    98G    31K        40G     1%    /system/zones
rpool/export            98G    32K        40G     1%    /export
rpool/export/home       98G    33K        40G     1%    /export/home
rpool/export/home/kancho
                        98G    38K        40G     1%    /export/home/kancho
rpool/export/home/kaledai
                        98G    34K        40G     1%    /export/home/kaledai
rpool                   98G   3.5M        40G     1%    /rpool
sopcmgv01-pool/FS_dataxvm
                       244G   483M       244G     1%    /var/opt/sun
rpool/VAR-AUDIT        3.0G   2.8M       3.0G     1%    /var/share/audit
rpool/VARSHARE/pkg      98G    32K        40G     1%    /var/share/pkg
rpool/VARSHARE/pkg/repositories
                        98G    31K        40G     1%    /var/share/pkg/repositories
root@vcloud-mg-v01:~# cd /var/tmp/Software/
root@vcloud-mg-v01:/var/tmp/Software# ls
OCDoctor           xvmoc_full_bundle
root@vcloud-mg-v01:/var/tmp/Software# cd xvmoc_full_bundle/
root@vcloud-mg-v01:/var/tmp/Software/xvmoc_full_bundle# ls
install                   ocasmp                    SunOS_i386                xvmoc_proxy_update
Linux_i686                OpsCenterUpgrades.README  SunOS_sparc               xvmoc_update_bundle
root@vcloud-mg-v01:/var/tmp/Software/xvmoc_full_bundle# pwd
/var/tmp/Software/xvmoc_full_bundle
root@vcloud-mg-v01:/var/tmp/Software/xvmoc_full_bundle# ls -ltr
total 38
drwxr-xr-x   2 950108   staff          3 Sep 22  2017 ocasmp
drwxr-xr-x   3 950108   staff          3 Sep 22  2017 Linux_i686
drwxr-xr-x   3 950108   staff          3 Sep 22  2017 SunOS_sparc
drwxr-xr-x   3 950108   staff          3 Sep 22  2017 SunOS_i386
drwxr-xr-x   6 950108   staff         10 Sep 22  2017 xvmoc_update_bundle
drwxr-xr-x   6 950108   staff         10 Sep 22  2017 xvmoc_proxy_update
-r-xr-xr-x   1 950108   staff       9045 Sep 22  2017 install
lrwxrwxrwx   1 950108   staff         44 Oct  2 15:13 OpsCenterUpgrades.README -> xvmoc_update_bundle/OpsCenterUpgrade                                                                                                                       s.README
root@vcloud-mg-v01:/var/tmp/Software/xvmoc_full_bundle# more OpsCenterUpgrades.README

root@vcloud-mg-v01:/var/tmp/Software/xvmoc_full_bundle# pwd
/var/tmp/Software/xvmoc_full_bundle
root@vcloud-mg-v01:/var/tmp/Software/xvmoc_full_bundle# ls
install                   Linux_i686                ocasmp                    OpsCenterUpgrades.README  SunOS_i386                SunOS_sparc               xvmoc_proxy_update        xvmoc_update_bundle
root@vcloud-mg-v01:/var/tmp/Software/xvmoc_full_bundle# cd ../OCDoctor/
root@vcloud-mg-v01:/var/tmp/Software/OCDoctor# ls
agent                    cli                      functions                Manifest.txt             post-upgrade.sh          product_metadata_update  tuning                   whatisblobid
AUTHORS                  Debug.nfo                GDD                      OCDoctor.sh              pre-upgrade.sh           proxy                    tuning_proxy
CHANGELOG                ec                       howto                    pis                      prereq                   toolbox                  version
root@vcloud-mg-v01:/var/tmp/Software/OCDoctor# ./OCDoctor.sh --ec-prereq

root@vcloud-mg-v01:/var/tmp/Software/OCDoctor# mkdir /etc/netboot
root@vcloud-mg-v01:/var/tmp/Software/OCDoctor# ls
agent                    cli                      functions                Manifest.txt             post-upgrade.sh          product_metadata_update  tuning                   whatisblobid
AUTHORS                  Debug.nfo                GDD                      OCDoctor.sh              pre-upgrade.sh           proxy                    tuning_proxy
CHANGELOG                ec                       howto                    pis                      prereq                   toolbox                  version

root@vcloud-mg-v01:/var/tmp/Software/OCDoctor# ./OCDoctor.sh --ec-prereq

root@vcloud-mg-v01:/var/tmp/Software/OCDoctor# groupadd -g 102 dba
root@vcloud-mg-v01:/var/tmp/Software/OCDoctor# groupadd -g 501 oinstall
root@vcloud-mg-v01:/var/tmp/Software/OCDoctor#
root@vcloud-mg-v01:/var/tmp/Software/OCDoctor#
root@vcloud-mg-v01:/var/tmp/Software/OCDoctor# more /etc/user_attr
#
# Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
#
# The system provided entries are stored in different files
# under "/etc/user_attr.d".  They should not be copied to this file.
#
# Only local changes should be stored in this file.
#
root@vcloud-mg-v01:/var/tmp/Software/OCDoctor# cd ../../OC
root@vcloud-mg-v01:/var/tmp/OC# ls
OCDoctor           xvmoc_full_bundle
root@vcloud-mg-v01:/var/tmp/OC# cd xvmoc_full_bundle/
root@vcloud-mg-v01:/var/tmp/OC/xvmoc_full_bundle# pwd
/var/tmp/OC/xvmoc_full_bundle
root@vcloud-mg-v01:/var/tmp/OC/xvmoc_full_bundle# ls
install                   Linux_i686                ocasmp                    OpsCenterUpgrades.README  SunOS_i386                SunOS_sparc               xvmoc_proxy_update        xvmoc_update_bundle
root@vcloud-mg-v01:/var/tmp/OC/xvmoc_full_bundle# ./install


Failed Step:  Check for installation prerequisites.
The following is a portion of the installer
log which may indicate the cause of the error.
If this does not indicate the cause of the
error, you will need to view the full log
file. More information on how to do that is
available below.
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

max_nprocs value found in or under /etc/system:    50000
This vers, 0.175.3.34.0.4.0, is greater than or equal to 0.175.2.0.0.42.0
/usr/bin/pkgrepo list -s http://192.168.10.200/  pkg://solaris/entire@0.5.11,5.11-0.175.3.34.0.4.0:20180628T213223Z
The configured solaris publisher supports this version of Oracle Solaris 11
Testing Shell Limits
localhost is alive

error: Need to update/set /etc/system. Add: 'set zfs:zfs_arc_max=9771460608' to
        /etc/system. The system will require a reboot after making this change!

Number of precheck error messages: 1, number of warnings: 0

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Please fix the problem and then try this step again.
For a full log of the failed install see the file: /var/tmp/opscenter/installer.log.4008.

t. Try this step again (correct the failure before proceeding)
x. Exit
Enter selection: (t/x) x
Installation aborted by user.
root@vcloud-mg-v01:/var/tmp/OC/xvmoc_full_bundle# vi /etc/system
root@vcloud-mg-v01:/var/tmp/OC/xvmoc_full_bundle# more /etc/system

* set zfs:zfs_arc_max=2147483648
* set zfs:zfs_arc_min=67108864
set zfs:zfs_arc_max=9771460608
set zfs:zfs_arc_min=67108864
* Setting max file descriptors
set rlim_fd_max=65536
set rlim_fd_cur=1024
* To prevent buffer overflow
* Note: These settings are obselete in Solaris 11.3
* set noexec_user_stack = 1
* set noexec_user_stack_log = 1
* Enable BSM Auditing
set c2audit:audit_load = 1
* Monitor for unauthorized connections of mobile devices
exclude: scsa2usb
* OEM 12c OPS center Embedded DB Kernel Parameters
set pidmax=60000
set maxusers=4096
set maxuprc=50000
set max_nprocs=50000
root@vcloud-mg-v01:/var/tmp/OC/xvmoc_full_bundle#  sync;sync;sync
root@vcloud-mg-v01:/var/tmp/OC/xvmoc_full_bundle# reboot
Using username "kaledai".

kaledai@vcloud-mg-v01:~$ sudo su -

root@vcloud-mg-v01:~# passwd root
New Password:
Re-enter new Password:
passwd: password successfully changed for root
root@vcloud-mg-v01:~# vi /etc/shadow
root@vcloud-mg-v01:~# cd /var/tmp/OC
root@vcloud-mg-v01:/var/tmp/OC# cd xvmoc_full_bundle/
root@vcloud-mg-v01:/var/tmp/OC/xvmoc_full_bundle# ls
install                   ocasmp                    SunOS_i386                xvmoc_proxy_update
Linux_i686                OpsCenterUpgrades.README  SunOS_sparc               xvmoc_update_bundle
root@vcloud-mg-v01:/var/tmp/OC/xvmoc_full_bundle# ./install

Oracle Configuration Manager already configured.

    Ops Center Enterprise Controller Installer
    (version 12.3.3.1801 on SunOS)

 1. Check for installation prerequisites.                                                                                           [Partially Run]
 2. Configure file systems.                                                                                                         [Not Completed]
 3. Install prerequisite packages.                                                                                                  [Not Completed]
 4. Install Agent components.                                                                                                       [Not Completed]
 5. Create Deployable Proxy Bundles.                                                                                                [Not Completed]
 6. Install application packages.                                                                                                   [Not Completed]
 7. Run postinstall tasks.                                                                                                          [Not Completed]
 8. Install Expect.                                                                                                                 [Not Completed]
 9. Install IPMI tool.                                                                                                              [Not Completed]
10. Set database credentials.                                                                                                       [Not Completed]
11. Install and Configure Oracle Database.                                                                                          [Not Completed]
12. Seed Ops Center Database Schema                                                                                                 [Not Completed]
13. Install Service container components.                                                                                           [Not Completed]
14. Install Core Channel components.                                                                                                [Not Completed]
15. Install Proxy Core components.                                                                                                  [Not Completed]
16. Set Proxy database credentials.                                                                                                 [Not Completed]
17. Install Enterprise Controller components.                                                                                       [Not Completed]
18. Install Update Connection - Enterprise.                                                                                         [Not Completed]
19. Install Ops Center BUI components.                                                                                              [Not Completed]
20. Install OS provisioning components.                                                                                             [Not Completed]
21. Initialize and start services.                                                                                                  [Not Completed]

Executing current step:  Check for installation prerequisites...
Completed current step:  Check for installation prerequisites.


 1. Check for installation prerequisites.                                                                                                                                                                                        [Completed]
 2. Configure file systems.                                                                                                                                                                                                      [Completed]
 3. Install prerequisite packages.                                                                                                                                                                                               [Completed]
 4. Install Agent components.                                                                                                                                                                                                    [Completed]
 5. Create Deployable Proxy Bundles.                                                                                                                                                                                             [Completed]
 6. Install application packages.                                                                                                                                                                                                [Completed]
 7. Run postinstall tasks.                                                                                                                                                                                                       [Completed]
 8. Install Expect.                                                                                                                                                                                                              [Completed]
 9. Install IPMI tool.                                                                                                                                                                                                           [Completed]
10. Set database credentials.                                                                                                                                                                                                    [Completed]
11. Install and Configure Oracle Database.                                                                                                                                                                                       [Completed]
12. Seed Ops Center Database Schema                                                                                                                                                                                              [Completed]
13. Install Service container components.                                                                                                                                                                                        [Completed]
14. Install Core Channel components.                                                                                                                                                                                             [Completed]
15. Install Proxy Core components.                                                                                                                                                                                               [Completed]
16. Set Proxy database credentials.                                                                                                                                                                                              [Completed]
17. Install Enterprise Controller components.                                                                                                                                                                                    [Completed]
18. Install Update Connection - Enterprise.                                                                                                                                                                                      [Completed]
19. Install Ops Center BUI components.                                                                                                                                                                                           [Completed]
20. Install OS provisioning components.                                                                                                                                                                                          [Completed]
21. Initialize and start services.                                                                                                                                                                                               [Completed]


Ops Center Enterprise Controller installation is complete.

Please point your browser to:

        http://vcloud-mg-v01

to begin using Ops Center Enterprise Controller.

You have new mail in /var/mail/root
root@vcloud-mg-v01:/var/tmp/OC/xvmoc_full_bundle#
root@vcloud-mg-v01:/var/tmp/OC/xvmoc_full_bundle# /opt/SUNWxvmoc/bin/ecadm status
online
root@vcloud-mg-v01:/var/tmp/OC/xvmoc_full_bundle# pwd
/var/tmp/OC/xvmoc_full_bundle
root@vcloud-mg-v01:/var/tmp/OC/xvmoc_full_bundle# ls
install                   Linux_i686                ocasmp                    OpsCenterUpgrades.README  SunOS_i386                SunOS_sparc               xvmoc_proxy_update        xvmoc_update_bundle
root@vcloud-mg-v01:/var/tmp/OC/xvmoc_full_bundle# cd /var/opt/
root@vcloud-mg-v01:/var/opt# ls
BART    oracle  sun
root@vcloud-mg-v01:/var/opt# cd sun/
root@vcloud-mg-v01:/var/opt/sun# ls
harvester  xvm
root@vcloud-mg-v01:/var/opt/sun# ls -l
total 8
drwxr-xr-x   2 root     root           3 Oct  2 20:48 harvester
drwxr-xr-x  28 root     sys           54 Oct  3 10:54 xvm
root@vcloud-mg-v01:/var/opt/sun# cd harvester/
root@vcloud-mg-v01:/var/opt/sun/harvester# ls
standalone-1002.tar.gz
root@vcloud-mg-v01:/var/opt/sun/harvester#

==================================================

Installing Agent to add host.

We will be adding control domain to opsCenter

Deploy the Controller Agent on both physical hosts.

1.  From Ops Center Server (192.168.10.80) under /var/opt/sun/xvm/images/agent folder, upload the agent IPS package to .75 and .76
On 192.168.10.80   /var/opt/sun/xvm/images/agent/OpsCenterAgent.SolarisIPS.all.12.3.3.1801.zip

root@sinf-mg-p12:/var/tmp/OC# unzip ../OpsCenterAgent.SolarisIPS.all.12.3.3.1801.zip

2.  Edit the install script.  On Line 744, remove the –G ‘*’ 
Edit the install script, as following.  Change Line 744 and remove the -G '*'
   744          # exec_echo_gettext "$PKG set-publisher -G '*' -g ${PROXY_URI} $SOLARIS_PUBLISHER"
   745            exec_echo_gettext "$PKG set-publisher -g ${PROXY_URI} $SOLARIS_PUBLISHER"

3.  Run  the install script with the –p  and –l  options.  The –p takes the IP of the OpsCenter server.

Note set publisher to 64
# pkg set-publisher -g http://192.168.10.200 solaris
# pkg publisher
# pkg search cacao
# pkg list | grep -i cacao-incorporation

root@sinf-mg-p12:/var/tmp/OC/OpsCenterAgent# ./install -p 192.168.10.80 -l
Thu Oct  4 16:09:47 EDT 2018

command: ./install -p 192.168.10.80 -l
Agent installer version: 12.3.3.1801
This is Solaris 11.2 or greater
/usr/bin/pkg publisher
PUBLISHER                   TYPE     STATUS P LOCATION
cacao                       origin   online F https://oracle-oem-oc-mgmt-vcloud-mg-v01:8002/IPS/
mp-re          (non-sticky) origin   online F https://oracle-oem-oc-mgmt-vcloud-mg-v01:8002/IPS/
opscenter                   origin   online F https://oracle-oem-oc-mgmt-vcloud-mg-v01:8002/IPS/
solaris                     origin   online F http://192.168.10.200/
/usr/bin/pkg list -af entire
NAME (PUBLISHER)                                  VERSION                    IFO
entire (solaris)                                  0.5.11-0.175.3.34.0.4.0    i--
entire (solaris)                                  0.5.11-0.175.3.31.0.6.0    ---
entire (solaris)                                  0.5.11-0.175.3.28.0.4.0    ---
entire (solaris)                                  0.5.11-0.175.3.25.0.3.0    ---
entire (solaris)                                  0.5.11-0.175.3.19.0.5.0    ---
entire (solaris)                                  0.5.11-0.175.3.14.0.6.0    ---
entire (solaris)                                  0.5.11-0.175.3.1.0.5.0     ---
Checking to see if this is an upgrade to an existing Agent Controller
No existing Agent Controller found.
Installing the IPS Agent Controller
Setting PKG_CONCURRENCY to 10

Certificate:
-----------------------------------------------------------------------
x509 -noout -in /etc/certs/CA/192.168.10.80.OpsCenter_cert.pem -issuer -subject -dates
-----------------------------------------------------------------------

192.168.10.80   oracle-oem-oc-mgmt-vcloud-mg-v01 vcloud-mg-v01
192.168.10.80 oracle-oem-oc-mgmt-vcloud-mg-v01
oracle-oem-oc-mgmt-vcloud-mg-v01
No need to update /etc/inet/hosts : PROXY CERT_CN entry already present
Using Proxy URI https://oracle-oem-oc-mgmt-vcloud-mg-v01:8002/IPS
Ops Center publisher URI: https://oracle-oem-oc-mgmt-vcloud-mg-v01:8002/IPS
/usr/bin/pkg set-publisher -g https://oracle-oem-oc-mgmt-vcloud-mg-v01:8002/IPS solaris
Startup: Refreshing catalog 'solaris' ... Done
Startup: Caching catalogs ... Done
/usr/bin/pkg set-publisher -G '*' -g https://oracle-oem-oc-mgmt-vcloud-mg-v01:8002/IPS  cacao
/usr/bin/pkg set-publisher -G '*' -g https://oracle-oem-oc-mgmt-vcloud-mg-v01:8002/IPS --non-sticky mp-re
/usr/bin/pkg set-publisher -G '*' -g https://oracle-oem-oc-mgmt-vcloud-mg-v01:8002/IPS  opscenter
/usr/bin/pkg set-publisher -P solaris
/usr/bin/pkg refresh
Refreshing catalog 'cacao' ... Done
Refreshing catalog 'solaris' ... Done
Refreshing catalog 'opscenter' ... Done
Refreshing catalog 'mp-re' ... Done
/usr/bin/pkg set-mediator --deny-new-be --no-backup-be -V 1.8 java
Planning: Evaluating mediator changes ... Done
Planning: Checking for conflicting actions ... Done
Planning: Consolidating action changes ... Done
Planning: Evaluating mediators ... Done
Planning: Planning completed in 21.15 seconds
No changes required.
/usr/bin/pkg list -af /library/cacao
NAME (PUBLISHER)                                  VERSION                    IFO
library/cacao (cacao)                             2.3.1.1-0.175.0.9.0.4.0    ---
library/cacao                                     2.4.7.0-0.175.3.8.0.3.0    ---
library/cacao                                     2.4.3.0-0.175.3.0.0.24.0   ---
/usr/bin/pkg list -af consolidation/cacao/cacao-incorporation
NAME (PUBLISHER)                                  VERSION                    IFO
consolidation/cacao/cacao-incorporation (cacao)   0.5.11-0.175.0.9.0.4.0     ---
consolidation/cacao/cacao-incorporation           0.5.11-0.175.3.8.0.3.0     i--
consolidation/cacao/cacao-incorporation           0.5.11-0.175.3.0.0.24.0    ---
Current facet.version-lock.consolidation/cacao/cacao-incorporation setting is True
/usr/bin/pkg install --accept --deny-new-be --no-backup-be //solaris/consolidation/cacao/cacao-incorporation@0.5.11-0.175.3.8.0.3.0 //solaris/library/cacao system/xopen/xcu4
Startup: Refreshing catalog 'cacao' ... Done
Startup: Refreshing catalog 'solaris' ... Done
Startup: Refreshing catalog 'opscenter' ... Done
Startup: Refreshing catalog 'mp-re' ... Done
Planning: Solver setup ... Done
Planning: Running solver ... Done
Planning: Finding local manifests ... Done
Planning: Fetching manifests: 0/2  0% complete
Planning: Fetching manifests: 2/2  100% complete
Planning: Package planning ... Done
Planning: Merging actions ... Done
Planning: Checking for conflicting actions ... Done
Planning: Consolidating action changes ... Done
Planning: Evaluating mediators ... Done
Planning: Planning completed in 22.89 seconds
           Packages to install:  2
       Create boot environment: No
Create backup boot environment: No

Download:  0/91 items  0.0/2.1MB  0% complete
Download: Completed 2.11 MB in 1.30 seconds (1.6M/s)
Actions:   1/150 actions (Installing new actions)
Actions: Completed 150 actions in 0.10 seconds.
Done
Done
Done
Done
Done
Installed cacao:
/usr/bin/pkg list /library/cacao
NAME (PUBLISHER)                                  VERSION                    IFO
library/cacao                                     2.4.7.0-0.175.3.8.0.3.0    i--
/usr/bin/pkg list consolidation/cacao/cacao-incorporation
NAME (PUBLISHER)                                  VERSION                    IFO
consolidation/cacao/cacao-incorporation           0.5.11-0.175.3.8.0.3.0     i--
No Ops Center zones installed
/usr/bin/pkg install --accept --deny-new-be --no-backup-be //cacao/library/cacao/cacao-crews /management/em-sysmgmt-ld-vc/server-drvr@12.3.3.1801 /management/em-sysmgmt-oc/opscenter-ac-incorporation@12.3.3.1801
Startup: Refreshing catalog 'cacao' ... Done
Startup: Refreshing catalog 'solaris' ... Done
Startup: Refreshing catalog 'opscenter' ... Done
Startup: Refreshing catalog 'mp-re' ... Done
Planning: Solver setup ...
Planning: Finding local manifests ... Done
Planning: Fetching manifests: 0/2  0% complete
Planning: Fetching manifests: 2/2  100% complete
Planning: Package planning ... Done
Planning: Merging actions ... Done
Planning: Checking for conflicting actions ... Done
Planning: Consolidating action changes ... Done
Planning: Evaluating mediators ... Done
Planning: Planning completed in 22.89 seconds
           Packages to install:  2
       Create boot environment: No
Create backup boot environment: No

Download:  0/91 items  0.0/2.1MB  0% complete
Download: Completed 2.11 MB in 1.30 seconds (1.6M/s)
Actions:   1/150 actions (Installing new actions)
Actions: Completed 150 actions in 0.10 seconds.
Done
Done
Done
Done
Done
Installed cacao:
/usr/bin/pkg list /library/cacao
NAME (PUBLISHER)                                  VERSION                    IFO
library/cacao                                     2.4.7.0-0.175.3.8.0.3.0    i--
/usr/bin/pkg list consolidation/cacao/cacao-incorporation
NAME (PUBLISHER)                                  VERSION                    IFO
consolidation/cacao/cacao-incorporation           0.5.11-0.175.3.8.0.3.0     i--
No Ops Center zones installed
/usr/bin/pkg install --accept --deny-new-be --no-backup-be //cacao/library/cacao/cacao-crews /management/em-sysmgmt-ld-vc/server-drvr@12.3.3.1801 /management/em-sysmgmt-oc/opscenter-ac-incorporation@12.3.3.1801
Startup: Refreshing catalog 'cacao' ... Done
Startup: Refreshing catalog 'solaris' ... Done
Startup: Refreshing catalog 'opscenter' ... Done
Startup: Refreshing catalog 'mp-re' ... Done
Planning: Solver setup ... Done
Planning: Running solver ... Done
Planning: Finding local manifests ... Done
Planning: Fetching manifests:  0/28  0% complete
Planning: Fetching manifests: 28/28  100% complete
Planning: Package planning ... Done
Planning: Merging actions ... Done
Planning: Checking for conflicting actions ... Done
Planning: Consolidating action changes ... Done
Planning: Evaluating mediators ... Done
Planning: Planning completed in 26.53 seconds
           Packages to install: 28
       Create boot environment: No
Create backup boot environment: No

Download:    0/1070 items    0.0/119.1MB  0% complete
Download:  881/1070 items   92.4/119.1MB  77% complete (18.6M/s)
Download: Completed 119.15 MB in 6.39 seconds (18.6M/s)
Actions:    1/1641 actions (Installing new actions)
Actions: Completed 1641 actions in 1.68 seconds.
Done
Done
Done
/usr/bin/pkg install --accept --deny-new-be --no-backup-be /system/management/ipmitool
Startup: Refreshing catalog 'cacao' ... Done
Startup: Refreshing catalog 'solaris' ... Done
Startup: Refreshing catalog 'opscenter' ... Done
Startup: Refreshing catalog 'mp-re' ... Done
Planning: Solver setup ...
Planning: Running solver ... Done
Planning: Consolidating action changes ... Done
Planning: Evaluating mediators ... Done
Planning: Planning completed in 19.21 seconds
No updates necessary for this image.
/usr/bin/pkg set-publisher -P solaris
Executing post installation configuration
Generating new system keys ...

Configuring as LDom Virtualization Controller on 5.11 sparc.
Uncomment xmpp.ciphersuite.excluded property in /opt/sun/n1gc/etc/ldoms.properties
Agent Controller 12.3.3.1801 Installation complete.

To uninstall Agent Controller execute /var/scn/install/uninstall
End Time: Thu Oct  4 16:12:47 EDT 2018.

4. Run agentadm command to attached it to the Proxy controller’s IP.  The root password of 192.168.10.80 is stored in /var/tmp/OC/mypasswd.

root@sinf-mg-p12:/opt/SUNWxvmoc/bin# ./agentadm configure -u root -p /var/tmp/OC/mypasswd -x 192.168.10.80
agentadm: Version 12.3.3.1801 launched with args: configure -u root -p /var/tmp/OC/mypasswd -x 192.168.10.80

Validating step : workarounds configure  -u root -p /var/tmp/OC/mypasswd -x 192.168.10.80
Validating step : db configure  -u root -p /var/tmp/OC/mypasswd -x 192.168.10.80
/var/run/cacao/instances/scn-agent/run/*.pid: No such file or directory
Validating step : sc_console configure  -u root -p /var/tmp/OC/mypasswd -x 192.168.10.80
verified sc_console command is OK
Validating step : setup_hmp configure    -u root -p /var/tmp/OC/mypasswd
Validating step : scn_agent configure
scn_agent Common Agent Container environment is OK
Validating step : uce_agent configure
Validating step : config_sysconfig configure
Validating step : final configure
End of validation

executing step : workarounds
workaround  configuration done.

executing step : db
/var/run/cacao/instances/scn-agent/run/*.pid: No such file or directory
configuring db
INFO: hd_domain_vc_agent_db.sh password not decrypted.
Java DB creation and initialization for Domain Model successful
Configuring jobs db
Java DB creation and initialization for job manager successful
INFO: db - Password is not encrypted
DB version successfully set to 12.3.3.1801

executing step : sc_console
verified sc_console command is OK
Configuring sc_console
checking existing sc_console connections
doing sc-console registration

Certificate:
Serial Number:          1727265594
Version:                3
Issuer:                 CN=vcloud-mg-v01_scn-proxy_ca
Subject:                CN=vcloud-mg-v01_scn-proxy_agent
Not valid before:       Mon Jan 03 10:05:06 EST 1972
Not valid after:        Sun Oct 03 11:05:06 EDT 2038

Certificate:
Serial Number:          1567264078
Version:                3
Issuer:                 CN=vcloud-mg-v01_scn-proxy_ca
Subject:                CN=vcloud-mg-v01_scn-proxy_ca
Not valid before:       Mon Jan 03 10:05:05 EST 1972
Not valid after:        Sun Oct 03 11:05:05 EDT 2038

Accept server's certificate? (y|n)
y
Connection registered successfully.
sc-console registration done

executing step : setup_hmp
hwmgmtd service does not exist on this system

executing step : scn_agent
scn_agent Common Agent Container environment is OK
Configuring for a Virtualization Controller
Checking if the cacao scn-agent instance exists
creating cacao scn-agent instance
getting parameter value from cacao instance for micro-agent
getting parameter value from cacao instance for jmxmp-connector-port
setting the cacao scn-agent instance parameter java-home to /usr/jdk/jdk1.8.0_172
setting the cacao scn-agent instance parameter jdmk-home to /usr/lib/cacao/ext/crews/lib
jdk.certpath.disabledAlgorithms=MD2, MD5, SHA1 jdkCA & usage TLSServer, \
jdk.tls.disabledAlgorithms=SSLv3, RC4, MD5withRSA, DH keySize < 1024, \
/usr/jdk/jdk1.8.0_172/jre/lib/security/java.security is currently disabling MD5 algorithms
No existing //etc/cacao//instances/scn-agent/security/jsse/keystore, will create cacao instance testinst
creating cacao testinst instance
MD5 is not being used in cacao cert generation
Removing test cacao instance testinst
setting the cacao scn-agent instance parameter java-flags to -Xmx1024m -Xss384k -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:MaxPermSize=196m -client -Dxvmserver=true -Dfile.encoding=utf-8 -Djava.endorsed.dirs=/usr/lib/cacao/lib/endorsed
setting the cacao scn-agent instance parameter watchdog-probe-frequency to 3600
setting the cacao scn-agent instance parameter jmxmp-connector-port to 0
Enabling scn-agent instance.
setting the cacao scn-agent instance parameter log-file-count to 10
setting the cacao scn-agent instance parameter log-file-limit to 10000000
setting log level for agent facade module
Setting VC log levels
Starting scn-agent instance.
Waiting for instance scn-agent to be up.
Enabling SMF service, svc:/system/hotplug
scn-agent configuration done.

executing step : uce_agent

executing step : config_sysconfig

executing step : final
End of configuration.

5. run   sc-console command to verify agent is connected to OPS Center.
root@sinf-mg-p12:/opt/SUNWxvmoc/bin# sc-console list-connections
scn-agent https://192.168.10.80:21165 urn:scn:clregid:57cd7690-a61f-4cba-99ef-69c2bed59210:20181004201945785