Metabase

De MochilaWiki
Revisão de 02h07min de 1 de junho de 2021 por Banto Palmarino (discussão | contribs)
Ir para navegaçãoIr para pesquisar

Instalando em Ubuntu 20.04

dependências

apt update
apt install openjdk-11-jdk openjdk-11-jre
apt install mariadb-server
systemctl start mariadb
systemctl enable mariadb
mysql -u root -p

criando banco de dados

CREATE DATABASE metabase;
CREATE USER 'metabase_user'@'localhost' IDENTIFIED BY 'Strong_Password';
GRANT ALL ON metabase.* TO 'metabase_user'@'localhost' WITH GRANT OPTION;
FLUSH PRIVILEGES;
EXIT;

instalando

mkdir /home/metabase
cd /home/metabase
wget https://downloads.metabase.com/v0.39.3/metabase.jar
groupadd -r metabase
useradd -r -s /bin/false -g metabase metabase
chown -R metabase:metabase /home/metabase
touch /var/log/metabase.log
chown metabase:metabase /var/log/metabase.log
touch /etc/default/metabase
chmod 640 /etc/default/metabase

em /etc/systemd/system/metabase.service

[Unit]
Description=Metabase server
After=syslog.target
After=network.target

[Service]
WorkingDirectory=/home/metabase/
ExecStart=/usr/bin/java -jar /home/metabase/metabase.jar
EnvironmentFile=/etc/default/metabase
User=metabase
Type=simple
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=metabase
SuccessExitStatus=143
TimeoutStopSec=120
Restart=always
 
[Install]
WantedBy=multi-user.target

em /etc/rsyslog.d/metabase.conf