ElasticSearch with PowerShell : #1 Setup ElasticSearch

Опубликовано: 04 Октябрь 2024
на канале: JackedProgrammer
1,367
35

In this video I will go over how to install ElasticSearch on a Ubuntu VM on VirtualBox to be able to use with our Windows Hosts and interact through PowerShell.

Set up Ubuntu Desktop on VirtualBox video :    • VirtualBox and Ubuntu Desktop Install...  

Install and Configuration steps:

Download and install elasticsearch:

wget -qO - https://artifacts.elastic.co/GPG-KEY-... | sudo gpg --dearmor -o /usr/share/keyrings/elasticsearch-keyring.gpg
sudo apt-get install apt-transport-https
echo "deb [signed-by=/usr/share/keyrings/elasticsearch-keyring.gpg] https://artifacts.elastic.co/packages... stable main" | sudo tee /etc/apt/sources.list.d/elastic-8.x.list
sudo apt-get update
sudo apt-get install elasticsearch

Configure Elasticsearch

#First file:
sudo nano /etc/elasticsearch/elasticsearch.yml

node.name: node-1
network.host: 0.0.0.0
discovery.seed_hosts: ["127.0.0.1"]
cluster.initial_master_nodes: ["node-1"]

#Second file:
sudo nano /lib/systemd/system/elasticsearch.service

TimeoutStartSec=600

#Change Permissions and set up autostart on reboots:

sudo chmod 755 -R /var/log/elasticsearch/
sudo /bin/systemctl daemon-reload
sudo /bin/systemctl enable elasticsearch.service
sudo /bin/systemctl start elasticsearch.service
sudo /bin/systemctl status elasticsearch.service

#Test out the elastic install:

sudo apt-get install curl
curl -k -u elastic https://127.0.0.1:9200

Tags:
PowerShell, jackedprogrammer, powershell 7, how to install powershell 7, powershell 7 on vs code, visual studio code