# 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