Thursday, December 29, 2016

Script - Collects log message for 2 days - today and the day before from /var/adm/messages

Tested on Solaris 10
[sam@sinf-mg-v01]$ cat var_messages.sh
#!/bin/bash
# @expanor, LLC
# Sam Bhusal
# Collects log message for 2 days - today and the day before from /var/adm/messages
# Thu Dec 29 13:21:57 EST 2016
#
LOGFILE="logs/MESSAGES/messages_`date "+%m%d%y_time.%H-%M-%S.log"`"
#SUDO=/usr/local/bin/sudo
# Need to get log file for two days.
AAJA="`date '+%b %e'`"
# Assume GNU coreutils is present on the system
HIJO=`TZ=GMT+24 date +'%b %e'`
#for i in 10.22.112.11 10.22.112.11
for i in `cat ../etc/hosts.ip | grep -v "#" | awk '{print$1}'`
do
        echo "                    " >>$LOGFILE
        echo "                    "
        echo "Please wait ... Checking on $i server" >> $LOGFILE
        echo "Please wait ... Checking on $i server"
        ssh -q $i /usr/local/bin/sudo /usr/bin/cat /var/adm/messages | egrep "$HIJO|$AAJA" >> $LOGFILE
        echo "__________________________End of the Log FIle_____________________">> $LOGFILE
        echo "                     " >>$LOGFILE
done
echo "Reading Log file"
echo "Please wait ...."
echo ""
more $LOGFILE
[sam@my-sunserv-v01]$

Friday, December 23, 2016

Solaris11 - set up


# crle
# which gcc
# gcc -v
# ./configure --prefix=/usr/local/net-snmp
# mkdir -p /usr/local/net-snmp
# make
# ls agent
# pwd
# cd ../
# cd net-snmp
# cd sbin
# ./snmpd -v
# ./snmpd -V
# crle
# ls
# cd ../
# ls
# pwd
# cd ..
# ls
# tar cf - net-snmp | ( cd /usr/local; tar xfBp - )
# cd /usr/local
# ls
# cd net-snmp
# ls
# cat S99sma
# pwd
# ls
# cd sbin
# ls
# ./snmpd -v
# pwd
# ls
# cd ../
# ls
# cp S99sma /etc/rc3.d
# cd share
# ls
# cd snmp
# ls
# cat snmpd.conf |more
# pwd
# cd ../..
# ls
# cd bin
# ls
# ./net-snmp-create-v3-user
# /etc/rc3.d/S99sma start
# cat /etc/rc3.d/S99sma
# ps -ef | grep -i snmp
# ps -ef | grep -i snmp
# /usr/sfw/bin/snmpget -v 3 -u snmpv3 -l authNoPriv -a MD5 -A SC3Soracle localhost sysUpTime.0
# which snmpget
# /usr/bin/snmpget -v 3 -u snmpv3 -l authNoPriv -a MD5 -A SC3Soracle localhost sysUpTime.0
# ps -ef | grep -i snmp
# crle
# ls /usr/local/lib
# /usr/local/net-snmp/sbin/snmpd -v
# exit
# svcs -a | grep -i snmp
# ps -ef | grep -i snmp
# /usr/local/net-snmp/sbin/snmpd -v
# cd /etc/rc3.d
# ls
# cat S99sma
# ps -ef | grep -i snmp
# cd ../rc2.d
# ls
# df -k
# ps -ef |more
# ntpq -p
#  ps -ef | grep -i snmp
# df -k
# crontab -l
# cd /var/audit/BART
# cd /usr/local/ssh6.6p1/sbin
# ./sshd -V
# ./sshd -v
# ifconfig -a
# ipmpstat -g
# ipmpstat -i
# df -k
# crontab -l
# cd /var/tmp/CAC/DEV/DEV_AD-KRB5-LDAP-Bundle09122016/
# rm ssh6.6p1.tar
  149  ls -al
  150  rm sudo-pam
  151  ls -al
  152  ls -l libraries
  153  ls -al /usr/local/lib/security/
  154  pwd
  155  ls -al
  156  rm -fr libraries
  157  ls -al
  158  ls -l ad
  159  ls ldap
  160  cat ldap_add-tlsPREF.sh |more
  161  pwd
  162  cd ldap
  163  ls
  164  ls -al
  165  cat ldap_add-tlsPREF.sh |more
  166  cat /etc/hosts |more
  167  who
  168  w
  169  df -k
  170  pwd
  171  cd ../..
  172  ls
  173  cd ..
  174  ls
  175  cd TEST
  176  ls -al
  177  cd TEST_AD-KRB5-LDAP-Bundle10052016/
  178  ls
  179  ls -al
  180  rm -fr libraries
  181  rm ssh6.6p1.tar sudo-pam
  182  ls -al
  183  pwd
  184  ls -al
  185  cat sshd |more
  186  pwd
  187  ls -al
  188  cd ../
  189  ls
  190  vi ldap_inst_test.sh

  204  cd ../
  205  ls
  206  cd PROD
  207  ls
  208  cd PROD_AD-KRB5-LDAP-Bundle11072016/
  209  ls
  210  ls -al
  211  rm sudo-pam ssh6.6p1.tar
  212  ls -al
  213  rm -fr libraries
  214  ls -al
  215  ls -al ldap
  216  cd ldap
  217  ls
  218  cat ldap_add-tlsPREF.sh |more
  219  df -k
  220  ps -ef |more
  221  who
  222  w
  223  ps -ef | grep -i snmp
  224  crontab -l
  225  df -k
# ipadm show-if
# ifpadm show-addr
# ipadm show-addr
# cat /etc/netmasks
# ifconfig -a
# ps -ef |more
# df -k
# ls /usr/jdk
# cd /var/tmp
# df -k
# ps -ef |more
# zfs list
# zfs get all rpool/export/home
# which rsync
# cat /var/opt/BART/bart.sh |more
# pkg info entire
# zfs set quota=7G rpool/export/home
# cd /var/audit
# svcs -a | grep -i audit
# svcadm disable auditd
# rm 20161206154209.20161207125214.sol11-test-serv
# zfs list
# cd /var/audit
# cd ../
# zfs list
# zfs create rpool/VAR-AUDIT
# zfs list
# zfs set quota=3G rpool/VAR-AUDIT
# zfs list
# zfs set mountpoint=/var/audit rpool/VAR-AUDIT
# zfs list
# zfs set mountpoint=/var/audit rpool/VAR-AUDIT
# zfs list
# cd /var
# ls -al |more
# cd /var/share
# svcs -a | grep -i audit
# svcadm enable auditd
# ls -al /var/share/audit
# zfs get all rpool/VARSHARE
# ipmpstat -g
# ipmpstat -a
# ipmpstat -g
# ipmpstat -i
# hostname
# svcs -a | grep -i identity
# svcprop  svc:/system/identity:node
# which gcc
# which bart
# cd /var/share/audit
# mkdir -p BART
# cd BART
# mkdir compare manifest
# cd ../
# ls
# ifconfig -a
# ipmpstat -i
# crle
# vi /etc/ssh/sshd_config
# svcadm refresh ssh
# cd local/ssh6.6p1/etc
# rm ssh_host_rsa_key ssh_host_rsa_key.pub ssh_host_dsa_key ssh_host_dsa_key.pub
# vi sshd_config
# cd ad/krb5
# beadm list
# beadm destroy altSolaris
# beadm list
# beadm create altSolaris
# unzip SCC_4.1.1_solaris_sparc.zip
# ls -al
# cd SCC_4.1.1_solaris_sparc
# ls
# gunzip scc-4.1.1_solaris_sparc.tar.gz
# ls -al
# tar tvf scc-4.1.1_solaris_sparc.tar |more
# gunzip scc-4.1.1-solaris-sparc.gz
# pkgadd -d scc-4.1.1-solaris-sparc
# cd /opt/scc
# ./cscc --config
# ./cscc
# cd /export/home/
# cd SCC
# chmod 755 Results/
# cd Results/
# ls -al
# chmod -R 755 SCAP
# ls -al
# cd SCAP/2016-12-14_230413/XML
# cd ../
# cd ..
# ls -al
# cd 2016-12-14_230413/
# svcs -a | grep -i ftp
# ps -ef | more

Solaris11/11: - vnc server set up

Running VNC on solaris 10 server. Look below for solaris 11



10.222.102.64[jay@ddnp-rd-v06]$ vncserver
You will require a password to access your desktops.
Password:
Verify:
xauth:  creating new authority file /home/jay/.Xauthority
New 'ddnp-rd-v06:1 ()' desktop is ddnp-rd-v06:1
Creating default startup script /home/jay/.vnc/xstartup
Starting applications specified in /home/jay/.vnc/xstartup
Log file is /home/jay/.vnc/ddnp-rd-v06:1.log

- Download vnc viewerfrom readvnc or tigervnc or tightvnc
- open your vnc client, enter your ipaddress and password and connect
192.168.10.20:2
will prompt for pw, enter the password

make sure you have session started.
if there is no session, run vncserver. if its first time, it will ask for password.
$ vncserver
^^^^^^^^^^^^^^^^^^^^^^^
if you need to change, use vncpasswd command
kbhusal@ddrp-nd-v:~$ which vncpasswd
/usr/bin/vncpasswd




^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Repo install failed on solaris-auto_install package check
root@ddrp-nd-v:/export/home/kbhusal/repo_dec_2016# ./install-repo.ksh -d /opt/OS_Repo/  -v -c
Using p24921515_1100_SOLARIS64 files for sol-11_3_14_6_0-incr-repo download.
IPS repository exists at destination /opt/OS_Repo/
Current version: 0.175.3.1.0.5.0
Do you want to add to this repository? (y/n)[n]: y
Comparing checksums of downloaded files...done. Checksums match.
Uncompressing p24921515_1100_SOLARIS64_1of4.zip...done.
Uncompressing p24921515_1100_SOLARIS64_2of4.zip...done.
Uncompressing p24921515_1100_SOLARIS64_3of4.zip...done.
Uncompressing p24921515_1100_SOLARIS64_4of4.zip...done.
Repository can be found in /opt/OS_Repo/.
Initiating repository rebuild.
Initiating repository verification.
pkg://solaris/install-image/solaris-auto-install                 4890/6694 /



root@ddrp-nd-v:~# pkg install solaris-desktop
           Packages to install: 317
            Services to change:  12
       Create boot environment:  No
Create backup boot environment: Yes
DOWNLOAD                                PKGS         FILES    XFER (MB)   SPEED
Completed                            317/317   46429/46429  532.0/532.0    0B/s


PHASE                                          ITEMS
Installing new actions                   77186/77186
Updating package state database                 Done
Updating package cache                           0/0
Updating image state                            Done
Creating fast lookup database                   Done
Updating package cache                           1/1

root@ddrp-nd-v:~# inetadm
ENABLED   STATE          FMRI
disabled  disabled       svc:/application/cups/in-lpd:default
disabled  disabled       svc:/network/telnet:default

disabled  disabled       svc:/application/x11/xvnc-inetd:default



root@ddrp-nd-v:~# inetadm | grep xvnc
disabled  disabled       svc:/application/x11/xvnc-inetd:default

start it
root@ddrp-nd-v:~# inetadm -e xvnc-inetd
root@ddrp-nd-v:~# inetadm | grep xvnc
enabled   disabled       svc:/application/x11/xvnc-inetd:default
root@ddrp-nd-v:~#

root@ddrp-nd-v:~#

root@ddrp-nd-v:~# svcadm restart svc:/application/x11/xvnc-inetd:default
root@ddrp-nd-v:~# inetadm | grep xvnc
enabled   online         svc:/application/x11/xvnc-inetd:default
root@ddrp-nd-v:~#


check any trouble services
root@ddrp-nd-v:~# svcs -xv





Thursday, December 22, 2016

Solaris 10 - RBAC - granting read only access to files and directories using RBAC and sudo

pprev


Giving user a read only access to a directory in SOlaris 10
1. Create a user account
# useradd -d /export/home/sam -m -c "Sam Sharma" -s /bin/bash sam
# passwd sam
# passwd -f sam
# groups sam
other
2. Enable cac login
# vi /etc/passwd-login.allow
# vi /etc/cac-login.allow
# id abinitio
uid=1006(abinitio) gid=102(dba)
Note: Record UID of the user.
^^^^^^^^^^^^^^^^^^^ RBAC ^^^^^^^^^^^^^^
3. Create a role
# roleadd -c "Abinitio Read only access" -u 5006 -d /export/home/abinitio_ro -m abinitio_ro
# passwd abinitio_ro
# tail -f /etc/user_attr
3. Create profile and add priviledge to profile
# cd /etc/security
# cp -p prof_attr prof_attr.11292016
# cp -p exec_attr exec_attr.11292016
# vi prof_attr and add the line below
Abinitio_ro:::Abinitio Read Only Rights:
# grep Abinitio_ro /etc/security/prof_attr
Abinitio_ro:::Abinitio Read Only Rights:
# vi exec_attr
# grep Abinitio_ro /etc/security/exec_attr
Abinitio_ro:suser:cmd:::/usr/bin/cat:uid=1006
Abinitio_ro:suser:cmd:::/usr/bin/more:uid=1006
Abinitio_ro:suser:cmd:::/usr/bin/less:uid=1006

4. Assign profile to the role and add role to the user
# rolemod -P Abinitio_ro abinitio_ro
# usermod -R abinitio_ro sam
Keep adding user to the file.

5. Verify the entry
# tail -f /etc/user_attr
abinitio_ro::::type=role;profiles=Abinitio_ro
sam::::type=normal;roles=abinitio_ro
kbhusal::::type=normal;roles=abinitio_ro
6. When user assume the role, it will prompt for role password. So, allow user to access role without supplying password.
a. Using sudo
Now, Create user alias and allow user to su to role user without password.
# visudo
user alias
User_Alias ABINITIO_RO = sam
User privilege
ABINITIO_RO ALL=NOPASSWD: /usr/bin/su - abinitio_ro
b. Using RBAC
Enable a User to Use Own Password to Assume a Role
$ rolemod -K roleauth=user rolename
$ rolemod -K roleauth=sam rolename
Note: WE are using sudo for this task.
7. Add read and execute bit to the directories to allow read and execute to others.
# cd /data/abinitio/sd/ai_data_mount/data/serial
# find . -type f -perm 770 -print
# find . -type f -perm 660 -print
# find . -type d -print | more
# find . -type d -print -exec ls -l {}\; | more
# find . -type d -print -exec ls -ld {} \; | more
# find . -type d -perm -005  -exec ls -ld {} \; | more
# find . -type d ! -perm -005  -exec ls -ld {} \; | more
# find . -type d ! -perm -005  -exec chmod o+rx {} \;
# find . -type d ! -perm -005  -exec ls -ld {} \; | more

$ profiles abinitio_ro
$ roles
Now, login as a normal user and run the following command
$ profiles abinitio_ro
$ profiles -l abinitio_ro
$ roles
and access the role
$ sudo su - abinitio_ro







find folder -type d -exec chmod 750 "{}" \;
find folder -type f -exec chmod 640 "{}" \;

Tuesday, December 13, 2016

Python3 - Variable assignment and printing ..

#for i in range(5, 10):
  #print(i)
 
#for y in range(-5,-20,-3):
#  print(y)
a = ["Dog", "cat", "rat", "goat"]
for i in range(len(a)):
  print(i, a[i])
 
 
print(range(10))

1. Python3 - Hello world example

Introduction to Python


1. Go to https://repl.it/languages/python3 and start programming. Its an awesome place to get started.
2. Go to python.org and go to documentation
3. Click on tutorial and read and practice.


4. Once you have some familiarity with the content and the coding, you can install on your windows machine or use your Linux/UNIX.


5. Please note, by default on Unix/Linux, it comes with 2.x version, install 3.x and start practicing.
Here is the first example.


$ cat hello.py


print("Hello, World")
print("This is cool !!")
print("What can I do for you?")




6. Running on Linux/Unix systems

$ vi hellp.py
#!/python_location
print("Hello, World !!!")


$ python3 help.py





Python3 - Prompting user to enter something.


Prompting user to supply input at the prompt and displaying on the screen


x=input("Please enter your name")
print(x)
print("Hi,", x, "How are you?")

Sunday, December 11, 2016

Python3 - Compile, install and configure python 3 on Centos 7.x

Python3 - Compile and install =>
Prerequisite tasks:
a. Set up your yum repo and make sure you can install packages.
b. Install following packages:
#  yum groupinstall "Development tools"
# yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel


Note: You need to have development tools installed otherwise, you will get your compile failed near the end of the line. If you already have LDAP server setup, you will get an warning related to Kerberos, just ignore.




1. Download the source code
# wget https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tgz



2. Extract the package
# cd /var/tmp; mkdir python; cd python/
# ls -ltr ../Python-3.5.2.tgz
# tar -xzvf ../Python-3.5.2.tgz






3. Compile and install
# cd Python-3.5.2/
# ./configure --prefix=/usr/local --enable-shared
# make
# make install
# cd /usr/local/
# cd bin
# ls -lh




4. Make python library available so that you can use python3.

# python3
python3: error while loading shared libraries: libpython3.5m.so.1.0: cannot open shared object file: No such file or directory


# ls -l /usr/local/lib/libpython3.5m.so.1.0

# echo /usr/local/lib >> /etc/ld.so.conf.d/local.conf
# ldconfig
# which python3
/usr/local/bin/python3
# export PATH=$PATH:/usr/local/bin
# echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin






5. Check the version you install and start interactive console to start using it.
Note: as of now, most of the system defaults to 2.x version.



# python3 --version
Python 3.5.2
# python3
Python 3.5.2 (default, Dec 11 2016, 12:47:09)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-4)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>




6. Print hello world !!!
>>> print("Hello, World!!! \n Welcome to Python")
Hello, World!!!
 Welcome to Python




>>> msg="Hello, World!!! \n Welcome to Python"
>>> print(msg)
Hello, World!!!
 Welcome to Python
>>>


Thursday, December 8, 2016

OpsCenter - Installation on Solaris 11 x64 server



Raw install data ->


Installation of OpsCenter 12c


host =Solarisx64
ip = 192.168.10.20
OS=Solaris11.3


A. Create a repo
root@opscenter:~# zfs set atime=off datapool/FS_Opt_Repo






root@opscenter:/export/home/kamal# ./install-repo.ksh -d /opt/repo/ -I -v -c
Using sol-11_3-repo download.
Comparing checksums of downloaded files...done. Checksums match.
Uncompressing sol-11_3-repo_1of5.zip...done.
Uncompressing sol-11_3-repo_2of5.zip...done.
Uncompressing sol-11_3-repo_3of5.zip...done.
Uncompressing sol-11_3-repo_4of5.zip...done.
Uncompressing sol-11_3-repo_5of5.zip...done.
Repository can be found in /opt/repo/.
Initiating repository verification.
pkg://solaris/system/storage/scsi-target-mode-framework           666/5480 -



root@opscenter:/export/home/kamal# ./install-repo.ksh -d /opt/repo/ -I -v -c
Using sol-11_3-repo download.
Comparing checksums of downloaded files...done. Checksums match.
Uncompressing sol-11_3-repo_1of5.zip...done.
Uncompressing sol-11_3-repo_2of5.zip...done.
Uncompressing sol-11_3-repo_3of5.zip...done.
Uncompressing sol-11_3-repo_4of5.zip...done.
Uncompressing sol-11_3-repo_5of5.zip...done.
Repository can be found in /opt/repo/.
Initiating repository verification.
Building ISO image...done.
ISO image can be found at:
/export/home/kamal/sol-11_3-repo.iso
Instructions for using the ISO image can be found at:
/opt/repo//README-repo-iso.txt
root@opscenter:/export/home/kamal#




B. Refresh the repo to make it available
root@opscenter:~# pkgrepo -s /opt/repo/ refresh
Initiating repository refresh.


C. Share across the network
root@opscenter:~# zfs set share=name=s11repo,path=/opt/repo,prot=nfs datapool/FS_Opt_Repo
name=s11repo,path=/opt/repo,prot=nfs
root@opscenter:~# dfshares solaris
nfs dfshares:solaris: RPC: Unknown host
root@opscenter:~# dfshares solaris
nfs dfshares:solaris: RPC: Unknown host
root@opscenter:~# svcs -a | grep -i bind
online         17:57:10 svc:/network/rpc/bind:default
root@opscenter:~#



root@opscenter:/export/home/kamal/xvmoc_full_bundle# pkg publisher
PUBLISHER                   TYPE     STATUS P LOCATION
solaris                     origin   online F http://pkg.oracle.com/solaris/release/
root@opscenter:/export/home/kamal/xvmoc_full_bundle# pkg set-publisher -G '*' -M '*' -g /opt/repo/
solaris
root@opscenter:/export/home/kamal/xvmoc_full_bundle#


#!/bin/bash
# Count the number of word that is being searched on the file
# date:
FileName="greetings.txt"
FindWord="greet"
wcount="`tr" " "\n" < $fileName| grep$strToFind| wc-w`"
echo "The word '$FindWord is fount on $wcount times in the file $FileName."


* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


Run OCdoctor


# ./OCDoctor.sh --ec-prereq




Got following error, and added following entries to /etc/system and /etc/host file.



error: Need to update/set /etc/system. Add: 'set pidmax=60000' to /etc/system.
        The system will require a reboot after making this change!
error: Need to update/set /etc/system. Add: 'set zfs:zfs_arc_max=6764412928' to
        /etc/system. The system will require a reboot after making this change!
error: Swap:  12G free needed as minimum, 2048M present - swap min equals RAM
        size up to 16G of swap
Number of precheck error messages: 7, number of warnings: 1
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *



root@opscenter:~# swap -l
swapfile             dev    swaplo   blocks     free
/dev/zvol/dsk/rpool/swap 285,1         8  4194296  4194296
root@opscenter:~# swap -d /dev/zvol/dsk/rpool/swap
root@opscenter:~# zfs set volsize=12G rpool/swap
root@opscenter:~# swap -a /dev/zvol/dsk/rpool/swap
root@opscenter:~# swap -l
swapfile             dev    swaplo   blocks     free
/dev/zvol/dsk/rpool/swap 285,1         8 25165816 25165816
root@opscenter:~# df -h /tmp
Filesystem             Size   Used  Available Capacity  Mounted on
swap                    12G    12M        12G     1%    /tmp
root@opscenter:~#
root@opscenter:~# swap -d /dev/zvol/dsk/rpool/swap
root@opscenter:~# zfs set volsize=12G rpool/swap
root@opscenter:~# swap -a /dev/zvol/dsk/rpool/swap
root@opscenter:~# swap -l
swapfile             dev    swaplo   blocks     free
/dev/zvol/dsk/rpool/swap 285,1         8 33554424 33554424
root@opscenter:~# df -h /tmp
Filesystem             Size   Used  Available Capacity  Mounted on
swap                    26G     4K        26G     1%    /tmp
root@opscenter:~#



root@opscenter:/export/home/kamal/OCDoctor# ulimit -Sn 1024

root@opscenter:/export/home/kamal/OCDoctor# ulimit -Hn 65536


root@opscenter:/export/home/kamal/xvmoc_full_bundle# zfs set quota=70G rpool/ROOT/solaris/var






* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
error: Need to update/set /etc/system. Add: 'set max_nprocs=50000' to
        /etc/system. The system will require a reboot after making this change!
error: Need to update/set /etc/system. Add: 'set maxuprc=50000' to /etc/system.
        The system will require a reboot after making this change!
error: Need to update /etc/system. Update zfs_arc_max to: 'set
        zfs:zfs_arc_max=3006477107' in /etc/system. The system will require a
        reboot after making this change!
Number of precheck error messages: 4, number of warnings: 1
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
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.1330.
t. Try this step again (correct the failure before proceeding)
x. Exit
Enter selection: (t/x)



after changing the parameter, and rebooting, it didn't throw error any more




You may choose to ignore this warning by selecting to continue.
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Kernel is currently configured with max_nprocs:  50000
max_nprocs value found in or under /etc/system:    50000
This vers, 0.175.3.1.0.5.0, is greater than or equal to 0.175.2.0.0.42.0
/usr/bin/pkgrepo list -s file:///opt/repo/  pkg://solaris/entire@0.5.11,5.11-0.175.3.1.0.5.0:           
                                                               20151006T140051Z
The configured solaris publisher supports this version of Oracle Solaris 11
Testing Shell Limits
localhost is alive
warning: Filesystem: /var - 85G recommended, 39G available.
Number of precheck error messages: 0, number of warnings: 1
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
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.1361.
t. Try this step again (correct the failure before proceeding)
c. Continue (ignore the warning)
x. Exit
Enter selection: (t/c/x) c
Continuing step:  Check for installation prerequisites.
Completed current step:  Check for installation prerequisites.
                                                               Ops Center Enterprise Controller
Installer
                                                                     (version 12.3.2.1113 on SunOS)

Executing current step:  Configure file systems...
Completed current step:  Configure file systems.
                                                               Ops Center Enterprise Controller
Installer
                                                                     (version 12.3.2.1113 on SunOS)




..........................


root@opscenter:/export/home/kamal/xvmoc_full_bundle# ./install






21. Initialize and start services.                                                                      
                                               [Not Completed]
Failed Step:  Install and Configure Oracle Database.
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.
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
System parameter file is
/var/opt/sun/xvm/oracle/app/oracle/product/12.1.0/ocdbhome/network/admin/listener.ora
Log messages written to /var/opt/sun/xvm/oracle/diag/tnslsnr/opscenter/oclistener/alert/log.xml
Error listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=opscenter)(PORT=11176)))
TNS-12545: Connect failed because target host or object does not exist
 TNS-12560: TNS:protocol adapter error
  TNS-00515: Connect failed because target host or object does not exist

Listener failed to start. See the error message(s) above...
12-06-2016:18:54:00 ERROR: Could not start listener: OCLISTENER
Error: 256 when executing: cd /opt/ORCLsysman-db; ./cmd/createOCDB.sh 0 2000 6143
/var/tmp/opscenter/installer.prereq
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
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.1361.
t. Try this step again (correct the failure before proceeding)
x. Exit
Enter selection: (t/x)




D. added opscenter [hostname] on hostfile and continue, start working fine....

detail log, check at
# more /var/tmp/opscenter/installer.log.1361



....




Executing current step:  Seed Ops Center Database Schema..




Executing current step:  Initialize and start services...
Completed current step:  Initialize and start services.
                                                               Ops Center Enterprise Controller
Installer
                                                                     (version 12.3.2.1113 on SunOS)
 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]


21. Initialize and start services.                                                                      
                                                   [Completed]

Ops Center Enterprise Controller installation is complete.
Please point your browser to:
        http://opscenter.expanor.local
to begin using Ops Center Enterprise Controller.
root@opscenter:/export/home/kamal/xvmoc_full_bundle#



complaining about /var fs
root@opscenter:/export/home/kamal/xvmoc_full_bundle# zfs set quota=70G rpool/ROOT/solaris/var
root@opscenter:/export/home/kamal/xvmoc_full_bundle#






login to the opscenter
http://opscenter.expanor.local
http://192.168.10.20
login with your OS root/pw
and follow the prompt to continue.
1. prerequisite check list
it complained for /var fs and increase to 70 G


2. Enterprise controller set up


3. proxy controller status
Proxy Controller Status
This table shows Proxy Controllers registered with this Ops Center, including the current status. A
Proxy must be online to be able to perform jobs such as discovery. If Proxy registration/startup is
still ocurring the status will update automatically. If the Proxy startup failed you can click Back to
retry the Proxy deployment.
For enabled Proxies you may perform a remote connectivity check. A job will be sent to the specified
Proxy, which will attempt to connect to a system in the Proxy's subnet using various discovery protocols
and will report the status. You will be prompted for the remote system to check when you launch the
operation.
Proxy Controller Status
Hostname Status IP/Subnet Mask  Connectivity
opscenter.expanor.local ONLINE 192.168.10.20/255.255.255.0 check
click on check to verify it.
next to continue ..


4. connection mode
Two mode
- connected mode
- Disconnected mode
we will be using disconnected mode since we will not be directly connected.



5. create software libraries
- select the default
Enter the URL location for the following component libraries. The Enterprise Controller creates the
libraries locally or connects to NAS libraries in the specified locations.

Software Library: file:///var/opt/sun/xvm/locallib/swlib0
*Oracle Solaris 11 Software Update Library: file:///var/opt/sun/xvm/locallib/
*Linux and Oracle Solaris 8-10 Software Update Library: file:///var/opt/sun/xvm/locallib/swlib2
Example of local library URL: file://var/opt/sun/xvm/locallib/swlib0
Example of NAS library URL: nfs://192.168.1.1/fso



6. configure dhcp for os provisining
7. Summary