
How to set up an Analytics Dashbord in CENT OS 7
Description
Data is the biggest thing out there right now.
We need to present data in a way that allows for valuable insights to be gained.
One way of achieving such purpose is to make use of a visualization dashboard.
Visualizations of data are the most accessible, as any user, technical or not, can gain insights from them.
Unfortunately, most commercial visualization dashboards are unaffordable for small businesses.
In today’s post we will be focusing on open source dashboards.
There’s many of them. A few that deserve mention are are Metabase, Dashing, Keen Dashboard, Freeboard, and Mozaik. Our focus will be on Mozaik.
We will show you how to set it up in a CentOS 7 server.
Mozaik dashboard
Mozaik is an open source, powerful and flexible choice for a dashboard.
It’s very easy to add widgets for different data sources.
Features of Mozaik dashboard
Scalable layout – Mozaik dashboards support multiple devices through its adaptive layout. You can either put your dashboard on a big screen in the open space or consult it on your smartphone
Themes support – Mozaik dashboard comes with 6 themes and makes it easy to develop your own theme
Extendable by modules – Mozaik widgets are maintained as separate modules, thus available via mozaik-ext-<name> in npm.js
Grid positioning – Mozaik provides a simple way to define your dashboard layout using a grid system
Optimized backend communication – Most extensions need to communicate with APIs. Mozaik eases this by providing a backend, which handles API calls and pushes data to widgets through WebSockets
Multi Dashboard Support – Sometimes, a single dashboard is not enough. Mozaïk allows multiple dashboards with no issue.
Let’s now move onto setting up of Mozaik in a CentOS 7 server. We will be using Mozaik v1
Step 1 :
First clone the repository using command- git clone https://github.com/plouc/mozaik-demo.git as shown below
[root@vps mozaik]# git clone https://github.com/plouc/mozaik-demo.git
Step 2 :
Once the cloning is complete, you can see a screen similar to the one shown below
[root@vps mozaik]# git clone https://github.com/plouc/mozaik-demo.git Cloning into 'mozaik-demo'... remote: Counting objects: 358, done. remote: Total 358 (delta 0), reused 0 (delta 0), pack-reused 358 Receiving objects: 100% (358/358), 196.77 KiB | 0 bytes/s, done. Resolving deltas: 100% (187/187), done.
Step 3 :
Next, we need Node.js to be installed in the server. In case you do not have Node.js already, then execute the following commands – wget http://nodejs.org/dist/v0.10.30/node-v0.10.30.tar.gz
[root@vps mozaik-demo]# wget http://nodejs.org/dist/v0.10.30/node-v0.10.30.tar.gz
Then Extract the archive using command- tar xzvf node-v* && cd node-v*
[root@vps node-v0.10.30]# tar xzvf node-v* && cd node-v*
Next, in case you do not have gcc/g++ compiler then use command- sudo yum install gcc gcc-c++
[root@vps node-v0.10.30]# sudo yum install gcc gcc-c++
Post this fire commands ./configure and make as shown below. This will configure and compile the software. This will take some time to finish.
[root@vps node-v0.10.30]# ./configure
[root@vps node-v0.10.30]# make
Step 4 :
Now you can install it using the command- sudo make install.
Once this is complete you can check the version of node.js, using the command- node –version
[root@vps node-v0.10.30]# sudo make install
[root@vps node-v0.10.30]# node –version v0.10.30
Step 5 :
If for some reason the install command fails, the asset generation should be skipped, you can re-run it with command- npm run build
Finally, run the app using command- node app.js, as shown below
[root@vps mozaik-demo]# node app.js
With this, we have completed the setup of Mozaik in CentOS 7.