Operation,  Other

使用开源 umami 替代 Google Analytic 站点分析

使用开源 umami 替代 Google Analytic 站点分析

1. Deploy on Docker

  • Initialization DB (If a MySQL instance is ready, and the database has been created and the username and password are both umami)
## Download init sql.
curl -LO https://github.com/mikecao/umami/raw/v1.31.0/sql/schema.mysql.sql
mysql -u umami -p umami < schema.mysql.sql
  • Startup umami single container.
## Or use fast mirror: registry.cn-shenzhen.aliyuncs.com/wl4g/umami:mysql-v1.31.0
docker run -d \
--name=umami1 \
--network host \
-e DATABASE_URL='mysql://umami:umami@localhost:3306/umami?useunicode=true&serverTimezone=Asia/Shanghai&characterEncoding=utf-8&useSSL=false&allowMultiQueries=true&autoReconnect=true' \
ghcr.io/mikecao/umami:mysql-v1.31.0

2. Deploy Building

git clone git@github.com:mikecao/umami.git
cd umami
git checkout v1.31.0
docker build .

留言

您的电子邮箱地址不会被公开。