Skip to content

Instantly share code, notes, and snippets.

View mansurali901's full-sized avatar

Mansur Ul Hasan mansurali901

View GitHub Profile
@mansurali901
mansurali901 / setup_mongo_3.2.15.sh
Last active September 5, 2017 07:58
Install Mongo 3.2.15 in Ubuntu 16.04
# This script install Mongo 3.2.15 in Ubuntu 16.04
# Author Mansur Ul Hasan
# [email protected]
# Adding gpg key
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
# Adding MongoDB repository
echo "deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list
################## Setting up JAVA ##################
##echo "Downloading JAVA JDK 1.8 from Local repository......"
wget https://www.dropbox.com/s/dwsqw6gofynaf5e/jdk1.8.0_91.tar?dl=0
mv jdk1.8.0_91.tar?dl=0 jdk1.8.0_91.tar
##echo "Installing JAVA JDK 1.8"
mkdir -p /usr/java
mv jdk1.8.0_91.tar /usr/java/
#cd /usr/java/
## PhantomJS Secret dependencies for CasperJS
Rapt-get install libfontconfig -y
## Installing NodeJS
apt-get install nodejs -y
## Installing NPM
apt-get install npm -y
apt-get install pkg-config make g++ -y
#RUN add-apt-repository ppa:chris-lea/node.js -y
#RUN apt-get update -y
#RUN apt-get install nodejs -y
@mansurali901
mansurali901 / setup_redisserver.sh
Created September 5, 2017 06:34
Setting Up Redis Server on Ubuntu 16.04 LTS
#!/bin/bash
# This script is written to install redis
# on Ubuntu Server 16.04 & 14.04 LTS
# Author Mansur Ul Hasan
# Email [email protected]
Configuration_Redis () {
echo "Configuration Started...!"
mkdir /etc/redis
@mansurali901
mansurali901 / setup_bower-node-npm.sh
Last active November 7, 2017 04:24
Setup Bower NPM & Node
#!/bin/bash
# This script is written to install Bower Node and NPM
# on Ubuntu Server 16.04 & 14.04 LTS
# Author Mansur Ul Hasan
# Email [email protected]
install_proc () {
echo "Downloading Source Setup"
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sleep 2
#!/bin/bash
# This script is written to install Bower Node and NPM
# on Ubuntu Server 16.04 & 14.04 LTS
# Author Mansur Ul Hasan
# Email [email protected]
echo "Downloading Meta Items..."
wget -O - http://debian.neo4j.org/neotechnology.gpg.key | apt-key add -
echo 'deb http://debian.neo4j.org/repo stable/' > /etc/apt/sources.list.d/neo4j.list
# This script install OpenJDK 1.8 in Ubuntu 16.04
# Author Mansur Ul Hasan
# [email protected]
# Adding PPA repository
add-apt-repository ppa:openjdk-r/ppa -y
# Updating System Repository
apt-get update -y
# This script install Mongo 3.4 in Ubuntu 16.04
# Author Mansur Ul Hasan
# [email protected]
SetupMongo3_4 () {
# Adding gpg key
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6
# Adding MongoDB repository
echo "deb [ arch=amd64,arm64 ] http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list
@mansurali901
mansurali901 / setup_tomcat8_centos6x.sh
Last active November 3, 2017 04:59
Setup Tomcat 8 in CentOS 6.x
#!/bin/bash
# this script build tomcat8 on CentOS 6.x and 7.x
# with Java OpenJDK 8
# Author : Mansur Ul Hasan
# Servers Planets Inc.
# Email : [email protected], [email protected]
# Gist : https://gist.github.com/mansurali901
UpdateRepo () {
@mansurali901
mansurali901 / GetSwapUsage.sh
Created November 3, 2017 05:11
Get Swap Usage Information in Linux
#!/bin/bash
# Get current swap usage for all running processes
# Courtesy By : Erik Ljungstrom 27/05/2011
# Midified By : Mansur Ul Hasan
# Email : [email protected], [email protected]
SUM=0
OVERALL=0
for DIR in `find /proc/ -maxdepth 1 -type d | egrep "^/proc/[0-9]"` ; do
PID=`echo $DIR | cut -d / -f 3`