This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Script is setup for Mysql Replication Monitoring | |
# Author Mansur UlHasan | |
# Mail [email protected] | |
# Mail Function | |
# Variables | |
HOME="/usr/local/cron" | |
Err1=`mysql -pv1t@m1nC -e 'show slave status \G;' |grep Last_Errno:` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Enter a new user name and password to use as the local administrator account | |
# for remotely accessing the VM. | |
$cred = Get-Credential | |
# Name of the storage account where the VHD is located. This example sets the | |
# storage account name as "myStorageAccount" | |
$storageAccName = "NewStorageAccountName" | |
# Name of the virtual machine. This example sets the VM name as "myVM". | |
$vmName = "NewVMName" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This Script is written By | |
# Mansur Ul Hasan (Sr, Network & System Administrator) | |
# GFK Etilize Pak | |
# This script will install all dependencies for IONA | |
# Below Script is Tested on | |
CheckPoint () { | |
OS="`head -n1 /etc/issue |awk '{print $1,$2,$3}'`" | |
case $OS in | |
'Ubuntu 14.04.4 LTS') | |
echo "Alert This script will made some changes to your system if this is |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This script will install Apache Solr 4.10.4 | |
# Author Mansur Ul Hasan | |
# Sr, Network & Sys Admin | |
# GFK Etilize | |
### Main Installer Function | |
MainFunc () { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin | |
# Temporary Path where the archive will be created and stored before uploading to S3 | |
# Example: BACKUPPATH=/mnt | |
BACKUPPATH=/ | |
# Amazon S3 Bucket name | |
# Example: S3BUCKET=production-database-backups | |
S3BUCKET= |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This script is tested on CentOS for Installing Apache from Source Code | |
# Author Mansur UlHasan | |
# Sr, Network & Sys Admin | |
# GFK Etilize Pak | |
# To install C/C++ Compilers, AutoConf and AutoMake | |
yum install gcc gcc-c++ autoconf automake -y | |
# Install Perl Compatible Regular Expressions Libraries (PCRE) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:16.04 | |
MAINTAINER Mansur Ul Hasan <[email protected]> | |
RUN apt-get update -y | |
RUN apt-get install openssh-server -y | |
RUN mkdir /var/run/sshd | |
RUN echo 'root:Crawling!@#' | chpasswd | |
RUN sed -i 's/PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config | |
# SSH login fix. Otherwise user is kicked off after login | |
RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This script is written to collect system stats. | |
# Author : Mansur Ul Hasan | |
# Email : [email protected] | |
# Check RAM and SWAP Usages | |
free -m | grep -v "+\|You" > /tmp/ramcache | |
echo -e '\E[32m'"Ram Usages :" $tecreset | |
cat /tmp/ramcache | grep -v "Swap" | |
echo -e '\E[32m'"Swap Usages :" $tecreset |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# SQUID Installation automation | |
# Author Mansur Ul Hasan | |
# [email protected] | |
echo " | |
+++++++++++++++++++++++++++++++++++++++++++++++++++++++ | |
Installation script for SQUID 3.1.23 | |
This script is designed by | |
Mansur Ul Hasan |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This script is used to install PHP 5.4.3 | |
# In UBUNTU and Debian | |
# Author : Mansur Ul Hasan | |
# Email : [email protected] | |
# Compile / Install PHP from Source | |
cd /usr/local/src | |
wget -O- https://s3-us-west-2.amazonaws.com/lamp-software/latest/php-5.4.33.tar.gz | tar -zxf - | |
cd php-5.4.33 |