Skip to content

Instantly share code, notes, and snippets.

Last active Nov 9, 2020
What would you like to do?
AWS Matomo Setup
Matoma Setup on AWS

Setting up Matomo on AWS

  • Installed PHP 7.x
    • Remove installed php
      • sudo yum remove php*
    • Install extra repos:
      • sudo amazon-linux-extras install epel
      • sudo rpm -ivh
      • sudo rpm --import
    • Install ncurses library
      • sudo yum install ncurses-compat-libs
    • Install PHP
      • sudo yum install php php-mbstring php-dom php-mysqli --enablerepo=remi-php74 --disablerepo=amzn2-core
  • Installed MariaDB
    • Remove old mariadb
      • sudo yum shell
      • $ remove mariadb-libs
      • $ run
    • Create File
      • sudo vi /etc/yum.repos.d/maria.repo
      • Add the following contents to the file and save:
          name = MariaDB
          baseurl =
    • Then run the following commands:
      • sudo yum install -y MariaDB-server MariaDB-client
      • sudo /etc/init.d/mysql start
    • Secured mariadb install:
      • sudo mysql_secure_installation
  • Downloaded Latest Matomo:
    • wget && unzip
    • Or Download zip and SFTP to server
  • Install httpd
  • Configure Matomo settings in /var/www/html/
  • Configure httpd settings in /etc/httpd/conf.d/

Also had to do small hack to get php-gd installed:

  • sudo yum install php74-php-gd.x86_64
  • sudo yum remove php74-php-gd.x86_64
  • sudo yum install php-gd --enablerepo=remi-php74 --disablerepo=amzn2-core


  • Update PHP to newer version
  • Add root user password
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment