Keywords: Piwik - AWS - Technical issue - Other
bnsupport ID: 1fbce44a-fe7c-9745-5ae5-3cb0ea2866b6
Description:
AWS Lightsail + Bitnami LAMP 7.4.7-0 + Matomo (also known as Piwik)
*Hello there!
I came across matomo recently and decided to try it out. So I went ahead and fired up a lightsail instance with a LAMP stack. Unfortunately, I did not go very far. I first had issue with the php modules. Basically I wasn't sure if the required modules were already installed or not. Or if they were installed, but not enabled. And if they were present and disabled, I also wasn't able to get to where they would be. Below are my steps and the end result through the browser.*
Thank you in advance for anyone who will have time and take a look at this. Thanks very much.
AWS Lightsail: 512 MB RAM, 1 vCPU, 20 GB SSD
Stack: Bitnami LAMP 7.4.7-0 Approach A structure
Application: Matomo 3.14
sudo ssh -i ./.ssh/key bitnami@12.34.56.78
wget https://builds.matomo.org/matomo-latest.zip
sudo mkdir -p opt/bitnami/var/www/
sudo unzip matomo-latest.zip -d opt/bitnami/var/www/
sudo chown -R www-data:www-data opt/bitnami/var/www/matomo/
sudo cat /home/bitnami/bitnami_credentials the passcode
mysql -u root -p ---------------------------> the passcode
CREATE DATABASE matomodatabase;
show databases;
CREATE USER 'matomouser'@'localhost' IDENTIFIED BY 'the password';
GRANT ALL PRIVILEGES ON matomodatabase.* to 'matomouser'@'localhost';
sudo mysql_secure_installation ---------------> the passcode
sudo vim /opt/bitnami/apache/conf/matomo.conf
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName matamo.analytics
DocumentRoot /opt/bitnami/var/www/matomo
<Directory /opt/bitnami/var/www/matomo/>
DirectoryIndex index.php
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
<Files "console">
Options None
Require all denied
</Files>
<Directory /opt/bitnami/var/www/matomo/misc/user>
Options None
Require all granted
</Directory>
<Directory /opt/bitnami/var/www/matomo/misc>
Options None
Require all denied
</Directory>
<Directory /opt/bitnami/var/www/matomo/vendor>
Options None
Require all denied
</Directory>
ErrorLog ${APACHE_LOG_DIR}/matomo_error.log
CustomLog ${APACHE_LOG_DIR}/matomo_access.log combined
</VirtualHost>
sudo stat /opt/bitnami/apache/conf/httpd.conf
(This was to check on the owner and permission status so that I can replicate on the new matomo.conf)
sudo chown bitnami:root /opt/bitnami/apache/conf/matom.conf
sudo chmod 0664 /opt/bitnami/apache/conf/matomo.conf
sudo vim /opt/bitnami/apache2/conf/httpd.conf
(This was to check on the php modules since I need all the following to be installed and enabled
php-imagick php7.4-common php7.4-gd php7.4-json php7.4-curl php7.4-zip php7.4-xml
php7.4-mbstring php7.4-bz2 php7.4-intl)
sudo /opt/bitnami/ctlscript.sh restart apache
