Skip to content

Instantly share code, notes, and snippets.

@devlinjunker
Last active November 9, 2020 07:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save devlinjunker/ad4a63e2d1531e3eeeb64563d97cc24f to your computer and use it in GitHub Desktop.
Save devlinjunker/ad4a63e2d1531e3eeeb64563d97cc24f to your computer and use it in GitHub Desktop.
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 http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
      • sudo rpm --import http://rpms.famillecollet.com/RPM-GPG-KEY-remi
    • 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:
          [mariadb]
          name = MariaDB
          baseurl = http://yum.mariadb.org/5.5/centos6-amd64
          gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
          gpgcheck=1
        
    • 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: https://matomo.org/docs/installation/
    • wget https://builds.matomo.org/matomo.zip && unzip matomo.zip
    • 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

TODO

  • 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