Popular Posts

Dec 23, 2016

Create automated installer (AI) solaris 11.3

Create automated installer (AI) solaris 11.3


Preparation
  IPS Repo is required, Refer How to setup IPS Repo (My Previous Blog)
  Download the latest SPARC AI ISO Image from MOS (DOC - 2045311.1)  SPARC AI Image
  Upload to IPS server and unzip the file
  In this setup we are not using DHCP service

2. AI server is using an internal IPS repo
      judi-dev-01# pkg publisher
      PUBLISHER                   TYPE     STATUS P LOCATION
      solaris                     origin   online F http://192.168.1.10/
      judi-dev-01#


3. Prepare the server by installing the necessary packages
     pkg install install/installadm
     pkg install pkg:/service/network/dns/mdns

4. Modify the name serice to search the mdns as well
      /usr/sbin/svccfg -s svc:/system/name-service/switch
       svc:/system/name-service/switch> setprop config/host = astring: "files dns mdns"
       svc:/system/name-service/switch> select system/name-service/switch:default
       svc:/system/name-service/switch:default> refresh
       svc:/system/name-service/switch> quit

      svcprop system/name-service/switch|grep dns
       config/host astring files\ dns\ mdns

5. Enable dns multicast service
      svcadm enable svc:/network/dns/multicast:default

6. In addition, verify you have a static IP address configured.
      ipadm

7. Create a dedicated zfs, then enable ZFS deduplication and compression on the new pool
     zfs create -o mountpoint=/sol.11.3.repo/ai sol.11.3.repo/ai
     zfs set dedup=on sol.11.3.repo
     zfs set compression=on sol.11.3.repo

     zfs get -r dedup sol.11.3.repo
     zfs get -r compression sol.11.3.repo

8. Creating a SPARC Install Service Using the downloaded ISO File,
    We are not using any DHCP service in this plan
       installadm create-service -n s11-sparc -s /var/tmp/SRU/ai_iso/sol-11_3_15_4_0-ai-sparc.iso -d /sol.11.3.repo/ai/s11-sparc -y

       -n - service name <svcname>
       -s - ISO file path <FMRI/ISO>
       -d - destination path <imagepath>
       -y - Optional: Suppresses any confirmation prompts

9. Verify the install service was  created successfully.
     installadm list
     installadm list -m

       judi-dev-01# installadm list
       Service Name  Status Arch  Type Secure Alias Aliases Clients Profiles Manifests
       ------------  ------ ----  ---- ------ ----- ------- ------- -------- ---------
       default-sparc on     sparc iso  no     yes   0       0       0        1
       s11-sparc     on     sparc iso  no     no    1       0       0        1
       judi-dev-01#

10. Configure the network boot arguments in OBP of a client and boot the client
      Configure: the clients IP, default router, subnetmask, hostname, and the location of the wanboot-cgi file to boot it.
      Issues the command in OBP
      setenv network-boot-arguments host-ip=192.168.1.50,router-ip=192.168.1.1,subnet-mask=255.255.255.0,hostname=judi-dev-01,file=http://192.168.1.10:5555/cgi-bin/wanboot-cgi

       exmple command :
{0} ok setenv network-boot-arguments host-ip=192.168.1.50,router-ip=192.168.1.1,subnet-mask=255.255.255.0,hostname=judi-dev-01,file=http://192.168.1.10:5555/cgi-bin/wanboot-cgi
network-boot-arguments =  host-ip=192.168.1.50,router-ip=192.168.1.1,subnet-mask=255.255.255.0,hostname=judi-dev-01,file=http://192.168.1.10:5555/cgi-bin/wanboot-cgi
{0} ok

11. Verify the network boot arguments in OBP
        printenv network-boot-arguments

       exmple command :
{0} ok printenv network-boot-arguments
network-boot-arguments =  host-ip=192.168.1.50,router-ip=192.168.1.1,subnet-mask=255.255.255.0,hostname=judi-dev-01,file=http://192.168.1.10:5555/cgi-bin/wanboot-cgi
{0} ok

12. Boot the client from OBP
       boot net - install

{0} ok boot net - install
Boot device: /virtual-devices@100/channel-devices@200/network@0  File and args: - install
<time unavailable> wanboot info: WAN boot messages->console
<time unavailable> wanboot info: configuring /virtual-devices@100/channel-devices@200/network@0

<time unavailable> wanboot progress: wanbootfs: Read 368 of 368 kB (100%)


13. Image dump will get copied to the client and prompt for login
      Default password in solaris
      Login and restart the client server
      Client server will boot from disk and ask for basic details like servername, IP, Language , Locale, Timezone, password
      Once the details are given the client server is ready



Below are the Oracle Documents referred to setup this Automated Installed in solaris 11.3
1. Automated Installer Install Service to Deploy a Unified Archive (Doc ID 2131241.1)
2. How to Create an Install Service 


~
configure auto installer in soalris 11
Soalris 11 auto installer
how to setup solaris 11 automated installer
solaris 11.3 sru download
download solaris 11.3 iso
~

~Judi~
Comments are Welcome J





Dec 21, 2016

Solaris tar / gzip / zip / unzip / bzip2 / pbzip2 / p7zip / zcat / gzcat

tar / gzip / zip / unzip / bzip2 / pbzip2 / p7zip / zcat / gzcat

Tricks - .zip file format
1. List or view contents of a .zip file
     unzip -l archive.zip

2. Extract a specific file from a zip file
     unzip file name.zip filename.txt

3. View the content of a file inside a zip file
      unzip -p myarchive.zip filename

4. Extract a specific file content from a zip file to a new file
     unzip -p myarchive.zip filename >file.txt


Tricks - .Z file format
1. Extract or uncompress a .Z file
     uncompress filename.tar.Z


Tricks - .gz file format
1. List the contents of a tar file
     tar -tvf filename.tar

2. List the contents of a tar file



Tricks - .gz file format
1. Extract or uncompress a .gz file
     gunzip filename.tar.gz


Tricks - .tar.gz file format - quick method
1. Extract or uncompress a tar.gz file
     gzcat filename.tar.gz | tar xvf -
     tar -xzf filename.tar.gz

2. List the contents of a tar.gz file
     tar -ztvf file.tar.gz

3. Search for specific files in a .tar.gz file
     tar -tvf my-data.tar.gz 'search-pattern'

4. Create a compress archive
     tar -czvf name-of-archive.tar.gz /path/to/directory-or-file
     tar -czvf testfile.tar.gz /var/tmp/testdir

Tricks - .tar.Z file format - quick method
1. Extract or uncompress a tar.Z file
     zcat filename.tar.Z  | tar xvf -



Tricks - .tar.bz2 file format
1. List the contents of a tar.bz2 file
     tar -jtvf file.tar.bz2

2. Search for specific files in a .tar.bz2 file
     tar -tvf projects.tar.bz2 '*.pl'

Dec 20, 2016

Solaris - cpu and Memory Details

Solaris - cpu and Memory Details


1. Find how many physical process / cpu in a sparc server (solaris 10)
      psrinfo -vp
      psrinfo -p

2. Find the physical memory in a sparc server
     prtconf | grep Memory
    prtdiag -v | grep Memory

3. Find cpu information in a physical server / control domain
     ldm list-devices cpu
     ldm ls-devices -a

4. Find memory information in a physical server / control domain
     ldm ls-devices memory

pkg administration in solaris 11

pkg administration in solaris 11



1. To view Solaris 11 package version
    A package called entire is the primary incorporation package that determines the overall state of a system.
     pkg info entire

Table 1. FMRI elements
FMRI SegmentValueDescription
publishersolarisPublisher
nameentirePackage name
component_version0.5.11Component version
release5.11Release version, for example, Oracle Solaris 11
branch_version0.175.3.14.0.6.0Branch version
timestamp20161110T164958ZPackage time stamp (ISO 8601 UTC format)


OR

2. Determining Oracle Solaris 11 OS Package Update Version (Kernel Version)
      pkg info kernel

3. Update a Solaris 11 server from repository with latest SRU
     pkg update --accept

4. To view the configured publishers (repo servers)
      pkg publisher

5. To determine whether the installadm package is already installed on this system
      pkg list installadm

6. Make sure your IPS package repository contains the installadm package
     pkg list -a installadm

7. Install a package from repository
     pkg install install/installadm

8. To view the details of a package
      pkg info installadm

9. To list content or associated files of a package
      pkg contents nano

10. To uninstall a package from solaris 11 server
        pkg uninstall editor/nano


11. Upgrade the packages by relaxing the version lock
        pkg list | grep "network/ntp"
        pkgrepo list -s http://192.168.1.10 | grep "network/ntp"
        pkg update service/network/ntp@4.2.8.9,5.11-0.175.3.17.0.1.0
        pkg contents -m userland-incorporation | grep "service/network/ntp"
        pkg change-facet facet.version-lock.service/network/ntp=false
        pkg update service/network/ntp@4.2.8.9,5.11-0.175.3.17.0.1.0   OR
        pkg update service/network/ntp

12. Set Package publisjer
        pkg set-publisher -G '*' -M '*' -g http://10.192.168.10 solaris

~
pkg administration in solaris 11;
install package in solaris 11;
solaris 11 package installation;
pkg update solaris 11
pkg info entire

info pkg
~

Dec 19, 2016

Apache and web apps

Apache and web apps


1. Check Apache version in solaris 10
     cd /usr/apache2/bin/
    ./httpd -v
OR
    cd /usr/apache2/bin
    ./apachectl -v
2.




Dec 16, 2016

Solaris 11 IPS repository and update Latest SRU to Repository

Configure Solaris 11 IPS repository and update Latest SRU to Repository 

A Small introduction about IPS
         -  Image packaging system(IPS) repository is one of the important feature added in Solaris 11.
         -  To install package in Solaris 11.3 Clients, we you need IPS repository.
         -  A install-repo.sh script merge the piece  of repo files and performing the checksum automatically.
         -  We need to download the repo files,md5checkum file and script in one location

Local IPS Repositories
         -  Performance and security. You do not want your client systems to go to the Internet to retrieve new software packages or update existing packages.
         -  Replication. You want to ensure that you can perform the same installation next year that you perform today.
         -  Custom packages. You want to include your own IPS package in the same repository with Oracle Solaris OS packages.


1. Download the local repository image from the below link
     Download Local Repository Image
 
   -rwxr-x---   1 root     root       11612 Dec 16 11:35 install-repo.ksh
   -rwxr-x---   1 root     root     1540097274 Dec 16 11:35 sol-11_3-repo_1of5.zip
   -rwxr-x---   1 root     root     1730669364 Dec 16 11:36 sol-11_3-repo_2of5.zip
   -rwxr-x---   1 root     root     1717187368 Dec 16 11:37 sol-11_3-repo_3of5.zip
   -rwxr-x---   1 root     root     1871913207 Dec 16 11:37 sol-11_3-repo_4of5.zip
   -rwxr-x---   1 root     root     1570373423 Dec 16 11:38 sol-11_3-repo_5of5.zip
   -rwxr-x---   1 root     root         285 Dec 16 11:38 sol-11_3-repo_md5sums.txt

2. Download the latest SRU from the below link , ORACLE SOLARIS 11.3.14.6.0 (08-Dec-2016)
    Download the latest SRU from (Doc ID 2045311.1) MyOracleSupport
    The Current SRU is 11.3.15.4.0 (08-Dec-2016) Download the images and installation guide from (ISO) and (Guide)

   -rwxr-x---   1 root     root     1352426251 Dec 16 12:05 p24921515_1100_SOLARIS64_1of4.zip
   -rwxr-x---   1 root     root     1681754087 Dec 16 12:06 p24921515_1100_SOLARIS64_2of4.zip
   -rwxr-x---   1 root     root     1465622938 Dec 16 12:07 p24921515_1100_SOLARIS64_3of4.zip
   -rwxr-x---   1 root     root     1353700532 Dec 16 12:08 p24921515_1100_SOLARIS64_4of4.zip
   -rwxr-x---   1 root     root       54156 Dec 21 13:56 p25164979_1100_SOLARIS64.zip


3. Create a dedicated zpool / zfs with 100 GB for IPS repository
      zpool create -f -m /sol.11.3.repo sol.11.3.repo c6t0d0
      zfs create -o mountpoint=/sol.11.3.repo/repo sol.11.3.repo/repo
      zfs set dedup=on sol.11.3.repo
      zfs set compression=on sol.11.3.repo
      zfs set atime=off sol.11.3.repo


4. Create a repo
   pkgrepo create /sol.11.3.repo/repo

5. view the installation guide
      unzip -l p25164979_1100_SOLARIS64.zip

6.  Extract the script and checksum file alone from the installer guide zip file
     unzip p25164979_1100_SOLARIS64.zip install-repo.ksh
     unzip p25164979_1100_SOLARIS64.zip sol-11_3_15_4_0-incr-repo_md5sums.txt

7. Execute the install-repo.ksh script to create local repo,
      ./install-repo.ksh -s /var/tmp/SRU11.3.14.6.0/localrepo -d /sol.11.3.repo/repo -c -v -I
 

8. Verify the repo
      pkgrepo -s /sol.11.3.repo/repo info
      pkgrepo -s http://192.168.1.10/ info
      pkg list -af entire
      pkgrepo -s http://192.168.1.10 list  (To view all the packages)

9. Create a depot server instance.
    Use the add subcommand to add a new instance of the pkg/server service named solaris.
      svccfg -s pkg/server add solaris

10. Set the path to the repository.
      Set the path where this instance of the service can find the repository data.
        svccfg -s pkg/server:solaris setprop pkg/inst_root=/sol.11.3.repo/repo

11. Start the repository service.Restart the package depot server service.
        svcadm refresh pkg/server:solaris
        svcadm enable pkg/server:solaris

12. Set the publisher origin.
      To enable client systems to get packages from your local file repository, set the origin for the publisher.
       pkg set-publisher -G '*' -M '*' -g /sol.11.3.repo/repo solaris

13. Determine the name of the publisher.
      Use the following command to determine the names of publishers in your repository:
        pkgrepo info -s /sol.11.3.repo/repo
        pkgrepo info -s http://192.168.1.10/
        pkg list -af entire

        pkgrepo -s http://192.168.1.10 list  (To view all the packages)

14. Now Update the latest SRU Packages SRU11.3.14.6.0 to IPS repository
    cd /var/tmp/SRU11.3.14.6.0

    -rwxr-x---   1 root     root     1352426251 Dec 16 12:05 p24921515_1100_SOLARIS64_1of4.zip
    -rwxr-x---   1 root     root     1681754087 Dec 16 12:06 p24921515_1100_SOLARIS64_2of4.zip
    -rwxr-x---   1 root     root     1465622938 Dec 16 12:07 p24921515_1100_SOLARIS64_3of4.zip
    -rwxr-x---   1 root     root     1353700532 Dec 16 12:08 p24921515_1100_SOLARIS64_4of4.zip
    -rwxr-x---   1 root     root     54156 Dec 16 12:08 p24921515_1100_SOLARIS64_4of4.zip


15. Update the latest SRU Packages SRU11.3.14.6.0 to IPS repository (will take huge time)
        unzip p24921515_1100_SOLARIS64_4of4.zip
        ./install-repo.ksh -s /var/tmp/SRU11.3.14.6.0 -d /sol.11.3/repo -c -v

16. Set publisher in client machines
       pkg set-publisher -G '*' -M '*' -g http://192.168.1.10 solaris

17. From Client machine, check entire package version details
        pkgrepo list -s http://192.168.1.10/ | grep entire
             solaris   entire                                          0.5.11,5.11-0.175.3.14.0.6.0:20161110T164958Z
             solaris   entire                                          0.5.11,5.11-0.175.3.1.0.5.0:20151006T140051Z
         pkg list -af entire

18. Upgrade the client machine to latest SRU
        pkg update --accept entire

19. Install a package from latest SRU in Client machine
        pkg install system/display-manager/gdm
 

20. Update a package from latest SRU in Client machine
        pkg update system/display-manager/gdm

                 - Every package that is part of the Oracle Solaris 11 OS has a dependency on an incorporation package.
                 - Some incorporated packages might be safe to downgrade or upgrade at a version different from the version specified by the incorporation.
                 - Such incorporated packages have a version-lock.pkg_name facet attribute specified in the incorporation package.
                 - The default value of the version-lock.pkg_name facet is true.
                 - To relax the version constraint on a package, set the value of its version-lock.pkg_name facet to false.

Example : Upgrade ntp package in client machine
The installed ntp version in server is :
service/network/ntp                               4.2.8.8-0.175.3.12.0.1.0   i--

21. A higher version is available in IPS Repository
judi-dev-01 # pkgrepo list -s http://192.168.1.10 | grep "network/ntp"
solaris   service/network/ntp                             4.2.8.9,5.11-0.175.3.17.0.1.0:20170117T191858Z
solaris   service/network/ntp                             4.2.8.8,5.11-0.175.3.12.0.1.0:20160818T005350Z
solaris   service/network/ntp                             4.2.8.2,5.11-0.175.3.0.0.30.0:20150821T172046Z
judi-dev-01 #

22. when we upgrade a singe package, the following error may appear if the version lock is in place.
judi-dev-01 # pkg update service/network/ntp@4.2.8.9,5.11-0.175.3.17.0.1.0
Creating Plan (Solver setup): |
pkg install: No matching version of service/network/ntp can be installed:
  Reject:  pkg://solaris/service/network/ntp@4.2.8.9-0.175.3.17.0.1.0
  Reason:  This version is excluded by installed incorporation consolidation/userland/userland-incorporation@0.5.11-0.175.3.15.0.4.0
judi-dev-01 #

23. The pkg contents command shows how this version constraint is set.
judi-dev-01 # pkg contents -m userland-incorporation | grep "service/network/ntp"
depend facet.version-lock.service/network/ntp=true fmri=service/network/ntp@4.2.8.8,5.11-0.175.3.12.0.1.0 type=incorporate
judi-dev-01 #

24. To relax the version constraint on this package, set its version-lock facet to false from true.
judi-dev-01 # pkg change-facet facet.version-lock.service/network/ntp=false
            Packages to change:   1
     Variants/Facets to change:   1
       Create boot environment:  No
Create backup boot environment: Yes

PHASE                                          ITEMS
Removing old actions                             1/1
Updating package state database                 Done
Updating package cache                           0/0
Updating image state                            Done
Creating fast lookup database                   Done
Updating package cache                           1/1
judi-dev-01 #



25. Then try the upgrade again.
pkg update service/network/ntp@4.2.8.9,5.11-0.175.3.17.0.1.0  (To a Specific version)  OR to latest Version
judi-dev-01 # pkg update service/network/ntp
            Packages to update:   1
            Services to change:   2
       Create boot environment:  No
Create backup boot environment: Yes

DOWNLOAD                                PKGS         FILES    XFER (MB)   SPEED
Completed                                1/1         24/24      1.4/1.4  1.1M/s

PHASE                                          ITEMS
Removing old actions                             2/2
Installing new actions                           2/2
Updating modified actions                      27/27
Updating package state database                 Done
Updating package cache                           1/1
Updating image state                            Done
Creating fast lookup database                   Done
Updating package cache                           1/1
judi-dev-01 #







===================================
===================================
===================================
Verify the checksum values
====================
judi-dev-01# cat 'MD5 Checksums.txt'
62384c43cfb71c459e8e08c98f410c43  sol-11_3-repo_1of5.zip
1a1d2139d9b4c0ddbf7d49bcfe2bdede  sol-11_3-repo_2of5.zip
ea3552c45d530258cf05d94fe7807005  sol-11_3-repo_3of5.zip
d1330a49ff181356273bbd7c647e2fee  sol-11_3-repo_4of5.zip
68226843f6388f475314a0a1dd567245  sol-11_3-repo_5of5.zip
judi-dev-01#


judi-dev-01# digest -a md5 sol-11_3-repo_1of5.zip
62384c43cfb71c459e8e08c98f410c43
judi-dev-01#
judi-dev-01#
judi-dev-01# digest -a md5 sol-11_3-repo_2of5.zip
1a1d2139d9b4c0ddbf7d49bcfe2bdede
judi-dev-01#
judi-dev-01#
judi-dev-01# digest -a md5 sol-11_3-repo_3of5.zip
ea3552c45d530258cf05d94fe7807005
judi-dev-01#
judi-dev-01#
judi-dev-01# digest -a md5 sol-11_3-repo_4of5.zip
d1330a49ff181356273bbd7c647e2fee
judi-dev-01#
judi-dev-01#
judi-dev-01# digest -a md5 sol-11_3-repo_5of5.zip
68226843f6388f475314a0a1dd567245
judi-dev-01#


-I Optional. Creates an ISO image of the repository in the source directory. Also leaves a mkiso.log log file in the source directory.
-v Optional. Verifies the final repository.
-c Optional. Compares the checksums of the .zip files with the checksums in the specified file. If you specify -c with no argument, the default file used is the .md5 file for the -i image in the source directory.
-d Required. Specifies the full path to the directory where you want the repository.
-s Optional. Specifies the full path to the directory where the .zip files are located. Default: The current directory.


Execute the install-repo.ksh script to create local repo,
======================================
judi-dev-01# ./install-repo.ksh -s /var/tmp/SRU11.3.14.6.0/localrepo -d /sol.11.3.repo/repo -c -v -I
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 /solaris_IPS_repo/solaris.11.3.
Initiating repository verification.
Scanning repository (this could take some time)                     0/5480 /
         WARNING: Restrictive permissions.
            Path: /solaris_IPS_repo
          Detail:
Some repository content for publisher 'solaris' or paths leading to
the repository were not world-readable or were not readable by
'pkg5srv:pkg5srv', which can cause access errors if the repository
contents are served by the following services:
svc:/application/pkg/server  svc:/application/pkg/system-repository.
Only the first path found with restrictive permissions is shown.



judi-dev-01#




Updating the latest SRU
==================
judi-dev-01# ./install-repo.ksh -s /var/tmp/SRU11.3.14.6.0 -d /sol.11.3/repo -v
Using p24921515_1100_SOLARIS64 files for sol-11_3_13_4_0-incr-repo download.
IPS repository exists at destination /sol.11.3/repo
Current version: 0.175.3.1.0.5.0
Do you want to add to this repository? (y/n)[n]: y
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 /sol.11.3/repo.
Initiating repository rebuild.
Initiating repository verification.
Scanning repository (this could take some time)                     0/6694 /
         WARNING: Restrictive permissions.
            Path: /sol.11.3/repo/publisher
          Detail:
Some repository content for publisher 'solaris' or paths leading to
the repository were not world-readable or were not readable by
'pkg5srv:pkg5srv', which can cause access errors if the repository
contents are served by the following services:
svc:/application/pkg/server  svc:/application/pkg/system-repository.
Only the first path found with restrictive permissions is shown.


judi-dev-01#


Update a package from latest SRU in Client machine
======================================
judi-dev-01 # pkg update service/network/ntp
            Packages to update:   1
            Services to change:   2
       Create boot environment:  No
Create backup boot environment: Yes

DOWNLOAD                                PKGS         FILES    XFER (MB)   SPEED
Completed                                1/1         24/24      1.4/1.4  1.1M/s

PHASE                                          ITEMS
Removing old actions                             2/2
Installing new actions                           2/2
Updating modified actions                      27/27
Updating package state database                 Done
Updating package cache                           1/1
Updating image state                            Done
Creating fast lookup database                   Done
Updating package cache                           1/1
judi-dev-01 #


~
solaris 11 IPS repository
sru update in IPS repository
setup IPS repository
IPS repository in solaris 11
setup IPS repository in solaris 11
how to setup IPS repository in solaris 11
solaris 11.3 sru download
download solaris 11.3 iso
~


Dec 13, 2016

NFS share in solaris

NFS share in Solaris 10


Share NFS directory in solaris

1.   Edit /etc/dfs/dfstab and update the entry
          share -F nfs -o ro -d "NetBackUP Logs" /nbulogs

2.   Issue this command to share the nfs
          shareall

3.   View the shares
          showmount -e 0
          showmount -e localhost
          showmount -e judi-dev-01

4.   Currently exported NFS filesystems are listed in the /etc/dfs/sharetab
          cat /etc/dfs/sharetab


NFS share zfs in solaris 11



1.   NFS share in Solaris 10 ZFS
          zfs set sharenfs='rw=judi-dev-01:judi-dev-02' testpool/datadir

2.   NFS share in Solaris 11 ZFS
          zfs set sharenfs=on testpool/datadir

          zfs set share=name=datashare,path=/datadir,prot=nfs,root=@judi-dev-01:@judi-dev-02,rw=@judi-dev-01:@judi-dev-02 testpool/datadir    OR
          zfs set share=name=oracledata,path=/datadir,prot=nfs,r,sec=sys,rw=*,root=*,anon=root pool/tempfs

3.   To un-share the file system we shared :
          zfs unshare testpool/datadir

4.   To get details about the nfs share and its properties
          zfs get share testpool/datadir
          zfs get sharenfs testpool/datadir
          cat /etc/dfs/sharetab

5.   Mount with options
          mount -F nfs -o proto=tcp,vers=3,rw,bg,soft,rsize=32768,wsize=32768,timeo=600 judi-dev-01:/temp_DB_migration /temp_DB_space

          For error :ORA-27054: NFS file system where the file is created or resides is not mounted with correct options - Mount with below option
          mount -o rw,timeo=600,hard,wsize=32768,vers=3,rsize=32768,proto=tcp judi-dev-01:/vol/vol_db_migration_002/migration /temp_DB_space

RMAN Mount point option for Solaris :

          mount -o rw,bg,hard,nointr,rsize=1048576,wsize=1048576,vers=3,proto=tcp,forcedirectio judi-dev-01:/vol/vol_db_migration_002/migration /temp_DB_space





Solaris Init level and reboot commands

Solaris Init level and reboot commands

1.   This command directly take the server to single user mode, not a clean reboot ( not advisable)
         init s

2.   Proper way of booting in single user mode is
      Bring the server to OK prompt and boot in single user mode
         init 0
         boot -s
         boot mirrordisk -s

OR
3.   Restart the server and boot in single user mode
         reboot -- -s
         reboot -- cdrom2 -s

4.   Shutdown a server
         init 5

5.   Shutdown / restart the server with grace period
      Command is used to reboot a SPARC server in three minutes without prompting confirmation
         shutdown -i init-state -g grace-period -y

         shutdiwn -i6 -g180 -y

6.   Perform a reconfiguration reboot and boot the server in single user mode
         reboot -- -rs

7.   Perform a reconfiguration reboot from OS or Reconfiguration boot from OBP
         reboot -- -r
         boot -r

8.   Change Solaris default run level to single user mode (SUM)
         svcadm milestone -d svc:/milestone/single-user:default

9.   Change Solaris default run level to Multi User mode,
         svcadm milestone -d all

10.   Restart the server and boot in single user mode from cdrom
         reboot -- cdrom2 -s

11.   Restart the server and boot in single user mode from secondary disk
         reboot -- disk1 -s



Solaris init level and reboot commands, 
solaris init level,
solaris reboot commands,
Solaris default run level,
Change Solaris run level,

Change default run level in Solaris,

~Judi~

Solaris 10 - Patching

Solaris 10 - Patching



1. Display about installed patch information
patchadd -p

2. To verify whether a particular patch has been applied to your system
patchadd -p | grep 111879

3. Apply the signed or unsigned patch. If you downloaded a signed patch, apply it.
patchadd /tmp/111879-01.jar

4. If you downloaded an unsigned patch, apply it.
patchadd /tmp/111879-01

Configure IP in Solaris 10

Configure IP in Solaris 10


1. Determine which interfaces are currently installed on the system.
dladm show-link

2. Configure and plumb each interface.
ifconfig qfe0 plumb up

3. Assign an IPv4 address and netmask to the interface.
ifconfig qfe0 192.168.1.10 netmask + 255.255.255.0
OR
ifconfig vnet2 plumb up
ifconfig vnet2 192.168.1.10/24

4. Verify that the newly configured interfaces are plumbed and configured
ifconfig -a

5. To make the interface configuration persist across reboots
vi /etc/hostname.qfe0
judi-dev-01 (alias name or the IP)

6. Edit the /etc/hosts file and update the entry
  judi-dev-01 192.168.1.10



ifconfig vnet2 192.168.1.10 netmask 255.255.255.0 broadcast + up
ifconfig vnet2 192.168.1.10/24 broadcast + plumb up

ifconfig vnet2 plumb up
ifconfig vnet2 192.168.1.10/24


~
config ip address in solaris 10
solaris 10 configure network
how to configure ip address in solaris 10
change ip address solaris 10 without reboot
IP Configuration in solaris 10
~


Monitor Network Packet Transfers and Analyse at microscopic level

1. Capture packets in a file for a particular port
snoop -s 65536 -o /tmp/snoop.out.pcap port 22
snoop -d vnet0 -o /tmp/servername.pcap -v port 22

2.  Capture packets in a file for a network interface particular port (solaris 11)
snoop -I net0 -v port 22
snoop host 192.168.1.20 port 162 #Capture packets of port 162 from remote host
snoop -I ipmp0 -v host 192.168.0.10 port 514 # Capture packets of port 162 from remote host

3.  Inspect / view  the snoop output captures file
snoop -i /tmp/snoop.out.pcap

4.  Packet capture for the specified IPMP group. (Solaris 11)
snoop -I ipmp-group
snoop -I ipmp0

5.  Capture the traffic from the host 192.168.0.10 coming through the interface ipmp0 to a file (Solaris 11)
snoop -I ipmp0 -o /tmp/snoop.out.pcap host 192.168.0.10

6.  Analyse snoop output file in GUI tool Wireshark
Wireshark is the world’s foremost and widely-used network protocol analyzer.
It tells you see what’s happening on your network at a microscopic level
      Download and install Wireshark GUI tool in our PC / Laptop
      snoop -s 65536 -o /tmp/snoop.out.pcap -v port 22
      Copy the snoop output file to our PC / Laptop
      Right click and Open the .pcap file with Wireshark
      Now we can view the logs in Wireshark GUI tool with full details.



Linux Tcpdump
1.  Capture the traffic from the host 192.168.0.10 coming through the interface ens190 to a file
tcpdump -w /tmp/tcpdump_out.pcap -i ens190 dst 192.168.0.10

2.  Read the Captured Packets from File
tcpdump -r /tmp/tcpdump_out.pcap | head -100

3.  Check connectivity using nc command in linux
nc -v -z -w 5 judi-dev-01 1521




~Judi~

Popular Posts