From 7d481c7a8a7f441ba651736ac9170dda95b98efb Mon Sep 17 00:00:00 2001 From: Jeff Moe Date: Mon, 13 Aug 2018 10:38:57 -0600 Subject: [PATCH] Add matomo --- source/resources/apps/matomo/README.md | 120 +++++++++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 source/resources/apps/matomo/README.md diff --git a/source/resources/apps/matomo/README.md b/source/resources/apps/matomo/README.md new file mode 100644 index 0000000..e43e9dd --- /dev/null +++ b/source/resources/apps/matomo/README.md @@ -0,0 +1,120 @@ +# Set up Debian node +# Set up collectd for apache2 + +# Install apache +apt install apache2 + +apt-get -y install mariadb-client libapache2-mod-php php-xml php php-cgi php-cli php-gd php-curl php-zip php-mysql php-mbstring wget unzip +cd /etc ; git add . ; git commit -a -m 'install php' + +a2enmod ssl +a2ensite default-ssl +service apache2 restart + +# Open firewall +# Allow web ports +-A INPUT -p tcp --dport 80 -j ACCEPT +-A INPUT -p tcp --dport 443 -j ACCEPT + +# Letsencrypt +apt-get install -t stretch-backports letsencrypt python-certbot-apache + +certbot --authenticator standalone --installer apache -d matomo.forksand.com --email certbot@forksand.com --pre-hook "service apache2 stop" --post-hook "service apache2 start" + +rm /etc/apache2/sites-enabled/default-ssl.conf + +service apache2 restart + +# Set up MySQL +# On sql1 +mysql -u root -p + +# In database: +CREATE DATABASE matomo; +CREATE USER 'matomo'@'10.42.1.219' IDENTIFIED BY 'password'; +GRANT ALL PRIVILEGES ON matomo.* TO 'matomo'@'10.42.1.219'; +FLUSH PRIVILEGES; + + +# Set up pen on matomo server +apt-get -y install pen +useradd pen +echo "d /var/run/pen 0755 pen pen -" > /etc/tmpfiles.d/pen.conf +systemd-tmpfiles --create + +mkdir -p /etc/pen +cat > /etc/pen/galera.cfg < /lib/systemd/system/pen-galera.service < + + + +############################################################################## + +############################################################################## +# Post install... +apt install libapache2-mod-geoip php-geoip