Skip to content

Instantly share code, notes, and snippets.

Avatar

Waqas Ashraf sheikhwaqas

View GitHub Profile
@sheikhwaqas
sheikhwaqas / setup-mysql.sh
Last active May 6, 2021
Install MySQL Server on Ubuntu (Non-Interactive Installation)
View setup-mysql.sh
# 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
View setup-apache-nginx-multi-php.sh
########################################################################
# Installing and Configuring Apache & Nginx with Multiple PHP Versions #
# Apache will run on port 8080 and will be behind Nginx #
# Nginx will serve as a reverse proxy for Apache Sites #
# Nginx will act as the primary web and caching server #
########################################################################
# Update Packages
sudo apt update && sudo apt upgrade -y
@sheikhwaqas
sheikhwaqas / setup-mongodb34-ubuntu16.sh
Last active Sep 17, 2020
Install mongoDB 3.4 on Ubuntu 16.04 LTS
View setup-mongodb34-ubuntu16.sh
###############################################################################
# Install mongoDB Server on Ubuntu 16.04 LTS
###############################################################################
# Import the Public Key used by the Ubuntu Package Manager
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6
# Create a file list for mongoDB to fetch the current repository
echo "deb [ arch=amd64,arm64 ] http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-3.4.list
@sheikhwaqas
sheikhwaqas / .bash_profile
Created Jun 13, 2013 — forked from JeffreyWay/.bash_profile
Recommended Bash Profile for Mac OS X
View .bash_profile
# laravel new-app
alias laravel="git clone -o laravel -b develop https://github.com/laravel/laravel.git"
alias artisan="php artisan"
alias migrate="php artisan migrate"
alias serve="php artisan serve"
alias dump="php artisan dump"
alias t="phpunit"
# Generators Package
@sheikhwaqas
sheikhwaqas / setup-lemp.sh
Last active Jul 31, 2020
Install the LEMP stack on Ubuntu 16.04 LTS with Composer, Ruby, Sass & Compass
View setup-lemp.sh
###############################################################################
# Install nGinx and PHP 7 on Ubuntu 16.04 LTS
###############################################################################
# Install nGinx Server
apt install nginx
# Install PHP & and it's respective packages
apt install php-common php-fpm php-mysql php7.0-cli php7.0-common php7.0-fpm php7.0-json php7.0-mysql php7.0-opcache php7.0-readline php-bcmath php-bz2 php-calendar php-ctype php-curl php-date php-enchant php-gd php-intl php-mbstring php-mcrypt php-mongodb php-soap php-sqlite3 php-tidy php-xdebug php-xml php-xml-parser php-xml-rpc2 php-xml-serializer php-xml-svg php-xmlrpc php-zip
@sheikhwaqas
sheikhwaqas / docker-compose.yml
Last active Nov 17, 2019
Docker Compose configuration to run MySQL 5.6 and MySQL 5.7 on one instance. Create /var/lib/mysql56-data & /var/lib/mysql57-data with root as the owner of these directories before running docker-compose up -d
View docker-compose.yml
version: '3'
services:
mysql56:
image: mysql:5.6
restart: unless-stopped
container_name: mysql56-container
ports:
- "127.0.0.1:3356:3306"
environment:
MYSQL_ROOT_PASSWORD: rootPassword
@sheikhwaqas
sheikhwaqas / setup-webserver.sh
Last active Jul 18, 2019
Install Apache & PHP with MongoDB and XDebug Extensions on Ubuntu 14.04 LTS
View setup-webserver.sh
#!/bin/bash
# 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 allow 22
@sheikhwaqas
sheikhwaqas / mysqlbackup-tos3.sh
Last active Apr 10, 2019
Backup Individual MySQL Databases and Upload the same to Amazon S3. Please ensure Amazon AWS CLI tools are already installed and configured on the server.
View mysqlbackup-tos3.sh
#!/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=
@sheikhwaqas
sheikhwaqas / setup-mysql57-ubuntu16.sh
Created Apr 11, 2017
Install MySQL Server 5.7 on Ubuntu 16.04 LTS
View setup-mysql57-ubuntu16.sh
###############################################################################
# Install MySQL Server 5.7 on Ubuntu 16.04 LTS
###############################################################################
# Download and Install the Latest Updates for the OS
apt update && apt upgrade -y
# Install MySQL Server in a Non-Interactive mode. Default root password will be "root"
echo "mysql-server-5.7 mysql-server/root_password password root" | sudo debconf-set-selections
echo "mysql-server-5.7 mysql-server/root_password_again password root" | sudo debconf-set-selections
View keybase.md

Keybase proof

I hereby claim:

  • I am sheikhwaqas on github.
  • I am sheikhwaqas (https://keybase.io/sheikhwaqas) on keybase.
  • I have a public key ASAKmnco7goOktG8mZzZlAGmHelvaZu8joSYtU_C3Zem-go

To claim this, I am signing this object: