IBM buys Redhat in US$34 Billion deal

In one of the largest software M&A ever, IBM has paid US$34 billion in cash to acquire the Enterprise opensource OS company Redhat. The merger was announced few hours before and has come as a shock to many a companies.

This marks a new era in IBM’s cloud push, but what would be interesting is to watch how IBM would treat Redhat’s cash cow Redhat Enterprise Linux. Will it let Redhat run as an independent entity or start tightly coupling it with IBM’s Power cpu architecture.

You can read more on the news in the link below:


Install Oracle 18c(18.3) on CentOS 7.5 Silent Mode

Linux Version : CentOS 7.5
Oracle Version : 18c (

1. Download the Zip file from Oracle Website and create groups and oracle user( ) ##

groupadd oinstall
groupadd dba

useradd oracle -g oinstall -G dba
passwd oracle

Create .bash_profile , in my test server i use 3 different Oracle homes and versions, so the bash profile looks a bit extra funky 😉

# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc

# User specific environment and startup programs
export CATALINA_HOME=/home/oracle/apache-tomcat
export PATH
export EDITOR=vi

if [ -s “$MAIL” ] # This is at Shell startup. In normal
then echo “$MAILMSG” # operation, the Shell checks
fi # periodically.

echo ” ”
echo ” ”
echo ” ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~”
echo ” Database options”
echo ” ”
echo ” ”
echo ” 1) DATABASE 12cR2″
echo ” ”
echo ” 2) DATABASE 12cR1″
echo ” ”
echo ” 3) DATABASE 18.3″
echo ” ”
echo ” ”
echo ” ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~”
echo ” ”
echo ” ”
echo ” Enter Choice:\c”
read env
if [ $env -eq 1 ] ; then
export ORACLE_HOME=/u01/app/oracle/product/12.2.0/dbhome_1
export ORACLE_BASE=/u01/app/oracle
export ORACLE_SID=ora12c

if [ $env -eq 2 ] ; then
export ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_1
export ORACLE_BASE=/u01/app/oracle
export ORACLE_SID=moovorix

if [ $env -eq 3 ] ; then
export ORACLE_HOME=/u01/app/oracle/product/18.3.0/dbhome_1
export ORACLE_BASE=/u01/app/oracle
export ORACLE_SID=ora18c
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib:/lib
export LIBPATH=$ORACLE_HOME/lib32:$ORACLE_HOME/lib:/usr/lib:/lib
export PATH=$PATH:$ORACLE_HOME/bin:/u01/app/$ORACLE_HOME/OPatch
stty erase ^?
TMOUT=0;TIMEOUT=600;export readonly TMOUT TIMEOUT
set -o vi

echo ”
echo ”

alias tsmd=’cd /opt/tivoli/tsm/client/oracle/bin64/’
alias ob=’cd $ORACLE_BASE’
alias oh=’cd $ORACLE_HOME’
alias tns=’cd $ORACLE_HOME/network/admin’
alias ch=’cd $CATALINA_HOME’
alias envo=’env | grep ORACLE’
alias sqld=’rlwrap sqlplus “/as sysdba”‘
alias cpu=”cat /proc/cpuinfo | awk ‘/^processor/{print $3}’ | wc -l”
alias py=’/usr/bin/python3.6′
alias py2=’/usr/bin/python’
export PATH
umask 022


2. Install all the pre-requisites, if your on Oracle Linux there is an RPM you can install : oracle-database-preinstall-18c

Else if you prefer do the pre-requisites manually (Which I do)

Check for missing packages

rpm -q –qf ‘%{NAME}-%{VERSION}-%{RELEASE}(%{ARCH})\n’ binutils \
compat-libcap1 \
compat-libstdc++-33 \
elfutils-libelf \
elfutils-libelf-devel \
gcc \
gcc-c++ \
glibc \
glibc-common \
glibc-devel \
glibc-headers \
ksh \
libaio \
libaio-devel \
libgcc \
libstdc++ \
libstdc++-devel \
make \
libXext \
libXtst \
libX11 \
libXau \
libxcb \
libXi \
sysstat \
unixODBC \

Install missing packages with Yum
rpm -Uvh compat-libcap1

Update Kernel Parameters

Open sysctl.conf file and add the kernel parameters

vi /etc/sysctl.conf

fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 1073741824
kernel.shmmax = 4398046511104
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500

Add Limits for Oracle user

Open file limits.conf and add below parameters

vi /etc/security/limits.conf

–shell limits for users oracle 18c

oracle soft nofile 1024
oracle hard nofile 65536
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft stack 10240
oracle hard stack 32768

3. Silent Installation of 18c Software, the new installer is a zipped Oracle Home which you need to unzip to your Oracle Home directory and installation command just relinks all libraries. The installation is super quick due to this, afer this installation you are never going back to the normal runInstaller again

mkdir -p /u01/app/oracle/product/18.3.0/dbhome_1/

unzip -q -d /u01/app/oracle/product/18.3.0/dbhome_1/

cd /u01/app/oracle/product/18.3.0/dbhome_1/

sed -e ‘/\s*#.*$/d’ -e ‘/^\s*$/d’ install/response/db_install.rsp > install/response/db_18c.rsp

cat install/response/db_18c.rsp
## Remove all other parameters and just leave the below ##


## If an error “[WARNING] [INS-13001] Oracle Database is not supported on this operating system 18c” pops up; the use parameter ignoreInternalDriverError in the runinstaller ##

./runInstaller -silent -responseFile install/response/db_18c.rsp -ignoreInternalDriverError

## As Root User ##
sh /u01/app/oracle/product/18.3.0/dbhome_1/

4. Silent Creation of Database using dbca silent mode

dbca -createDatabase -silent -gdbName ora18c -templateName General_Purpose.dbc -sysPassword sys123 -systemPassword sys123 -dbsnmpPassword sys123 -datafileDestination /u01/oradata -storageType FS -memoryPercentage 20 -emConfiguration NONE -sampleSchema false

[FATAL] [DBT-50000] Unable to check for available memory.
[FATAL] [DBT-50001] Unable to check the value of kernel parameter {0}

While creating a on-premise 18c (18.3) database with DBCA in the silent mode If you get above error. Then use the parameter -J-Doracle.assistants.dbca.validate.ConfigurationParams=false ; it can be used both in cli and gui ##

dbca -createDatabase -silent -gdbName ora18c -templateName General_Purpose.dbc -sysPassword sys123 -systemPassword sys123 -dbsnmpPassword sys123 -datafileDestination /u01/oradata -storageType FS -memoryPercentage 20 -emConfiguration NONE -sampleSchema false -J-Doracle.assistants.dbca.validate.ConfigurationParams=false

5. Create Listener for 18c

cd /u01/app/oracle/product/18.3.0/dbhome_1/admin/network

vi listener.ora

(GLOBAL_DBNAME = ora18c)
(ORACLE_HOME = /u01/app/oracle/product/18.3.0/dbhome_1)
(SID_NAME = ora18c)


lsnrctl start LISTENER_18C

Checking from SQL*PLUS

SQL*Plus: Release – Production on Mon Aug 13 04:03:10 2018

Copyright (c) 1982, 2018, Oracle. All rights reserved.

Connected to:
Oracle Database 18c Enterprise Edition Release – Production

SQL> select name,open_mode from v$database;

——— ——————–

Dkam7GRUwAA3XXJ.jpg large

SCP and Pass Variable in Bash Script


read -p 'Enter the Files to be Send to Remote Host: ' files

scp -i /Users/shadab/wha.pem $files oracle@$destination_directory

# shadabs-MacBook-Pro:~ shadab$ ./
#Enter the Files to be Send to Remote Host: *.sh 100% 344 39.1KB/s 00:00 100% 344 52.3KB/s 00:00
#shadabs-MacBook-Pro:~ shadab$ ./
#Enter the Files to be Send to Remote Host: 100% 434 80.5KB/s 00:00

You can now add alias for this script in .bashrpc file

alias scpo=’sh /Users/shadab/’

A Very Cool Oracle Bash Profile

# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc

# User specific environment and startup programs


export PATH

# Oracle Settings
export TMP=/tmp

export ORACLE_UNQNAME=ora12c
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/12.2.0/dbhome_1
export ORACLE_SID=ora12c
export CATALINA_HOME=/home/oracle/apache-tomcat


export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib;
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib;

alias ob='cd $ORACLE_BASE'
alias oh='cd $ORACLE_HOME'
alias tns='cd $ORACLE_HOME/network/admin'
alias ch='cd $CATALINA_HOME'
alias envo='env | grep ORACLE'
alias sqld='rlwrap sqlplus "/as sysdba"'

umask 022


Create pem file for SSH access Linux

It is always good practice to lock down password based logins and SSH using keys. We can use pem files to login to remote server from local machines. Infact if you use AWS, the only way to SSH into the server is using pem files.

This procedure can be done on any server cloud based or sitting on your LAN

1. On your local Machine from where you require access, I prefer to keep it in the home directory of the user

# cd $HOME

# ssh-keygen -t rsa -b 2048

Generating public/private rsa key pair.
Enter file in which to save the key (/Users/shadab/.ssh/id_rsa): wha
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in wha.
Your public key has been saved in
The key fingerprint is:
The key’s randomart image is:
+—[RSA 2048]—-+
| |
| . |
|= o |
|oB . . |
| o+ .o S |
|.+.o= .. |
|+ o*.Xo.+ |
|o =o&.BO o |
| + E+X++=.. |

The file which i chose to create is “wha”, this will create 3 files “wha”, “wha.pem”, “”

wha.pem is empty for now
wha : is your private key : is your public key



2. Keep the private key (wha) as it is and create a pem file from it

# rsa -in wha -outform pem > wha.pem

writing RSA key

Now the pem file is created. Next step to copy public key to remote server

Note: If you dont have rsa utility on your local machine, with a simple copy command also you can create the pem file.

# cp -p wha wha.pem



3. Copy the public key to your remote server, which needs to be accessed

# ssh-copy-id -i root@

/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: “”
The authenticity of host ‘ (’ can’t be established.
ECDSA key fingerprint is SHA256:*************************.
Are you sure you want to continue connecting (yes/no)? yes
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed — if you are prompted now it is to install the new keys
root@ password:

Number of key(s) added: 1

Now try logging into the machine, with: “ssh ‘root@′”
and check to make sure that only the key(s) you wanted were added.



4. Change the permissions of your local machine pem file

# chmod 400 wha.pem



5. Login to remote server with pem file to check

# ssh -i /Users/shadab/wha.pem root@


6. Disable SSH Access to server

On the remote server with root user

# vim /etc/ssh/sshd_config

Change parameter PasswordAuthentication yes to PasswordAuthentication no

Restart SSH Daemon

# systemctl restart sshd


# service sshd restart


P.S: If you need to do the same for any other user on the remote server. you just have to
copy the public key file with that user on the remote server


ssh-copy-id -i oracle@

ssh -i /Users/shadab/wha.pem oracle@



Column count of mysql.user is wrong. Expected 42, found 39. Created with MySQL 50173, now running 50560. Please use mysql_upgrade to fix this error.

This error occurred in my environment when i tried to create a user in MySQL, most likely you have upgraded MySQL Server (51. to 5.6  in my case) . After upgrading your MySQL you have to run  mysql_upgrade to fix any incompatibilities in System tables. If it finds any errors it automatically repairs it and upgrades all the internal data dictionary.

Just run the below command after upgrading your MySQL, restart MySQL and it will fix the issue.

# mysql_upgrade –force -u root -p

# service mysqld restart

Documentation#1193 – Unknown system variable ‘lc_messages’

This error you would usually see when you login to phpMyAdmin after an upgrade. This is related to your MySQL version, in my case I had upgraded my phpMyAdmin but the MySQL version was still on 5.1, after upgrading to MySQL 5.6 it solved the issue

You can upgrade MySQL to the latest version by downloading the latest rpm’s or use repository for the upgrade. I prefer to use the mysql repo’s as it is the best source of the latest release.


Install NodeJS on CentOS 6 – 7

Install Latest NodeJS on CentOS 6 or 7

1. Add Repo and Install NodeJS

For Stable Release:-

$ yum install -y gcc-c++ make
$ curl -sL | sudo -E bash –

$ yum install nodejs


2. Check the version for Node and NPM

$ node -v


$ npm -v



3. Create a Demo Server

$ vim demo_server.js

add below lines

var http = require(‘http’);
http.createServer(function (req, res) {
res.writeHead(200, {‘Content-Type’: ‘text/plain’});
res.end(‘Welcome To EasyOraDBA’);
}).listen(3005, “”);
console.log(‘Server is running at’);

4. Start the Node Server

[root@easyoradba CordovaApps]# node demo_server.js
Server is running at

Go to your Browser and Paste the URL, your WebServer has been started on port 3005

Execute Windows Commands from Linux using winexe. Connect from Linux to Windows without SSH

Winexe – is a software on Linux which uses RPC to run remote commands and might even come with your distribution’s packages. It depends on Samba for running rpc commands

Edit: even if your distro does not have it precompiled and you do not want to compile yourself, you should check out the Build Service – it is likely to have the binary version you would need for your system.

First Install samba-common on your Linux machine before beginning winexe

Use below article to check WinEXE installation

Winexe is a GNU/Linux based application that allows users to execute commands remotely on WindowsNT/2000/XP/2003/Vista/7/8 systems. It installs a service on the remote system, executes the command and uninstalls the service. Winexe allows execution of most of the windows shell commands.

How to install:
You can download the source package from here [Current version is winexe-1.00.tar.gz]

  1. tar -xvf winexe-1.00.tar.gz
  2. cd winexe-1.00/source4/
  3. ./
  4. ./configure
  5. make basics bin/winexe
  6. make “CPP=gcc -E -ffreestanding” basics bin/winexe (For X64 bit)

this will create a [ winexe ] binary file in the bin folder. You can use that binary to execute the windows commands from Linux.

or else there are some compiled version of binary itself available for download. You can download and use it from here.

The above version of winexe works only till version Windows Server 2012. For Windows Server 2012R2 requires below method to make winexe work with latest version of windows. Below method will get the code for samba and winexe from the github repository and we will have to build it for it to work.

Alternate Method (Best Method to Work with Latest Version of Windows 10 and Windows Server 2012R2)

  1. Install Samba on Linux

yum install samba-common

2.      fixup a bunch of samba dependencies

yum install gcc perl mingw-binutils-generic mingw-filesystem-base mingw32-binutils mingw32-cpp mingw32-crt mingw32-filesystem mingw32-gcc mingw32-headers mingw64-binutils mingw64-cpp mingw64-crt mingw64-filesystem mingw64-gcc mingw64-headers libcom_err-devel popt-devel zlib-devel zlib-static glibc-devel glibc-static python-devel

yum install git gnutls-devel libacl1-dev libacl-devel libldap2-dev openldap-devel

  1. As per the docs, remove libbsd-devel if installed

yum remove libbsd-devel

  1. Clone the git repos. samba is huge, like 280MB

cd /usr/src

git clone git:// winexe-winexe-wafgit clone git:// samba

  1. per winexe bug 64, samba needs to be reverted to a6bda1f2bc85779feb9680bc74821da5ccd401c5

cd /usr/src/samba

git reset –hard a6bda1f2bc85779feb9680bc74821da5ccd401c5

  1. Fixup the build deps

cd /usr/src/winexe-winexe-waf/source

vi wscript_build

# modify ‘wscript_build’, and at the very end …stlib=’smb_static bsd z resolv rt’lib=’dl gnutls’

7.     Build it! his does a huge configure, then also compiles samba, which takes a while. 

./waf –samba-dir=../../samba configure build

8.     Executable should be  /usr/src/winexe-winexe-waf/source/build/winexe-static

cd /usr/src/winexe-winexe-waf/source/build/

cat </dev/null | ./winexe-static -U ‘domain\admin%$PWD’ //iihoserver01 “ipconfig -all”

cat </dev/null | ./winexe-static -U ‘domain\admin%$PWD’ //iihoserver01 “ipconfig -all” -d99

Sample on How to use it to Check Service on Linux :

export CHECK_COMMAND=’sc query “Notification Service”‘

export STOP_COMMAND=’sc stop “Notification Service”‘

export START_COMMAND=’sc start “Notification Service”‘

## Check Service Status ##

cat </dev/null | ./winexe-static -U ‘domain\admin%$PWD’ //iihoserver01 –interactive=0 “$CHECK_COMMAND”

## Check with Debug ##

cat </dev/null | ./winexe-static -U ‘domain\admin%$PWD’ //iihoserver01 –interactive=0 “$CHECK_COMMAND” -d99

## Run powershell script or command on windows then like below ##

winexe -U administrator%$PWD //$IP “powershell -Command & {(c:\User\administrator\powershell.ps1)}”


## Stop and Start Service ##

export CHECK_COMMAND=’sc query “Browser”‘

export STOP_COMMAND=’sc stop “Browser “‘

export START_COMMAND=’sc start “Browser “‘

cat </dev/null | ./winexe-static -U ‘domain\admin%$PWD’ //iihoserver01 –interactive=0 “$CHECK_COMMAND”

cat </dev/null | ./winexe-static –U ‘domain\admin%$PWD’ //iihoserver01 –interactive=0 “$STOP_COMMAND”

cat </dev/null | ./winexe-static -U ‘domain\admin%$PWD’ //iihoserver01 –interactive=0 “$START_COMMAND”



Compare 2 Servers RPM and Install RPM from Text File List

1. Generate RPM list on Old Server

rpm -qa –queryformat=’%{NAME}\n’ | sort > serverold.txt

2. Generate RPM list on New Server

rpm -qa –queryformat=’%{NAME}\n’ | sort > servernew.txt

3. Copy File to New Server and use diff comand to get differences

diff serverold.txt servernew.txt > diff.txt

4. Get list of packages missing in new Server

cat diff.txt | grep “<” > difference.txt

vi difference.txt

%s,< ,

## save and exit

5. Install missing packages on new server

yum -y install $(cat difference.txt)