Last active
September 6, 2016 15:53
-
-
Save renaissance-design/c5005506f6bcf3e6f29a3acbcb99a05a to your computer and use it in GitHub Desktop.
Deploy script for a new Virtualmin VPS
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 | |
# Script to install Virtualmin on CentOS 6 Minimal | |
# Chris Cox | |
# Install Virtualmin and dependencies | |
yum -y install perl perl-CGI | |
yum -y install git | |
wget http://software.virtualmin.com/gpl/scripts/install.sh | |
sh install.sh | |
# Update to PHP7 | |
yum -y update | |
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm | |
rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm | |
yum -y remove php* | |
yum -y install php70w php70w-opcache php70w-imap php70w-mysqlnd php70w-gd php70w-mcrypt php70w-mhash php70w-fpm php70w-mbstring php70w-dom | |
# Fail2Ban | |
yum -y install fail2ban | |
# LetsEncrypt requires Argparse | |
yum -y install python-argparse | |
# Install LogWatch | |
wget http://downloads.sourceforge.net/project/logwatch/logwatch-7.4.0/logwatch-7.4.0-1.noarch.rpm | |
yum -y install mailx | |
rpm -Uvh logwatch-7.4.0-1.noarch.rpm | |
crontab -l > /tmp/cron; echo '0 0 * * * /usr/sbin/logwatch' >> /tmp/cron; crontab /tmp/cron; | |
# Add cron jobs for SpamAssassin for all users: | |
crontab -l > /tmp/cron; echo '0 0 * * * /usr/bin/sa-learn --spam /home/*/homes/*/Maildir/.spam/cur' >> /tmp/cron; crontab /tmp/cron; # learn spam from spam folder | |
crontab -l > /tmp/cron; echo '0 0 * * * /usr/bin/sa-learn --ham /home/*/homes/*/Maildir/cur' >> /tmp/cron; crontab /tmp/cron; # learn ham from inbox | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment