Mudanças entre as edições de "Metabase"

De MochilaWiki
Ir para navegaçãoIr para pesquisar
(Criou página com ' == Instalando em Ubuntu 20.04 == apt update apt install openjdk-11-jdk openjdk-11-jre apt install mariadb-server systemctl start mariadb systemctl enable mariadb mysql -u ro...')
 
Linha 2: Linha 2:
 
== Instalando em Ubuntu 20.04 ==
 
== Instalando em Ubuntu 20.04 ==
  
 +
dependências
 +
<source lang="bash">
 
apt update
 
apt update
 
apt install openjdk-11-jdk openjdk-11-jre
 
apt install openjdk-11-jdk openjdk-11-jre
Linha 8: Linha 10:
 
systemctl enable mariadb
 
systemctl enable mariadb
 
mysql -u root -p
 
mysql -u root -p
 +
</source>
  
 +
criando banco de dados
 +
<source lang="mysql">
 
CREATE DATABASE metabase;
 
CREATE DATABASE metabase;
 
CREATE USER 'metabase_user'@'localhost' IDENTIFIED BY 'Strong_Password';
 
CREATE USER 'metabase_user'@'localhost' IDENTIFIED BY 'Strong_Password';
 
GRANT ALL ON metabase.* TO 'metabase_user'@'localhost' WITH GRANT OPTION;
 
GRANT ALL ON metabase.* TO 'metabase_user'@'localhost' WITH GRANT OPTION;
 
 
 
FLUSH PRIVILEGES;
 
FLUSH PRIVILEGES;
 
EXIT;
 
EXIT;
 +
</source>
  
sudo mkdir /home/metabase
+
instalando
 +
<source lang="bash">
 +
mkdir /home/metabase
 
cd /home/metabase
 
cd /home/metabase
 
+
wget https://downloads.metabase.com/v0.39.3/metabase.jar
wget https://downloads.metabase.com/v0.36.7/metabase.jar
+
groupadd -r metabase
 
+
useradd -r -s /bin/false -g metabase metabase
sudo groupadd -r metabase
+
chown -R metabase:metabase /home/metabase
sudo useradd -r -s /bin/false -g metabase metabase
+
touch /var/log/metabase.log
sudo chown -R metabase:metabase /home/metabase
+
chown metabase:metabase /var/log/metabase.log
sudo touch /var/log/metabase.log
+
touch /etc/default/metabase
sudo chown metabase:metabase /var/log/metabase.log
+
chmod 640 /etc/default/metabase
sudo touch /etc/default/metabase
+
</source>
sudo chmod 640 /etc/default/metabase
 
 
 
  
 
em /etc/systemd/system/metabase.service
 
em /etc/systemd/system/metabase.service

Edição das 02h07min de 1 de junho de 2021

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