<!-- Matomo -->
<script>
var _paq = window._paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
スクリプト
})();
</script>
<!-- End Matomo Code -->
CREATE DATABASE matomodb;
CREATE USER 'matomouser'@'localhost' IDENTIFIED BY 'password';
/* パスワードは自身の環境に合わせ、強固なものを設定してください */
GRANT ALL ON matomodb.* to 'matomouser'@'localhost';
FLUSH PRIVILEGES;
EXIT;
cat <<- __EOF__ | sudo tee -a /etc/fail2ban/filter.d/redmine.conf
# redmine configuration file
#
# Author: David Siewert
#
# $Revision$
#
[INCLUDES]
# Read common prefixes. If any customizations available -- read them from
# common.local
before = common.conf
[Definition]
datepattern = %%Y-%%m-%%d %%H:%%M:%%S %%Z$
failregex = Failed [-/\w]+ for .* from <HOST>
# Option: ignoreregex
# Notes.: regex to ignore. If this regex matches, the line is ignored.
# Values: TEXT
#
ignoreregex =
# Source:
#http://www.fail2ban.org/wiki/index.php/MANUAL_0_8
__EOF__
作成確認
ls -l /etc/fail2ban/filter.d/redmine.conf
# rootユーザで上記ファイルが作成されていることを確認します。
Results
=======
Failregex: 1 total
|- #) [# of hits] regular expression
| 1) [1] Failed [-/\w]+ for .* from <HOST>
`-
Ignoreregex: 0 total
Date template hits:
|- [# of hits] date format
| [2] Year-Month-Day 24hour:Minute:Second Zone name$
`-
Lines: 4281 lines, 0 ignored, 1 matched, 4280 missed
[processed in 0.08 sec]
An unhandled exception has been thrown:
OCP\HintException: [0]: Memcache \OC\Memcache\APCu not available for local cache (Is the matching PHP module installed and enabled?)
memcacheとAPCuが読み込まれていないと怒られましたので、有効化していきます。
memcacheとAPCuの有効化
cd /etc/php/8.1/cli/conf.d
cat <<- __EOF__ | sudo tee -a /etc/php/8.1/cli/conf.d/10-opcache.ini
opcache.enable=1
opcache.enable_cli=1
opcache.interned_strings_buffer=16
opcache.max_accelerated_files=10000
opcache.memory_consumption=128
opcache.save_comments=1
opcache.revalidate_freq=1
__EOF__
cat <<- __EOF__ | sudo tee -a /etc/php/8.1/cli/conf.d/20-apcu.ini
[apcu]
apc.enabled=1
apc.shm_size=32M
apc.ttl=7200
apc.enable_cli=1
apc.serializer=php
__EOF__