Home / How To / How to install Metabase Business Analytics on Ubuntu 18.04 LTS

How to install Metabase Business Analytics on Ubuntu 18.04 LTS



Metabase is a free and open source data analysis tool. This allows you and your company to ask questions and learn from your data.

Sometimes Metabas is also called Metadata or Metadata Repository. Supports multiple data sources including RDBMS such as MySQL, PostgreSQL, NoSQL as MongoDB and Cloud database services such as Amazon Redshift and Google BigQuery.

In this tutorial we will show you how to install Metabase Data Analytics on Ubuntu 18.04.

Prerequisites

For this guide, we will install Metabase on Ubuntu 18.04 with 4 GB RAM, 4 CPU and 50 GB free disk space.

What We Will Do

  • Install Java
  • Install and Configure MariaDB Database
  • Add Users and Configure Metabase Database and Log Files
  • Download Metabase
  • Configure Metabas as System Services
  • Set in Rysyslog for Metabase
  • Metabase after installation [19659014] Step 1 – Install Java

    First of all, Metabase was created with Java, so we install Java OpenJDK in the Ubuntu system.

    Install Java OpenJDK to the Ubuntu system using the apt command below.

    19659017] sudo apt install default-jre [19659018] When the installation is complete, check the java version with the command below.

      java version 

    As a result, you have installed Java OpenJDK 11 on Ubuntu 18.04 Server.

     Install OpenJDK

    Step 2 – Install MariaDB database

    In this step we will install MariaDB database server and set up a new database as a sample of Metabase data source.

    Install the MariaDB database server with the apt command below.

      sudo apt install mariadb server mariadb-client 

    When the installation is complete, start the MariaDB service and add it to the system boot.

      systemctl start mariadb 
    systemctl enable mariadb

    And the MariaDB service is running.

     Start MariaDB

    Now we will configure the root password for MariaDB with the mysql tool "mysql_secure_installation".

      mysql_s ecure_installation 

    Enter your root password and type "Y" for the rest of the configuration.

      Set a root password? [Y/n]   Y 
    Remove anonymous users? [Y/n] Y
    Delete the test database and access it? [Y/n] Y
    Reload privilege tables now? [Y/n] Y

    And the MariaDB root password has been configured.

    Now log into the MySQL shell using the mysql command below.

      mysql -u root -p 
    TYPE YOUR ROOTLESS WORD

    Now create a new database & # 39; metabase & # 39; and create a new user & # 39; metabase & # 39; with the & # 39; mtabasedbpass & # 39; using the questions below.

      create database database; 
    create user [email protected] "localhost" identified with "mtabasedbpass";
    grant everyone on metabase. * to [email protected] "localhost" with grant options;
    flush privileges;
    exit

    And you have created the database and user for Metabase installation.

     Create Database for Metabase

    In this step we add a new user and group Metabase, then set up the Metabase installation directory.

    – Add new user

    We will run the Metabase service as a user and group called & # 39; metaba se & # 39; Create a new user and group & # 39; metabase & # 39; with the following command. Advertising Services

      sudo addgroup - quiet --system metabase 
    sudo adduser - Quiet - System --ingroup metabase - no-create -home - disabled-password metabase

    Now you have created & # 39; metabase & # 39; users and group.

    – Setup Metabase Installation Directory [19659051] We are creating a new directory for the metabase and will be in the & # 39; / op / metabase & # 39; directory.

    Create a new directory & # 39; / opt / metabase & # 39; and change the owner of that directory to the & # 39; metebase & # 39; user.

      mkdir -p / opt / metabase 
    chown -R metabase: metabase / opt / metabase

    Now you have created the Metabase installation directory.

    – Add default environment file for Metabase [19659051] Create a new environment file in the & # 39; / etc / default & # 39; directory with the following command.

      sudo touch / etc / default / metabase 
    sudo chmod 640 / etc / default / metabase

    And the environment file for Metabase has been created.

     Add Metabase users and group

    In this step, we set the Metabase log to be processed to the specific log in the & # 39; / var / log & # 39; with rsyslog.

    First create the metabaslog in the directory & # 39; / var / log & # 39; and change the log file owner to & # 39; metabase & # 39; -user.

      sudo touch / var / log / metabase.log 
    sudo chown metabase: metabase /var/log/metabase.logebrit19659018achteNow goes to directory & # 39; /etc/rsyslog.d' and create a new metabase.log configuration using vim editor. Ads

      cd /etc/rsyslog.d/strong19459029vardvim metabase.conf 

    Paste the following configuration into it.

    : msg contains "metabase" /var/log/metabase.log Greece 19459029 achte & stop 

    Save and close.

    After that, start the rsyslog service.

      systemctl reboot rsyslog 

    And configuration of the Metabase log with Rsyslog has been completed.

     Configure rsyslog for Metabase

    Now go to the & # 39; / opt / metabase & # 39; directory.

      cd / opt / metabase 

    Download Metabase can file with wget command.

      wget http://downloads.metabase.com/v0.34.1/metabase.jarebrit19659018achteNow change the owner of the & # 39; / opt / metabase & # 39; directory and all its file to & # 39; metabase & # 39; users and group. 

      chown -R metabase: metabase / opt / metabase 

    And the Metabase jar file has been downloaded.

     Download Metabase

    In this step we create a new service file for Metabase.

    Go to directory & # 39; / etc / systemd / system & # 39; and create a new system service file & # 39; metabase.service & # 39 ;.

      cd / etc / systemd / system / 
    vim metabase.service

    Paste the following configuration into it.

     [Unit] 
    Description = Metabase Base
    After = syslog.target
    After = network.target [Service]
    Wo rkingDirectory = / opt / metabase /
    ExecStart = / usr / bin / java -jar /opt/metabase/metabase.jar Chapter19459029 EdinMiljöFil = / etc / default / metabase Chapter19459029 ?? User = metabase 12719459029 EdinType = simple
    StandardOutput = syslog
    StandardError = syslog
    SyslogIdentifier = metabase
    SuccessExitStatus = 143
    TimeoutStopSec = 120
    Restart = always [19659092] WantedBy = multi-user.target

    Save and close.

    Reload now systemd manager.

      systemctl daemon-reload 

    After that, start the metabas service and add it to the system startup.

      systemctl start metabase 
    systemctl enable metabase

     Create systemd service for metabase

    As a result, the metabas service is running. Check using the following command.

      systemctl status metabase 

    Below is the result you will get.

     Check the status of the Metabase service

    Step 7 - After installation

    By default, Metabase runs on port & # 39; 3000 & # 39; Open your browser and enter the server's IP address using port & # 39; 3000 & # 39 ;.

    http://10.10.10.100:3000/

    Now you will get the Metabase installation below.

     Metabase login

    Click & # 39; Let's get started "button.

    Now enter your administrator account and click" Next & # 39 ;.

     Enter user information

    Then add your data source and enter your database information, then click the " Next " button.

     Metabase MySQL Setting

    For the "Usage Data Preferences" section, leave it by default and click " Next " again.

     Setting usage preferences

    And the Metabase record installation is complete. Click the & # 39; Take Me to Metabase & # 39; and you will be redirected to the Metabase Dashboard.

     Metabase successfully installed

    Below is the standard metabas dashboard.

     Metabase Dashboard

    As a result, the installation of Metabase on Ubuntu 18.04 has been successfully completed.

    Reference

    https://www.metabase.com/docs/latest /


Source link