Installing Kibana on a Raspberry Pi 4 using Raspbian Buster

@sixian_he Yes, I can tell you. Sorry it's taken so long to reply. I feel like I've been as helpful as every other joker who hasn't replied here. For what it's worth, for as well designed as this forum is, I feel like team members should find it easier to reply with something, but it seems as though the opposite is true. Moving on ...

First, download and install kibana:

cd ~/ && wget https://artifacts.elastic.co/downloads/kibana/kibana-7.4.0-amd64.deb
sudo dpkg -i --force-all kibana-7.4.0-amd64.deb

Build @elastic/nodegit and ctags on your platform to replace the nodegit amd64 build files located at kibana/node_modules/@elastic/nodegit/build with the one you just compiled.

The following command installs nodejs and npm. Note that only nodejs is required to run our custom kibana install, not npm. However, npm is needed to install packages we will use to replace in kibana:

sudo apt-get install nodejs npm

The following commands will install nodegit. Phantomjs is used in conjunction with npm to build nodegit.

Nodegit prereqs:

sudo apt-get install libkrb5-dev

NPM install of nodegit. As stated above, nodegit depends on phantomjs, which we will also download:

cd ~/ && git clone GitHub - nodegit/nodegit: Native Node bindings to Git. && cd nodegit
wget https://github.com/fg2it/phantomjs-on-raspberry/releases/download/v2.1.1-wheezy-jessie-armv6/phantomjs
export PATH=$PATH:~/nodegit
sudo chmod -R 777 ~/nodegit
npm install

The following commands backup the old nodegit module:

sudo mv /usr/share/kibana/node_modules/@elastic/nodegit/build/Release /usr/share/kibana/node_modules/@elastic/nodegit/build/Release.old
sudo mv /usr/share/kibana/node_modules/@elastic/nodegit/dist/enums.js /usr/share/kibana/node_modules/@elastic/nodegit/dist/enums.js.old

Replace nodegit module with one just built:

sudo cp -rf ~/nodegit/build/Release /usr/share/kibana/node_modules/@elastic/nodegit/build
sudo cp ~/nodegit/dist/enums.js /usr/share/kibana/node_modules/@elastic/nodegit/dist

Install node-ctags into local nodegit directory:

cd ~/nodegit
npm install ctags

The following commands change the folder name and backup the old ctags module:

sudo mv /usr/share/kibana/node_modules/@elastic/node-ctags/ctags/build/ctags-node-v64-linux-x64 /usr/share/kibana/node_modules/@elastic/node-ctags/ctags/build/ctags-node-v64-linux-arm
sudo mv /usr/share/kibana/node_modules/@elastic/node-ctags/ctags/build/ctags-node-v64-linux-arm/ctags.node /usr/share/kibana/node_modules/@elastic/node-ctags/ctags/build/ctags-node-v64-linux-arm/ctags.node.old

Replace node-ctags module with one just built:

sudo cp ~/nodegit/node_modules/ctags/build/Release/ctags.node /usr/share/kibana/node_modules/@elastic/node-ctags/ctags/build/ctags-node-v64-linux-arm

Edit the kibana start script so that it uses your node installation:

sudo nano /usr/share/kibana/bin/kibana

Locate the line that starts with NODE="${DIR}/node/bin/node" and edit it to mirror the below example:

NODE="/usr/bin/node"

Save and exit the file.

Enable and start the kibana service. Be patient as kibana takes a while to load:

sudo systemctl enable kibana
sudo systemctl start kibana

3 Likes