Skip to content

Instantly share code, notes, and snippets.

View mansurali901's full-sized avatar

Mansur Ul Hasan mansurali901

View GitHub Profile
#!/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=
# Download and Install the Latest Updates for the OS
apt-get update && apt-get upgrade -y
# Install essential packages
apt-get -y install \
gcc g++ autoconf automake make sendmail git ruby zsh acl zip unzip \
pkg-config gettext curl enchant \
libpcre3-dev libssl-dev libxml2 libxml2-dev libcurl4-openssl-dev libenchant-dev libfreetype6 libfreetype6-dev libbz2-dev \
libedit-dev libedit2 libtidy-dev libxslt1.1 libxslt1-dev libvpx-dev libxpm-dev libedit-dev libreadline-dev \
libjpeg8-dev libmcrypt4 libmcrypt-dev libmhash-dev libmhash2 mcrypt libc-client2007e libc-client2007e-dev
# Download and Install the Latest Updates for the OS
apt-get update && apt-get upgrade -y
# Set the Server Timezone to CST
echo "America/Chicago" > /etc/timezone
dpkg-reconfigure -f noninteractive tzdata
# Enable Ubuntu Firewall and allow SSH, HTTP & HTTPS Ports
ufw enable
ufw allow 22
# Download and Install the Latest Updates for the OS
apt-get update && apt-get upgrade -y
# Set the Server Timezone to CST
echo "America/Chicago" > /etc/timezone
dpkg-reconfigure -f noninteractive tzdata
# Enable Ubuntu Firewall and allow SSH & MySQL Ports
ufw enable
ufw allow 22
# Download and Install the Latest Updates for the OS
apt-get update && apt-get upgrade -y
# Set the Server Timezone to CST
echo "America/Chicago" > /etc/timezone
dpkg-reconfigure -f noninteractive tzdata
# Enable Ubuntu Firewall and allow SSH & MySQL Ports
ufw enable
ufw allow 22
# Download and Install the Latest Updates for the OS
apt-get update && apt-get upgrade -y
# Set the Server Timezone to CST
echo "America/Chicago" > /etc/timezone
dpkg-reconfigure -f noninteractive tzdata
# Enable Ubuntu Firewall and allow SSH & MySQL Ports
ufw enable
ufw allow 22
# Download and Install the Latest Updates for the OS
apt-get update && apt-get upgrade -y
# Set the Server Timezone to CST
echo "America/Chicago" > /etc/timezone
dpkg-reconfigure -f noninteractive tzdata
# Enable Ubuntu Firewall and allow SSH & MySQL Ports
ufw enable
ufw allow 22
# To install C/C++ Compilers, AutoConf and AutoMake
yum install gcc gcc-c++ autoconf automake -y
# Install Perl Compatible Regular Expressions Libraries (PCRE)
yum install pcre-devel -y
# Download Apache Source from Apache's Website
# http://httpd.apache.org/download.cgi
wget http://www.us.apache.org/dist/httpd/httpd-2.x.x.tar.gz
#!/bin/bash
## This is an open Source script written for Optimize Linux Box.
## Author Mansur ul hasan
## Email [email protected]
clear
#<!------------- Notification Setting function
notification_func(){
@mansurali901
mansurali901 / Terminate.sh
Last active July 10, 2018 08:38
Terminate AWS instance enabled with Termination Protection usin AWS CLI Tool
#!/bin/bash
#
# This Script is Designed to Search and Termintate instances
# AWS Cloud using API Tool
# Author Mansur UlHasan
# [email protected]
#
# Search instance with specific criteria