Installing Elasticsearch-Kibana on Devuan

4 min

language: ja bn en es hi pt ru zh-cn zh-tw

Hello, I'm Incompetent.
Kibana and Elasticsearch have returned to open source, and I've always thought Kibana was pretty good, and I need it for what I'm about to do on my own server, so I'm installing it.
In short, I've been convinced by the "Kibana is good" uncle.

Environment Setup

Install Kibana and Elasticsearch with apt

sudo apt update  
sudo apt install elasticsearch  

And then make sure it starts up at boot. Since it's SysVinit,

sudo update-rc.d kibana defaults
sudo update-rc.d elasticsearch defaults

Do this. Also open the port for Kibana.

sudo ufw allow 5601/tcp
sudo ufw reload

Configuration

sudo service elasticsearch start
Starting Elasticsearch Server:
/usr/share/elasticsearch/bin/elasticsearch: line 100: 14167 terminated            exec "$JAVA" "$XSHARE" $ES_JAVA_OPTS -Des.path.home="$ES_HOME" -Des.path.conf="$ES_PATH_CONF" -Des.distribution.flavor="$ES_DISTRIBUTION_FLAVOR" -Des.distribution.type="$ES_DISTRIBUTION_TYPE" -Des.bundled_jdk="$ES_BUNDLED_JDK" -cp "$ES_CLASSPATH" org.elasticsearch.bootstrap.Elasticsearch "$@" <<< "$KEYSTORE_PASSWORD"
 failed!

Oh, it got angry... It worked after changing the JVM memory settings.

sudo vim /etc/elasticsearch/jvm.options

Then add or change the following.

-Xms1g  
-Xmx1g  

And then, change the Kibana settings.

sudo vim /etc/kibana/kibana.yml
# Kibana is served by a back end server. This setting specifies the port to use.
server.port: 5601

# Specifies the address to which the Kibana server will bind. IP addresses and host names are both valid values.
# The default is 'localhost', which usually means remote machines will not be able to connect.
# To allow connections from remote users, set this parameter to a non-loopback address.
server.host: "0.0.0.0"

Now, start it up

sudo service elasticsearch restart
sudo service kibana start

If it fails, check the logs with the following.

sudo tail /var/log/elasticsearch/elasticsearch.log
sudo tail /var/log/kibana/kibana.log

Additionally, I had to generate a Kibana keygen

cd /usr/share/kibana
bin/kibana-encryption-keys generate

and append the output to `c/kibabana.yml`.

Trying to open Kibana

Check on port 5601
Image It worked!
As for security-related fixes like server.host and authentication methods, I'll deal with those later.
That's all for now.
See you again.

Related Posts