Skip to content

Instantly share code, notes, and snippets.

@projectivemotion
Last active December 30, 2019 04:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save projectivemotion/7e9e29352b5f771f4949b8127b0c8476 to your computer and use it in GitHub Desktop.
Save projectivemotion/7e9e29352b5f771f4949b8127b0c8476 to your computer and use it in GitHub Desktop.
Cent OS 7 Provision Docker, Epel, Php, Nginx, Git Screen, Wget
#!/bin/bash
# epel
yum install -y epel-release
# docker
yum install -y yum-utils device-mapper-persistent-data lvm2
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
yum install -y docker-ce
systemctl enable docker
curl -L https://github.com/docker/compose/releases/download/1.25.1-rc1/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
# utilities
yum install -y git screen vim rsync wget
# LAMP
yum install -y php nginx mariadb mariadb-server php-fpm php-pdo php-mysql php-mbstring
systemctl enable nginx
systemctl enable mariadb
# email
yum install -y mailx postfix squirrelmail
# ssl
yum install -y certbot-nginx
# security
yum install -y fail2ban
firewall-cmd --add-service=http
firewall-cmd --add-service=https
firewall-cmd --runtime-to-permanent
# update
yum update -y
# launch services
systemctl start nginx
systemctl start docker
systemctl start fail2ban
systemctl start mariadb
# todo add smart configuration
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment