This article is focusing on how to install metabase in Linux CentOS 8. For a reference, this article is using another article exist in this link. That article is an article with the title of ‘How to Install Metabase on CentOS 8’. But in this context, the installation is running in a virtual server with a Linux CentOS 8 as its operating system. Moreover, the virtual server is running in a VirtualBox application.
Metabase Installation Process in Linux CentOS 8
Actually, the installation process has several parts. It goes from the preparation to the actual step for the installation. The preparation consists of accessing the virtual server, creating user and necessary files. The installation step is the download process of the metabase application and also the activation of the service itself.
This part is for preparing the installation of metabase. For more information, not every step in the reference article has an impact on the preparation and installation steps. As a result, there is a several step is omitted. The main goal is to have a metabase application running in virtual server inside in a VirtualBox application exist as in the following steps :
Run the Virtualbox application first. The following is the image of it :
Actually, there is an important part for defining port forwarding rule. It is useful if the access to the metabase service is from the host machine to the guest machine or the virtual server. Just check the article with the title of ‘How to Configure Port Forwarding for Accessing Metabase Running in Virtual Server from Host Machine’ in this link to be able to do it.
After that, run the virtual server. In this context, it is the virtual server with the label of CentOS-8. Obviously since the metabase installation is in Linux CentOS 8. Soon after, access the virtual server directly or remote. One of the method for remote accessing the virtual server is by using the SSH connection. Just read the article with the title of ‘How to Remote CentOS Virtual Server running in a VirtualBox with a NAT Network using SSH’ in this link to try to remote the virtual server using an SSH connection.
Next step, after successfully logging in to the virtual server, access the command line interface to execute commands.
Soon after, execute the following command to prepare the installation process by creating a necessary group. It is a group with the name of ‘metabase’ for the metabase application :
[root@10 ~]# groupadd --system metabase [root@10 ~]#
Another preparation step following the above one is to execute a command for creating a new user to run the metabase application process as follows :
[root@10 ~]# useradd --system -g metabase --no-create-home metabase [root@10 ~]#
Continue on the previous preparation step, just create a new folder as the root folder of the metabase application. In this context, the folder is in ‘/opt/metabase’. So, execute the command as follows :
[root@10 ~]# mkdir -p /opt/metabase [root@10 ~]#
Next step, create a new file to store the metabase log into a file with the name of ‘metabase.log’. Just create it in the general log folder of the Linux operating system in ‘/var/log’ as follows :
[root@10 ~]# touch /var/log/metabase.log [root@10 ~]#
Do not forget to modify the ownership of the home folder of the metabase application by executing the following command :
[root@10 ~]# chown -R metabase:metabase /opt/metabase [root@10 ~]#
[root@10 ~]# chown metabase:metabase /var/log/metabase.log [root@10 ~]#
[root@10 ~]# chmod 640 /etc/default/metabase [root@10 ~]#
Create a file for managing metabase service script as follows :
[root@10 opt]# vim /etc/systemd/system/metabase.service
This is an installation step for the metabase application after preparing the necessary folder and files in the previous part.
Install the jar file of the metabase application by downloading it first. In this context, the target location of the jar file of the metabase application is in ‘/opt/metabase/’ as follows :
[root@10 ~]# cd /opt/metabase/ [root@10 metabase]# wget https://downloads.metabase.com/v0.39.0.1/metabase.jar --2021-04-21 06:35:33-- https://downloads.metabase.com/v0.39.0.1/metabase.jar Resolving downloads.metabase.com (downloads.metabase.com)... 184.108.40.206, 220.127.116.11, 18.104.22.168, ... Connecting to downloads.metabase.com (downloads.metabase.com)|22.214.171.124|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 230013562 (219M) [application/java-archive] Saving to: ‘metabase.jar’metabase.jar 100%[========================================================================================>] 219.36M 1.16MB/s in 3m 23s2021-04-21 06:38:57 (1.08 MB/s) - ‘metabase.jar’ saved [230013562/230013562][root@10 metabase]# systemctl start metabase [root@10 metabase]#
After preparing the script for managing metabase service, do not forget to implement the configuration from the file system and then reload it by executing the following command :
[root@10 opt]# systemctl daemon-reload [root@10 opt]#
Also, soon after creating and defining the metabase script file in the preparation part, just perform the following command to enable the metabase service :
[root@10 opt]# systemctl enable metabase Created symlink /etc/systemd/system/multi-user.target.wants/metabase.service → /etc/systemd/system/metabase.service. [root@10 opt]#
Furthermore, soon after enabling the metabase service, just start the metabase service by executing the command below :
[root@10 opt]# systemctl start metabase [root@10 opt]#
- Last but not least, execute the command below to check the status of the metabase service :
[root@10 opt]#systemctl status metabase ● metabase.service - Metabase server Loaded: loaded (/etc/systemd/system/metabase.service; enabled; vendor preset: disabled) Active: active (running) since Wed 2021-04-21 06:47:18 EDT; 4s ago Main PID: 8736 (java) Tasks: 10 (limit: 11412) Memory: 73.0M CGroup: /system.slice/metabase.service └─8736 /usr/bin/java -jar /opt/metabase/metabase.jarApr 21 06:47:18 10.0.2.15 systemd: Started Metabase server. [root@10 metabase]#
As in the above output command for starting the server, it is actually a success. The service of metabase normally run by listening any incoming request in port 3000. Normally, accessing the metabase is possible by typing it in any type of web browsers and visit the URL address of ‘http://localhost:300’ as in the following image :