Skip to content

Instantly share code, notes, and snippets.

View mansurali901's full-sized avatar

Mansur Ul Hasan mansurali901

View GitHub Profile
@mansurali901
mansurali901 / statefull_nginx.tf
Last active August 22, 2019 13:05
This script consist with State Full Web Server with Nginx using terraform
############################################################################
# Author Mansur Ul Hasan
# EMail : [email protected]
# YouTube : https://www.youtube.com/user/mansur7820/about?view_as=subscriber
# This script consist with State Full Web Server with Nginx using terraform
# This script will setup
# - VPC
# - Subnets
# - Route Tables
@mansurali901
mansurali901 / main_ec2_complete_setup.tf
Last active June 7, 2019 13:52
This script setup whole infrastructure on AWS to run ec2 instance this will include VPC Setup (Including : "VPC", "Subnet", "internet Gateway", "Route Table", "Security Group to allow SSH") also it sets up EC2 Instance along with keypairs
##############################
# This script setup whole infrastructure on AWS to run ec2 instance this will include VPC Setup
# (Including : "VPC", "Subnet", "internet Gateway", "Route Table", "Security Group to allow SSH")
# also it sets up EC2 Instance along with keypairs
##############################
### Provider Setup
provider "aws" {
region = "us-east-2"
}
### Variables declearation
@mansurali901
mansurali901 / KubernetesSetupUbuntu.sh
Last active December 25, 2020 02:29
This script is meant to setup Kubernetes Environment on Ubuntu / Debian supported paltforms
#!/bin/bash
# Maintainer : Mansur Ul Hasan
# EMail : [email protected]
# LinkedIn : https://www.linkedin.com/in/mansurulhasan/
# Youtube : https://www.youtube.com/user/mansur7820/
# This script is meant to setup Kubernetes Environment on Ubuntu / Debian supported paltforms
# We have try to cover all the required tools modules which needed by modern kubernetes
# Disclaimer :
# This script is well tested on ubuntu 18 and 16
系统数据:
user() 当前用户
database() 当前数据库
version() SQL版本号,最后为系统版本(nt-windows)
@@datadir 数据库路径
连接型:
concat() concat(username,0x3a, password))
group_concat() select group_concat(DISTINCT file_priv, user) from mysql.user; //多个用户情况下, 查看load_file()权限
concat_ws() 与上类似
编码:
@mansurali901
mansurali901 / setup_apache_2.4.32.sh
Last active March 19, 2018 13:19
Install Apache2 in CentOS 6.8 with APR 1.6.3
#!/bin/bash
# This script is designed to installation apache
# from source code with all options using apr &
# apr-utils and library for portability
# Author : Mansur Ul Hasan
# EMail : [email protected]
# Skype : genious840
# Facebook : https://www.facebook.com/itmarkaz
# YouTube : https://www.youtube.com/user/mansur7820
@mansurali901
mansurali901 / setup_mysql5.7_source.sh
Last active September 22, 2020 00:04
Setup Mysql 5.7 from Source Code
#!/bin/bash
# This script used to install Mysql 5.7
# from source Code
# Author Mansur Ul Hasan
# [email protected]
# Environment Function
PrepBuildEnvFunc () {
@mansurali901
mansurali901 / setup_redis4-sourceCompile.sh
Last active June 29, 2018 06:56
This script will install Redis on Ubuntu or CentOS or RHEL7
#!/bin/bash
# This script install Redis 4 in RHEL7 / Ubuntu
# This installation is done from source code.
# Author : Mansur Ul Hasan
# Email : [email protected]
# Main Function
InstallR () {
cd /usr/local/redis
make distclean
@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
@mansurali901
mansurali901 / Setup_SQUID-3.1.23_CentOS.sh
Last active September 5, 2017 08:00
SQUID 3.1.23Installation Automation
#!/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
@mansurali901
mansurali901 / crawling-service.sh
Created January 1, 2017 20:36
IONA Crawling Service Setup
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