├── .github
└── pull_request_template.md
├── .gitignore
├── Makefile
├── README.md
├── archives
└── .gitkeep
└── debian
├── README.Debian
├── README.md
├── changelog
├── compat
├── conf
├── apache.conf
├── lighttpd.conf
├── matomo-archive
└── matomo-log
├── control
├── copyright
├── gpg-keys
└── matomo-keyring-automatic.gpg
├── matomo.config
├── matomo.dirs
├── matomo.docs
├── matomo.install
├── matomo.links
├── matomo.lintian-overrides
├── matomo.postinst
├── matomo.postrm
├── matomo.preinst
├── matomo.prerm
├── po
└── .gitkeep
├── rules
├── scripts
├── githelp.sh
├── history.sh
└── vercomp.sh
├── source
└── format
└── templates
/.github/pull_request_template.md:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .idea/
2 | *.sw?
3 | archives/*
4 | debian/matomo
5 | debian/matomo.debhelper.log
6 | debian/matomo.substvars
7 | debian/matomo.*.debhelper
8 | debian/piwik
9 | debian/piwik.debhelper.log
10 | debian/piwik.substvars
11 | debian/piwik.*.debhelper
12 | debian/files
13 | tmp/*
14 | tmp.*
15 | matomo
16 | matomo-*.tar.gz
17 | matomo-*.zip
18 | matomo-*.asc
19 | piwik
20 | piwik-*.tar.gz
21 | piwik-*.zip
22 | piwik-*.asc
23 | pubkey.asc
24 |
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | # Makefile for Matomo (Piwik) package construction
2 | #
3 | # This is what you mostly need to know about this Makefile
4 | # * make release: When a new release has been published
5 | # * make upload: To upload your debian package
6 | # * make commitrelease: To commit your debian/changelog
7 | # * make builddeb: To rebuild your debian package. debian/changelog is not updated
8 | # * make checkdeb: To check the package compliance using lintian
9 | #
10 | # Options are:
11 | # * RELEASE_VERSION=x.y.z Specify which package version you want to build
12 | # * RELEASE_CHANGELOG=x.y.z Specify which package version you want to get changelog from
13 |
14 | URL = https://builds.matomo.org
15 | FINGERPRINT = 814E346FA01A20DBB04B6807B5DBD5925590A237
16 |
17 | CURRENT_VERSION := $(shell head -1 debian/changelog | sed 's/.*(//;s/).*//;s/-.*//')
18 | DEB_ARCH := $(shell dpkg-architecture -qDEB_BUILD_ARCH)
19 |
20 | ifndef DEB_VERSION
21 | DEB_VERSION := $(shell head -n 1 debian/changelog | sed 's/.*(//;s/).*//;')
22 | endif
23 |
24 | ifndef DEB_STATUS
25 | DEB_STATUS := $(shell head -n 1 debian/changelog | awk '{print $$3}' | sed 's/;//g')
26 | endif
27 |
28 | ifndef RELEASE_VERSION
29 | RELEASE_VERSION := $(shell wget --no-cache -qO - $(URL)/LATEST)
30 | endif
31 |
32 | ifndef RELEASE_CHANGELOG
33 | RELEASE_CHANGELOG := $(RELEASE_VERSION)
34 | endif
35 |
36 | RELEASE_VERSION_GREATER = $(shell ./debian/scripts/vercomp.sh $(RELEASE_VERSION) $(CURRENT_VERSION))
37 | RELEASE_VERSION_LOWER = $(shell ./debian/scripts/vercomp.sh $(RELEASE_VERSION) $(CURRENT_VERSION))
38 |
39 | ifndef PW_ARCHIVE_EXT
40 | PW_ARCHIVE_EXT := $(shell wget --no-cache -q --spider $(URL)/matomo-$(RELEASE_VERSION).tar.gz && echo 'tar.gz' || echo 'zip' )
41 | endif
42 |
43 | ARCHIVE = matomo-$(RELEASE_VERSION).$(PW_ARCHIVE_EXT)
44 | SIG = matomo-$(RELEASE_VERSION).$(PW_ARCHIVE_EXT).asc
45 |
46 | DESTDIR = /
47 | DIST = stable
48 | URGENCY = high
49 |
50 | MAKE_OPTS = -s
51 |
52 | INSTALL = /usr/bin/install
53 |
54 | .PHONY : checkfetch fixperms checkversions release checkenv builddeb checkdeb checkdebdetail newrelease newversion changelog history clean upload fixsettings
55 |
56 | RED = \033[0;31m
57 | GREEN = \033[0;32m
58 | NC = \033[0m
59 |
60 | # check and optionally fetch the corresponding matomo archive
61 | # from the official server. Uncompress the archive and
62 | # perform additional minor cleanups
63 | checkfetch:
64 | @echo -n " [WGET] ... "
65 | @if [ ! -f "$(SIG)" ]; then echo -n "$(URL)/$(SIG) "; wget --no-cache -q $(URL)/$(SIG); fi;
66 | @if [ ! -f "$(ARCHIVE)" ]; then echo -n "$(URL)/$(ARCHIVE) "; wget --no-cache -q $(URL)/$(ARCHIVE); fi;
67 | @echo "done."
68 | @gpgconf --kill dirmngr
69 | @test ! -z "$(shell gpg2 --list-keys | grep $(FINGERPRINT))" || gpg2 --keyserver keys.gnupg.net --recv-keys $(FINGERPRINT)
70 | @echo " [GPG] verify $(FINGERPRINT)" && gpg --verify $(SIG)
71 | @echo " [RM] matomo/" && if [ -d "matomo" ]; then rm -rf "matomo"; fi
72 | @echo " [UNPACK] $(ARCHIVE)"
73 | @test "$(PW_ARCHIVE_EXT)" != "zip" || unzip -qq $(ARCHIVE)
74 | @test "$(PW_ARCHIVE_EXT)" != "tar.gz" || tar -zxf $(ARCHIVE)
75 |
76 | # perform some cleanup tasks to remove extraneous files
77 | # from the built package. Some (js)libs are dragged with
78 | # examples and extra material that aren't required in the
79 | # final package
80 | cleanup:
81 | @echo " [RM] Cleanup: vcs, ci"
82 | @rm -f 'How to install Matomo.html'
83 | @find matomo/ -type f -name .gitignore -exec rm -f {} \;
84 | @find matomo/ -type f -name .gitattributes -exec rm -f {} \;
85 | @find matomo/ -type f -name .gitmodules -exec rm -f {} \;
86 | @find matomo/ -type f -name .git -exec rm -f {} \;
87 | @find matomo/ -type f -name .gitkeep -exec rm -f {} \;
88 | @find matomo/ -type f -name .editorconfig -exec rm -f {} \;
89 | @find matomo/ -type f -name .travis.yml -exec rm -f {} \;
90 | @find matomo/ -type f -name .travis.sh -exec rm -f {} \;
91 | @find matomo/ -type f -name .coveralls.yml -exec rm -f {} \;
92 | @find matomo/ -type f -name .jshintrc -exec rm -f {} \;
93 | @find matomo/ -type f -name .scrutinizer.yml -exec rm -f {} \;
94 | @find matomo/ -type f -name "*bower.json" -exec rm -f {} \;
95 | @find matomo/ -type f -name ".npmignore" -exec rm -f {} \;
96 | @find matomo/ -type f -name ".eslintrc" -exec rm -f {} \;
97 | @find matomo/vendor -mindepth 2 -type f -name "autoload.php" -exec rm -f {} \;
98 | @rm -rf matomo/vendor/doctrine/cache/.git
99 | @rm -f matomo/misc/translationTool.sh
100 | @echo " [RM] Cleanup: jScrollPane"
101 | @rm -rf matomo/libs/bower_components/jScrollPane/issues
102 | @rm -f matomo/libs/bower_components/jScrollPane/ajax_content.html
103 | @rm -f matomo/libs/bower_components/jScrollPane/script/demo.js
104 | @rm -f matomo/libs/bower_components/jScrollPane/themes/lozenge/index.html
105 | @rm -rf matomo/libs/bower_components/sprintf/demo
106 | @rm -f matomo/vendor/leafo/lessphp/lessify matomo/vendor/leafo/lessphp/plessc
107 | @rm -rf matomo/vendor/tecnickcom/tcpdf/tools
108 |
109 |
110 | checkconfig:
111 | @echo -n " [CONF] Checking configuration files... "
112 | @if [ "$(shell cat debian/matomo.install | grep "^matomo/config/" | wc -l)" -ne "$(shell find ./matomo/config/ -type f | wc -l)" ]; then \
113 | echo "\n $(RED)[CONF]$(NC) Configuration files may have been added or removed, please update debian/matomo.install"; \
114 | echo " $(shell cat debian/matomo.install | grep "^matomo/config/" | wc -l)" -ne "$(shell find ./matomo/config/ -type f | wc -l)" "$(shell pwd)"; \
115 | exit 1; \
116 | fi
117 | @echo "done"
118 |
119 | checkmatomoinstall:
120 | @echo -n " [CONF] Checking other files/dir... "
121 | @for F in $(shell cat debian/matomo.install|grep ^matomo|cut -f1) ; do \
122 | echo -n " * checking in matomo.install: $$F"; \
123 | if [ ! -e "$$F" ]; then \
124 | echo " $(RED)missing$(NC)."; \
125 | echo "1" >&2; \
126 | else \
127 | echo " $(GREEN)ok$(NC)."; \
128 | fi; \
129 | done 3>&2 2>&1 1>&3 | grep --silent "1" && exit 1 || echo >/dev/null
130 |
131 | checkmatomorootdir:
132 | @echo -n " [CONF] Checking other files/dir... "
133 | @for F in $(shell ls matomo) ; do \
134 | echo -n " * checking in root dir: $$F"; \
135 | if [ ! $(shell grep "^matomo/$$F" debian/matomo.install) ]; then \
136 | echo " $(RED)missing$(NC)."; \
137 | echo "1" >&2; \
138 | else \
139 | echo " $(GREEN)ok$(NC)."; \
140 | fi; \
141 | done 3>&2 2>&1 1>&3 | grep --silent "1" && exit 1 || echo >/dev/null
142 |
143 | manifest:
144 | @if [ -z "$(DESTDIR)" ]; then echo "$(RED)missing DESTDIR=$(NC)"; exit 1; fi
145 | @echo -n " [MANIFEST] Generating manifest.inc.php... "
146 | @rm -f $(DESTDIR)/etc/matomo/manifest.inc.php
147 | @find $(DESTDIR)/ -type f -printf '%s ' -exec md5sum {} \; \
148 | | grep -v "user/.htaccess" \
149 | | grep -v "$(DESTDIR)/DEBIAN/" \
150 | | grep -v "$(DESTDIR)/usr/share/doc/matomo/" \
151 | | grep -v "$(DESTDIR)/usr/share/matomo/README" \
152 | | grep -v "$(DESTDIR)/usr/share/lintian/" \
153 | | grep -v "$(DESTDIR)/etc/cron.d" \
154 | | grep -v "$(DESTDIR)/etc/logrotate.d" \
155 | | grep -v "$(DESTDIR)/etc/matomo/lighttpd.conf" \
156 | | grep -v "$(DESTDIR)/etc/matomo/apache.conf" \
157 | | grep -v "$(DESTDIR)/etc/apt/" \
158 | | egrep -v 'manifest.inc.php|autoload.php|autoload_real.php' \
159 | | sed 's#$(DESTDIR)##g;' \
160 | | sed 's#/usr/share/matomo/##g; s#/etc/matomo/#config/#g;' \
161 | | sed '1,$$ s/\([0-9]*\) \([a-z0-9]*\) \(.*\)/\t\t"\3" => array("\1", "\2"),/;' \
162 | | sort \
163 | | sed '1 s/^/ $(DESTDIR)/etc/matomo/manifest.inc.php
165 | @echo "$(GREEN)done$(NC)."
166 | @echo -n " [MANIFEST] Checking manifest.inc.php syntax... "
167 | @php -l $(DESTDIR)/etc/matomo/manifest.inc.php >/dev/null
168 | @echo "$(GREEN)done$(NC)."
169 | @echo -n " [MANIFEST] Checking for unexpected entries in manifest.inc.php... "
170 | @if [ ! -z "$(shell grep '"/' $(DESTDIR)/etc/matomo/manifest.inc.php)" ]; then echo "$(RED)check $(DESTDIR)/etc/matomo/manifest.inc.php for extra entries$(NC)"; exit 1; fi;
171 | @echo "$(GREEN)done$(NC)."
172 |
173 |
174 | fixsettings:
175 | @echo " [SED] Configuration adjustments"
176 | @sed -i '/\.gitignore/d' $(DESTDIR)/etc/matomo/manifest.inc.php
177 | @sed -i 's/^\(enable_auto_update\).*/\1 = 0/g;' $(DESTDIR)/etc/matomo/global.ini.php
178 | @sed -i '1 s/python/python3/' $(DESTDIR)/usr/share/matomo/misc/log-analytics/import_logs.py
179 |
180 | # fix various file permissions
181 | fixperms:
182 | @echo -n " [CHMOD] Fixing permissions... "
183 | @find $(DESTDIR) -type d -not -path "$(DESTDIR)/DEBIAN" -exec chmod 0755 {} \;
184 | @find $(DESTDIR) -type f -not -path "$(DESTDIR)/DEBIAN/*" -exec chmod 0644 {} \;
185 | @chmod 0755 $(DESTDIR)/usr/share/matomo/misc/cron/archive.sh
186 | @chmod 0755 $(DESTDIR)/usr/share/matomo/console
187 | # @chmod 0755 $(DESTDIR)/usr/share/matomo/vendor/lox/xhprof/scripts/xhprofile.php
188 | @chmod 0755 $(DESTDIR)/usr/share/matomo/vendor/pear/archive_tar/sync-php4
189 | @chmod 0755 $(DESTDIR)/usr/share/matomo/vendor/matomo/matomo-php-tracker/run_tests.sh
190 | # @chmod 0755 $(DESTDIR)/usr/share/matomo/vendor/szymach/c-pchart/coverage.sh
191 | # @chmod 0755 $(DESTDIR)/usr/share/matomo/vendor/twig/twig/drupal_test.sh
192 | # @chmod 0755 $(DESTDIR)/usr/share/matomo/vendor/wikimedia/less.php/bin/lessc
193 |
194 | @echo "done."
195 |
196 | # check lintian licenses so we can remove obsolete ones
197 | checklintianlic:
198 | @echo " [DEB] Checking extra license files presence"
199 | @for F in $(shell cat debian/matomo.lintian-overrides | grep extra-license-file | awk '{print $$3}') ; do \
200 | echo -n " * checking: $$F"; \
201 | if [ ! -f "$(DESTDIR)/$$F" ]; then \
202 | echo " $(RED)missing$(NC)."; \
203 | echo "1" >&2; \
204 | else \
205 | echo " $(GREEN)ok$(NC)."; \
206 | fi; \
207 | done 3>&2 2>&1 1>&3 | grep --silent "1" && exit 1 || echo >/dev/null
208 |
209 | # check lintian licenses so we can remove obsolete ones
210 | checklintianextralibs:
211 | @echo " [DEB] Checking for extra libs presence"
212 | @for F in $(shell cat debian/matomo.lintian-overrides | grep -e embedded-javascript-library -e embedded-php-library | awk '{print $$3}') ; do \
213 | echo -n " * checking: $$F"; \
214 | if [ ! -f "$(DESTDIR)/$$F" ]; then \
215 | echo " $(RED)missing$(NC)."; \
216 | echo "1" >&2; \
217 | else \
218 | echo " $(GREEN)ok$(NC)."; \
219 | fi; \
220 | done 3>&2 2>&1 1>&3 | grep --silent "1" && exit 1 || echo >/dev/null
221 |
222 | # raise an error if the building version is lower that the head of debian/changelog
223 | checkversions:
224 | ifeq "$(RELEASE_VERSION_LOWER)" "1"
225 | @echo "$(RED)The version you're trying to build is older that the head of your changelog.$(NC)"
226 | @exit 1
227 | endif
228 |
229 | # create a new release either major or minor.
230 | release: checkenv checkversions
231 | ifeq "$(RELEASE_VERSION_GREATER)" "2"
232 | @$(MAKE) newrelease
233 | @$(MAKE) history
234 | else
235 | @$(MAKE) newversion
236 | endif
237 | @debchange --changelog debian/changelog --release ''
238 | @$(MAKE) builddeb
239 | @$(MAKE) checkdebdetail
240 |
241 | # check if the local environment is suitable to generate a package
242 | # we check environment variables and a gpg private key matching
243 | # these variables. this is necessary as we sign our packages.
244 | checkenv:
245 | ifndef DEBEMAIL
246 | @echo " [ENV] Missing environment variable DEBEMAIL"
247 | @exit 1
248 | endif
249 | ifndef DEBFULLNAME
250 | @echo " [ENV] Missing environment variable DEBFULLNAME"
251 | @exit 1
252 | endif
253 | @echo " [GPG] Checking environment"
254 | @gpg2 --list-secret-keys "$(DEBFULLNAME) <$(DEBEMAIL)>" >/dev/null
255 |
256 | # creates the .deb package and other related files
257 | # all files are placed in ../
258 | builddeb: checkenv checkversions
259 | @echo -n " [PREP] Checking package status..."
260 | ifeq "$(DEB_STATUS)" "UNRELEASED"
261 | @echo " $(RED)The package changelog marks the package as 'UNRELEASED'.$(NC)"
262 | @echo " $(RED)run this command: debchange --changelog debian/changelog --release ''$(NC)"
263 | @exit 1
264 | else
265 | @echo "$(GREEN)ok$(NC)."
266 | endif
267 |
268 | @echo " [DPKG] Building packages..."
269 | dpkg-buildpackage -i '-Itmp' -I.git -I$(ARCHIVE) -rfakeroot
270 |
271 |
272 | # check the generated .deb for consistency
273 | # the filename is determines by the 1st line of debian/changelog
274 | checkdeb:
275 | @echo " [LINTIAN] Checking package(s)..."
276 | @for P in $(shell cat debian/control | grep ^Package | awk '{print $$2}'); do \
277 | lintian --no-tag-display-limit --color auto -L ">=warning" -v -i ../$${P}_$(shell dpkg-parsechangelog | grep ^Version | awk '{print $$2}')_*.deb; \
278 | done
279 |
280 | # check the generated .deb for consistency
281 | # the filename is determines by the 1st line of debian/changelog
282 | checkdebdetail:
283 | @echo " [LINTIAN] Checking package(s)..."
284 | @for P in $(shell cat debian/control | grep ^Package | awk '{print $$2}'); do \
285 | lintian --no-tag-display-limit --color auto -L ">=info" -v -i ../$${P}_$(shell dpkg-parsechangelog | grep ^Version | awk '{print $$2}')_*.deb; \
286 | done
287 |
288 | # create a new release based on RELEASE_VERSION variable
289 | newrelease:
290 | @debchange --changelog debian/changelog --urgency $(URGENCY) --package $(shell cat debian/control | grep ^Source | awk '{print $$2}') --newversion $(RELEASE_VERSION)-1 "Releasing Matomo $(RELEASE_VERSION)"
291 |
292 | # creates a new version in debian/changelog
293 | newversion:
294 | @debchange --changelog debian/changelog -i --urgency $(URGENCY)
295 | @debchange --changelog debian/changelog --force-distribution $(DIST) --urgency $(URGENCY) -r
296 |
297 | # allow user to enter one or more changelog comment manually
298 | changelog:
299 | @debchange --changelog debian/changelog --force-distribution $(DIST) --urgency $(URGENCY) -r
300 | @debchange --changelog debian/changelog -a
301 |
302 | # fetch the history and add it to the debian/changelog
303 | history:
304 | @bash debian/scripts/history.sh $(RELEASE_VERSION) $(RELEASE_CHANGELOG)
305 |
306 | # clean for any previous / unwanted files from previous build
307 | clean:
308 | @echo " [RM] matomo/ debian/tmp/ debian/matomo/"
309 | @rm -rf matomo debian/tmp debian/matomo
310 |
311 | distclean: clean
312 | @echo " [RM] matomo-*.tar.gz matomo-*.tar.gz.asc matomo-*.zip matomo-*.zip.asc"
313 | @rm -f matomo-*.tar.gz matomo-*.tar.gz.asc matomo-*.zip matomo-*.zip.asc
314 |
315 | prepupload:
316 | @echo " [MKDIR] tmp/"
317 | @test -d tmp || mkdir tmp
318 | @test ! -f $(ARCHIVE) || echo " [MV] $(ARCHIVE) => tmp/"
319 | @test ! -f $(ARCHIVE) || mv $(ARCHIVE) tmp/
320 | @test ! -f $(SIG) || echo " [MV] $(SIG) => tmp/"
321 | @test ! -f $(SIG) || mv $(SIG) tmp/
322 | @test ! -f ../matomo_$(DEB_VERSION)_all.deb || echo " [MV] ../matomo_$(DEB_VERSION)_all.deb => tmp/"
323 | @test ! -f ../matomo_$(DEB_VERSION)_all.deb || mv ../matomo_$(DEB_VERSION)_all.deb $(CURDIR)/tmp/
324 | @test ! -f ../matomo_$(DEB_VERSION).dsc || echo " [MV] ../matomo_$(DEB_VERSION).dsc => tmp/"
325 | @test ! -f ../matomo_$(DEB_VERSION).dsc || mv ../matomo_$(DEB_VERSION).dsc $(CURDIR)/tmp/
326 | @test ! -f ../matomo_$(DEB_VERSION)_$(DEB_ARCH).changes || echo " [MV] ../matomo_$(DEB_VERSION)_$(DEB_ARCH).changes => tmp/"
327 | @test ! -f ../matomo_$(DEB_VERSION)_$(DEB_ARCH).changes || mv ../matomo_$(DEB_VERSION)_$(DEB_ARCH).changes $(CURDIR)/tmp/
328 | @test ! -f ../matomo_$(DEB_VERSION).tar.gz || echo " [MV] ../matomo_$(DEB_VERSION).tar.gz => tmp/"
329 | @test ! -f ../matomo_$(DEB_VERSION).tar.gz || mv ../matomo_$(DEB_VERSION).tar.gz $(CURDIR)/tmp/
330 | @test ! -f ../matomo_$(DEB_VERSION)_$(DEB_ARCH).buildinfo || echo " [MV] ../matomo_$(DEB_VERSION)_$(DEB_ARCH).buildinfo => tmp/"
331 | @test ! -f ../matomo_$(DEB_VERSION)_$(DEB_ARCH).buildinfo || mv ../matomo_$(DEB_VERSION)_$(DEB_ARCH).buildinfo $(CURDIR)/tmp/
332 |
333 | upload: prepupload
334 | @echo " [UPLOAD] => to matomo"
335 | @dupload --quiet --to matomo $(CURDIR)/tmp/matomo_$(DEB_VERSION)_$(DEB_ARCH).changes
336 |
337 | commitrelease:
338 | @echo " [GIT] Commit release"
339 | @./debian/scripts/githelp.sh commitrelease
340 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Matomo Package
2 |
3 | This repository contains the Matomo release script (official package).
4 |
5 | To generate a new Matomo release for example 3.0.0-b1, follow these steps:
6 |
7 | * Edit `core/Version.php` and set the correct version number
8 | * Check that the CI builds is green
9 | * Create a release on Github which will automatically create a git tag.
10 | * Then package the release. Run: `./scripts/build.sh 3.0.0-b1`. This script will:
11 | * the first time it runs it clones the Matomo git repository.
12 | * then it builds the package, removing any un-necessary files,
13 | * then it uploads the `.zip` and `.tar.gz` packages to https://builds.matomo.org
14 | * The new Matomo version is now shipped to users worldwide,
15 | * Users will now notified in their Administration area, and some users will receive email alerts about the new version.
16 |
17 | ## Multiple gpg keys
18 | To choose a default key without having to specify --default-key on the command-line every time, create a configuration file (if it doesn't already exist), `~/.gnupg/gpg.conf` and add a line containing
19 |
20 | `default-key 5590A237`
21 |
22 |
--------------------------------------------------------------------------------
/archives/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matomo-org/matomo-package/b85ea252badc817b5abf952f8c5a67dd17f41e8a/archives/.gitkeep
--------------------------------------------------------------------------------
/debian/README.Debian:
--------------------------------------------------------------------------------
1 | Install
2 | =======
3 |
4 | 1 - Create a MariaDB / MySQL database named "matomo"
5 | CREATE DATABASE `matomo` /*!40100 DEFAULT CHARACTER SET utf8 */;
6 |
7 | 2 - Create a user/password with access to the database previously created
8 | CREATE USER matomo@localhost IDENTIFIED BY '4/V3ryStron6!*passW0rd';
9 | GRANT ALL PRIVILEGES ON matomo.* to matomo@localhost;
10 | -- the FILE privileges is optional, but matomo can leverage that feature
11 | -- to improve performance
12 | GRANT FILE ON *.* TO matomo@localhost;
13 |
14 | 3a- If you don't have any virtualhost, uncomment the Alias line in /etc/apache2/conf.d/matomo.conf
15 |
16 | 3b- If you operate with virtualhosts, do as follow
17 | a) if you use a dedicated virtual host for your matomo
18 |
19 | [...]
20 | DocumentRoot /usr/share/matomo
21 | [...]
22 |
23 |
24 | b) if you want the matomo Alias in all your virtualhosts, uncomment the Alias line in /etc/apache2/conf.d/matomo.conf
25 |
26 | c) if you prefer to restrict matomo Alias to a specific virtualhost
27 |
28 | [...]
29 | DocumentRoot /var/www/foo
30 |
31 | Alias /matomo /usr/share/matomo
32 | [...]
33 |
34 |
35 | 3c- Ensure conf-available/matomo.conf is enable
36 |
37 | 4 - Point your browser to your matomo URL
38 |
39 | 5 - Follow the steps and provide the MariaDB / MySQL credential details when requested.
40 |
41 | 6 - Add the given javascript code to your pages, ideally at the bottom of the html just before