This file contains 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 | |
# PhalconPhp with PHP7 installation on ubuntu:16.04 | |
sudo apt-get update | |
sudo apt-get install -y php7.0-fpm \ | |
php7.0-cli \ | |
php7.0-curl \ | |
php7.0-gd \ |
This file contains 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
# Install Docker on Ubuntu 14.04.4 x64 | |
# Ref https://docs.docker.com/engine/installation/linux/ubuntulinux/ | |
# No interactive for now. | |
export DEBIAN_FRONTEND=noninteractive | |
# Update your APT package index. | |
sudo apt-get -y update | |
# Update package information, ensure that APT works with the https method, and that CA certificates are installed. | |
sudo apt-get install apt-transport-https ca-certificates | |
# Add the new GPG key. | |
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D |
This file contains 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
# Install Docker on Ubuntu 14.04.4 x64 | |
# Ref https://docs.docker.com/engine/installation/linux/ubuntulinux/ | |
# No interactive for now. | |
export DEBIAN_FRONTEND=noninteractive | |
# Update your APT package index. | |
sudo apt-get -y update | |
# Update package information, ensure that APT works with the https method, and that CA certificates are installed. | |
sudo apt-get -y install apt-transport-https ca-certificates | |
# Add the new GPG key. | |
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D |
This file contains 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 | |
sudo add-apt-repository ppa:ondrej/php | |
sudo apt-get update | |
sudo apt-get install -y apache2 | |
sudo ufw allow in "Apache Full" | |
sudo apt-get install -y mysql-server | |
# After running this command, select (Y), option 2, then (Y) for the rest of the prompts. | |
sudo mysql_secure_installation |
This file contains 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
############################################################################### | |
# 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 |
This file contains 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
provider "aws" { | |
region = "eu-west-1" | |
} | |
data "aws_availability_zones" "available" {} | |
resource "aws_security_group" "instance" { | |
name = "go-api-instance" | |
ingress { |
This file contains 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
upstream upstream-apache2 { | |
server 127.0.0.1:8080; | |
} | |
upstream upstream-nodejs { | |
server 127.0.0.1:3000; | |
} | |
server { | |
listen 80; |
This file contains 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 | |
echo "Generating an SSL private key to sign your certificate..." | |
openssl genrsa -des3 -out myssl.key 1024 | |
echo "Generating a Certificate Signing Request..." | |
openssl req -new -key myssl.key -out myssl.csr | |
echo "Removing passphrase from key (for nginx)..." | |
cp myssl.key myssl.key.org | |
openssl rsa -in myssl.key.org -out myssl.key |
This file contains 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
brew install gshuf |
This file contains 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
# | |
# Auth filter /etc/fail2ban/filter.d/nginx-auth.conf: | |
# | |
# Blocks IPs that makes too much accesses to the server | |
# | |
[Definition] | |
failregex = ^<HOST> -.*"(GET|POST).*HTTP.*" | |
ignoreregex = |
OlderNewer