Saturday, 23 February 2019

How to check Manufacturer information in Linux

Option 1#
[root@said-db-serv ~]# dmidecode -t system
# dmidecode 3.0
Getting SMBIOS data from sysfs.
SMBIOS 3.0.0 present.

Handle 0x0100, DMI type 1, 27 bytes
System Information
Manufacturer: Dell Inc.
Product Name: PowerEdge R440
Version: Not Specified
Serial Number: 1XZ19R2
UUID: 4C4C4544-0058-5A10-8031-B1C04F395232
Wake-up Type: Power Switch
SKU Number: SKU=NotProvided;ModelName=PowerEdge R440
Family: PowerEdge

Handle 0x0C00, DMI type 12, 5 bytes
System Configuration Options
Option 1: NVRAM_CLR: Clear user settable NVRAM areas and set defaults
Option 2: PWRD_EN: Close to enable password

Handle 0x2000, DMI type 32, 11 bytes
System Boot Information
Status: No errors detected

[root@said-db-serv ~]#

Option 2#

[root@said-db-serv ~]# lshw -C system
utility-db-serv.bankasia-bd.com
    description: Rack Mount Chassis
    product: PowerEdge R440 (SKU=NotProvided;ModelName=PowerEdge R440)
    vendor: Dell Inc.
    serial: 1XZ19R2
    width: 64 bits
    capabilities: smbios-3.0.0 dmi-3.0.0 smp vsyscall32
    configuration: boot=normal chassis=rackmount family=PowerEdge sku=SKU=NotProvided;ModelName=PowerEdge R440 uuid=44454C4C-5800-105A-8031-B1C04F395232
  *-pnp00:00
       product: PnP device PNP0b00
       physical id: 9c
       capabilities: pnp
       configuration: driver=rtc_cmos
  *-pnp00:01
       product: PnP device PNP0c02
       physical id: 9d
       capabilities: pnp
       configuration: driver=system
  *-pnp00:05
       product: PnP device PNP0c02
       physical id: a1
       capabilities: pnp
       configuration: driver=system
  *-pnp00:06
       product: PnP device PNP0c02
       physical id: a2
       capabilities: pnp
       configuration: driver=system
[root@said-db-serv ~]# 

Monday, 18 February 2019

step by step password less SSH configuration in Linux



Source IP: 10.11.1.109
Destination: 10.11.1.98

Step 1. Login into 10.11.1.109 server

Create Authentication SSH-Kegen Keys on

[oracle@Said-Server ~]$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/oracle/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/oracle/.ssh/id_rsa.
Your public key has been saved in /home/oracle/.ssh/id_rsa.pub.
The key fingerprint is:
84:2b:b3:20:79:ec:c2:65:0a:0d:b5:34:c3:33:d7:ff oracle@Said-Server
The key's randomart image is:
+--[ RSA 2048]----+
| .=  .           |
| o++. ..         |
|. .+  ...        |
| =     o.        |
|+ =oo . S.       |
|o++. +    E      |
|.o. .            |
| .               |
|                 |
+-----------------+
[oracle@Said-Server ~]$

Step 2: Create .ssh directory in 10.11.1.98 server

[oracle@Said-Server ~]$ ssh oracle@10.11.1.98 mkdir -p .ssh
oracle@10.11.1.98's password:
[oracle@Said-Server ~]$

Step 3: Upload Generated public key to 10.11.1.98 server

[oracle@Said-Server ~]$ cat .ssh/id_rsa.pub | ssh oracle@10.11.1.98 'cat >> .ssh/authorized_keys'
oracle@10.11.1.98's password:
[oracle@Said-Server ~]$

Step 4: set permission on 10.11.1.98 server

[oracle@Said-Server ~]$ ssh oracle@10.11.1.98 "chmod 700 .ssh; chmod 640 .ssh/authorized_keys"
[oracle@Said-Server ~]$

Step 5: Login from 10.11.1.106 to 10.11.1.98 server without password

[oracle@Said-Server ~]$ ssh oracle@10.11.1.98
Last login: Tue Feb 19 09:33:29 2019 from 10.11.208.115
[oracle@ncbsstd ~]$

Wednesday, 13 February 2019

Step by step to Oracle WebLogic Server Patch Set Update


----Check Weblogic Version---
/u01/oracle/middleware/wlserver_10.3/server/bin/setWLSEnv.sh

$ . $WL_HOME/server/bin/setWLSEnv.sh
  $ java weblogic.version

  [oracle@SAID-DR bin]$ . ./setDomainEnv.sh
[oracle@SAID-DR ClassicDomain]$ java weblogic.version

WebLogic Server 10.3.6.0  Tue Nov 15 08:52:36 PST 2011 1441050

Use 'weblogic.version -verbose' to get subsystem information

Use 'weblogic.utils.Versions' to get version information for all modules

----Download Weblogic Patch ----

[oracle@SAID-DR ClassicDomain]$

[oracle@SAID-DR ClassicDomain]$ pwd
/u01/oracle/middleware/user_projects/domains/ClassicDomain
[oracle@SAID-DR ClassicDomain]$
root@SAID-DR ~]# cd /u01/patch/
[root@SAID-DR patch]# chown oracle:oinstall p28710912_1036_Generic.zip
[root@SAID-DR patch]# chmod 755 p28710912_1036_Generic.zip
[root@SAID-DR patch]#

--------Apply Patch--------------
[oracle@SAID-DR ~]$ cd /u01/oracle/middleware/utils/bsu/
[oracle@SAID-DR bsu]$ ls -lrt
total 40
-rw-r--r-- 1 oracle oinstall 25214 Apr 24  2018 smartupdate.ico
-rw-r--r-- 1 oracle oinstall   516 Apr 24  2018 patch-client.jar
-rw-r--r-- 1 oracle oinstall   520 Apr 24  2018 bsu.jar
-rwxr-x--- 1 oracle oinstall   135 Apr 24  2018 bsu.sh
[oracle@SAID-DR bsu]$./bsu.sh

This is the syntax for the command to view the downloaded patches as below:

[oracle@SAID-DR bsu]$ ./bsu.sh -prod_dir=/u01/oracle/middleware/wlserver_10.3 -patch_download_dir=/u01/patch -status=downloaded -view -verbose
ProductName:       WebLogic Server
ProductVersion:    10.3 MP6
Components:        WebLogic Server/Core Application Server,WebLogic Server/Admi
                   nistration Console,WebLogic Server/Configuration Wizard and
                   Upgrade Framework,WebLogic Server/Web 2.0 HTTP Pub-Sub Serve
                   r,WebLogic Server/WebLogic SCA,WebLogic Server/WebLogic JDBC
                    Drivers,WebLogic Server/Third Party JDBC Drivers,WebLogic S
                   erver/WebLogic Server Clients,WebLogic Server/WebLogic Web S
                   erver Plugins,WebLogic Server/UDDI and Xquery Support,WebLog
                   ic Server/Evaluation Database,WebLogic Server/Workshop Code
                   Completion Support
BEAHome:           /u01/oracle/middleware
ProductHome:       /u01/oracle/middleware/wlserver_10.3
PatchSystemDir:    /u01/oracle/middleware/utils/bsu
PatchDir:          /u01/oracle/middleware/patch_wls1036
Profile:           Default
DownloadDir:       /u01/patch
JavaVersion:       1.6.0_29
JavaVendor:        Sun

[oracle@SAID-DR bsu]$

Install the patch:

[oracle@SAID-DR cache_dir]$ cp /u01/patch/p28710912_1036_Generic.zip /u01/oracle/middleware/utils/bsu/cache_dir/
[oracle@SAID-DR cache_dir]$ ls -lrt
total 98428
-rwxr-xr-x 1 oracle oinstall 100789655 Feb 14 03:39 p28710912_1036_Generic.zip
[oracle@SAID-DR cache_dir]$ unzip p28710912_1036_Generic.zip
Archive:  p28710912_1036_Generic.zip
  inflating: patch-catalog_26407.xml
  inflating: 7HKN.jar             
  inflating: README.txt           
[oracle@SAID-DR cache_dir]$ pwd
/u01/oracle/middleware/utils/bsu/cache_dir
[oracle@SAID-DR cache_dir]$

./bsu.sh -install -patch_download_dir=/u01/oracle/middleware/utils/bsu/cache_dir -patchlist=7HKN -prod_dir=/u01/oracle/middleware/wlserver_10.3


3.25 PM
[root@SAID-DR bsu]# cat bsu.sh
#!/bin/sh

JAVA_HOME="/usr/java/jdk1.6.0_34"

MEM_ARGS="-Xms1024m -Xmx4096m"            -----Modify the Memory parameter from 256 to 1024 and 512 to 4096

"$JAVA_HOME/bin/java" ${MEM_ARGS} -jar patch-client.jar $*
[root@SAID-DR bsu]#

[oracle@SAID-DR bsu]$ ./bsu.sh -install -patch_download_dir=/u01/oracle/middleware/utils/bsu/cache_dir -patchlist=7HKN -prod_dir=/u01/oracle/middleware/wlserver_10.3
Checking for conflicts.....
.....
No conflict(s) detected

Installing Patch ID: 7HKN..
Result: Success

[oracle@SAID-DR bsu]$
[oracle@SAID-DR bsu]$

----check if the patch is installed-------
./bsu.sh -prod_dir=/u01/oracle/middleware/wlserver_10.3 -status=applied -verbose -view

[oracle@SAID-DR bsu]$ ./bsu.sh -prod_dir=/u01/oracle/middleware/wlserver_10.3 -status=applied -verbose -view
ProductName:       WebLogic Server
ProductVersion:    10.3 MP6
Components:        WebLogic Server/Core Application Server,WebLogic Server/Admi
                   nistration Console,WebLogic Server/Configuration Wizard and
                   Upgrade Framework,WebLogic Server/Web 2.0 HTTP Pub-Sub Serve
                   r,WebLogic Server/WebLogic SCA,WebLogic Server/WebLogic JDBC
                    Drivers,WebLogic Server/Third Party JDBC Drivers,WebLogic S
                   erver/WebLogic Server Clients,WebLogic Server/WebLogic Web S
                   erver Plugins,WebLogic Server/UDDI and Xquery Support,WebLog
                   ic Server/Evaluation Database,WebLogic Server/Workshop Code
                   Completion Support
BEAHome:           /u01/oracle/middleware
ProductHome:       /u01/oracle/middleware/wlserver_10.3
PatchSystemDir:    /u01/oracle/middleware/utils/bsu
PatchDir:          /u01/oracle/middleware/patch_wls1036
Profile:           Default
DownloadDir:       /u01/oracle/middleware/utils/bsu/cache_dir
JavaVersion:       1.6.0_29
JavaVendor:        Sun


Patch ID:          7HKN
PatchContainer:    7HKN.jar
Checksum:          -1767993263
Severity:          optional
Category:          General
CR/BUG:            28710912
Restart:           true
Description:       WLS PATCH SET UPDATE 10.3.6.0.190115
WLS PATCH SET UPDATE 10
                   .3.6.0.190115


[oracle@SAID-DR bsu]$