Last active
December 30, 2019 04:46
-
-
Save projectivemotion/7e9e29352b5f771f4949b8127b0c8476 to your computer and use it in GitHub Desktop.
Cent OS 7 Provision Docker, Epel, Php, Nginx, Git Screen, Wget
This file contains hidden or 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 | |
# 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 | |
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