Skip to content

Instantly share code, notes, and snippets.

View sheikhwaqas's full-sized avatar

Waqas Ashraf sheikhwaqas

View GitHub Profile
@sheikhwaqas
sheikhwaqas / setup-lemp.sh
Last active July 31, 2020 14:08
Install the LEMP stack on Ubuntu 16.04 LTS with Composer, Ruby, Sass & Compass
###############################################################################
# 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 / .bash_profile
Created June 13, 2013 16:04 — forked from JeffreyWay/.bash_profile
Recommended Bash Profile for Mac OS X
# 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-mongodb34-ubuntu16.sh
Last active September 17, 2020 09:55
Install mongoDB 3.4 on Ubuntu 16.04 LTS
###############################################################################
# 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 / vhost.conf
Last active September 30, 2021 09:54
Nginx Configuration for Laravel 8.x Deployment
server {
listen 80;
listen [::]:80;
server_name <domain_name>;
root <document_root>;
add_header X-Frame-Options "SAMEORIGIN";
add_header X-Content-Type-Options "nosniff";
@sheikhwaqas
sheikhwaqas / docker-compose.yml
Last active October 3, 2022 14:40
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
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 / install-docker.sh
Created April 9, 2018 13:11
Install Docker & Docker-Compose on Ubuntu 16.04 LTS (Xenial). Run this file with sudo.
# Install Pre-requisites
apt update
apt install apt-transport-https ca-certificates curl software-properties-common -y
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
apt update
# Install Docker CE
apt install docker-ce -y
@sheikhwaqas
sheikhwaqas / setup-mysql57-ubuntu16.sh
Created April 11, 2017 14:13
Install MySQL Server 5.7 on Ubuntu 16.04 LTS
###############################################################################
# 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
@sheikhwaqas
sheikhwaqas / setup-mysql.sh
Last active September 6, 2023 15:59
Install MySQL Server on Ubuntu (Non-Interactive Installation)
# 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
########################################################################
# 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-mongodb.sh
Last active March 7, 2024 05:37
Install MongoDB Server on Ubuntu
# 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