Skip to content

Instantly share code, notes, and snippets.

View mahamuniraviraj's full-sized avatar

Raviraj Mahamuni mahamuniraviraj

  • Satara, India
View GitHub Profile
@mahamuniraviraj
mahamuniraviraj / installJava.txt
Last active May 10, 2017 16:03
Install Oracle Java 8 on CentOS 7
java -version
# visit http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
# determine latest jdk version
# accept license and select i586/x64 rpm version and click download .ex jdk-8uXXX-linux-x64.rpm where XXX is revision
@mahamuniraviraj
mahamuniraviraj / installMaven.txt
Last active November 17, 2017 04:12
install maven 3.5 on centos 7
# go to https://maven.apache.org/download.cgi
# download latest version Binary tar.gz archive file
# copy /opt directory
cd /opt
# extract tar file , replace x.x with downloaded version
tar xzvf apache-maven-x.x.0-bin.tar.gz
@mahamuniraviraj
mahamuniraviraj / installLatestGitOnCentOs7.txt
Created May 10, 2017 19:56
Install Latest Git On Cent OS 7
# Centos 7.3 comes with 1.8.3
# so update git from centos repo
yum update git
# it shows nothing to update
# we download git source and build and install latest git on Centos 7.3
@mahamuniraviraj
mahamuniraviraj / InstallMySQLOnCentOs7.txt
Created May 20, 2017 20:54
Install Mysql Community server latest (v5.7) on Centos 7
# Download the rpm file to add mysql repository from https://dev.mysql.com/downloads/repo/yum/
# download (mysql57-community-release-el7-XX.noarch.rpm) here XX is current version
# Downloaded file (mysql57-community-release-el7-11.noarch.rpm)
# Now add mysql repo
rpm -ivh mysql57-community-release-el7-11.noarch.rpm
# Now we can install mysql community
@mahamuniraviraj
mahamuniraviraj / How-To_Eclipse_MAT.txt
Created May 24, 2017 13:35
Analyse Java Application for memory usages using Eclipse Memory Analyzer
# Login to server on which java application is running
# Get Java PID
ps -ef | grep java
# Take Heapdump using commandline tool jmap which ships with jdk
# jmap -dump:format=b,file=<filepath> <pid>
@mahamuniraviraj
mahamuniraviraj / setenv.sh
Created June 26, 2017 12:19 — forked from patmandenver/setenv.sh
Tomcat8 setenv.sh
#
# Cutom Environment Variables for Tomcat
#
############################################
export JAVA_HOME=/usr/lib/jvm/java-7-oracle/jre
export PATH=${JAVA_HOME}/bin:${PATH}
############################################
#
# JAVA_OPTS
# To initialize a Git repository here, type the following command:
git init
# To get the current state of our repository
git status
# To Add files to staging area
git add filename.ext
git add *.java
@mahamuniraviraj
mahamuniraviraj / Update_svn_version_to1_8_on_Centos6.txt
Created August 9, 2017 09:08
Update svn version to 1.8 on Centos And Configure Eclipse
// Commands are starting with #
Step 1: Setup Yum Repository
Firstly we need to configure yum repository in our system. Create a new repo file /etc/yum.repos.d/wandisco-svn.repo and add following content as per your operating system version.
[WandiscoSVN]
@mahamuniraviraj
mahamuniraviraj / AutowiringSpringBeanJobFactory.java
Created October 1, 2017 08:47 — forked from jelies/AutowiringSpringBeanJobFactory.java
Quartz (2.1.6) java config with spring (3.2.1). Using a SpringBeanJobFactory to automatically autowire quartz classes.
package com.jelies.spring3tomcat7.config.quartz;
import org.quartz.spi.TriggerFiredBundle;
import org.springframework.beans.factory.config.AutowireCapableBeanFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.scheduling.quartz.SpringBeanJobFactory;
/**
* This JobFactory autowires automatically the created quartz bean with spring @Autowired dependencies.
@mahamuniraviraj
mahamuniraviraj / MongoDb Atlas Cluster Connection.txt
Created October 23, 2017 17:09
MongoDb Atlas Cluster Connection
mongo "mongodb://cluster0-shard-00-00-ygicr.mongodb.net:27017,cluster0-shard-00-01-ygicr.mongodb.net:27017,cluster0-shard-00-02-ygicr.mongodb.net:27017/test?replicaSet=Cluster0-shard-0" --authenticationDatabase admin --ssl --username mahamuniraviraj --password <PASSWORD>