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

Linux Version : CentOS 7.5 Oracle Version : 18c (18.3.0.0) 1. Download the Zip file from Oracle Website and create groups and oracle user(https://www.oracle.com/technetwork/database/enterprise-edition/downloads/oracle18c-linux-180000-5022980.html ) ## 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 … Continue reading Install Oracle 18c(18.3) on CentOS 7.5 Silent Mode

SCP and Pass Variable in Bash Script

#!/bin/bash read -p 'Enter the Files to be Send to Remote Host: ' files destination_directory='/home/oracle' scp -i /Users/shadab/wha.pem $files oracle@192.168.1.200:$destination_directory ## SAMPLE USAGE ## # shadabs-MacBook-Pro:~ shadab$ ./scp_files.sh #Enter the Files to be Send to Remote Host: *.sh #scp_files.sh 100% 344 39.1KB/s 00:00 #scp_files_gone.sh 100% 344 52.3KB/s 00:00 # # #shadabs-MacBook-Pro:~ shadab$ ./scp_files.sh #Enter the … Continue reading SCP and Pass Variable in Bash Script

A Very Cool Oracle Bash Profile

# .bash_profile # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi # User specific environment and startup programs PATH=$PATH:$HOME/.local/bin:$HOME/bin export PATH # Oracle Settings export TMP=/tmp export ORACLE_HOSTNAME=easyoradba.com 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 PATH=/usr/sbin:$PATH:$ORACLE_HOME/bin:$CATALINA_HOME/bin 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' … Continue reading A Very Cool Oracle Bash Profile

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 … Continue reading Create pem file for SSH access Linux

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 … Continue reading 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.

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 … Continue reading Documentation#1193 – Unknown system variable ‘lc_messages’

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 https://rpm.nodesource.com/setup_8.x | sudo -E bash - $ yum install nodejs   2. Check the version for Node and NPM $ node -v v8.11.1 $ npm -v 5.6.0   … Continue reading Install NodeJS on CentOS 6 – 7

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 … Continue reading Execute Windows Commands from Linux using winexe. Connect from Linux to Windows without SSH

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 … Continue reading Compare 2 Servers RPM and Install RPM from Text File List

Shell Script to Ping Hostnames and Send SMS if Host is not Available

We use the below procedure to ping hosts and based on availability send SMS to our team. The SMS is send by calling a web service from the BASH Shell script using curl  The hosts are defined in a file called hosts.txt -- Shell Script -- #!/bin/bash current_time=$(date "+%Y%m%d%H%M%S%3N") #### Above Date Format is in … Continue reading Shell Script to Ping Hostnames and Send SMS if Host is not Available