You should read the article “Introduction to Central Log Management with Elastic Stack -1” before this article. In this article, we will install elasticsearch on ubuntu server 19.10 with 10.250.2.221 IP. Elasticsearch version will be 6.
First of all, let’s look at the version and ip address of our server;
Check Ubuntu version and IP
1 2 |
root@elastic:~# cat /etc/issue.net root@elastic:~# ifconfig |
Install less package on Ubuntu
Let’s install the less package.
1 |
root@elastic:~# apt-get install openjdk-8-jre-headless -y |
Install Elastichsearch on Ubuntu
Now we can download the repo of elasticsearch 7 to our server and install elasticsearh. Our necessary commands for these are as follows.
1 2 3 4 5 |
root@elastic:~# wget -qO – https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add – root@elastic:~# echo “deb https://artifacts.elastic.co/packages/6.x/apt stable main” | sudo tee -a /etc/apt/sources.list.d/elastic-6.x.list root@elastic:~# sudo apt-get update && sudo apt-get install elasticsearch |
Configure elasticsearch.yml
Before running Elasticsearch’s services, let’s define cluster name and node name in elasticsearch in the configuration file.
And let’s specify what IP address the elasticsearch service should run on the server. In addition, we don’t have an elastic cluster, but let’s enter at least one node in the discover.seed_hosts configuration for the elastic service to work.
1 |
root@elastic:~# vim /etc/elasticsearch/elasticsearch.yml |
Enable and Run Elasticsearch
We can now enable and run elasticsearch services.
1 2 3 4 5 6 7 |
root@elastic:~# service elasticsearch start root@elastic:~# systemctl start elasticsearch.service root@elastic:~# netstat -antp | grep java root@elastic:~# service elasticsearch status |
Our elasticsearch service has now started. Using curl, let’s verify that our elasticsearch service is running and observe that the configurations we made are working correctly.
1 |
root@elastic:~# curl http://10.250.2.221:9200 |
We successfully installed and run Elasticsearh on our server. In the next article of the series, we will install logstash on 10.250.2.222 server and transfer a dummy data to elasticsearch.
You can read our other articles in this serie from the links below.
Install Elasticsearch on ubuntu server 19.10
Install Logstash on Ubuntu Server 19.10
Install Kibana on Ubuntu Server 19.10
Install Winlogbeat on Windows Server 2019
Configure Logstash to Read log files Windows
Create Kibana Dashboards For Windows Event Logs