elasticsearchHow do I install Elasticsearch on Ubuntu 22.04?
- Download the .deb package from the Elastic website: https://www.elastic.co/downloads/elasticsearch.
- Install the package with
sudo dpkg -i elasticsearch-<version>.deb
. - Enable the Elasticsearch service with
sudo systemctl enable elasticsearch.service
. - Start the Elasticsearch service with
sudo systemctl start elasticsearch.service
. - Check the status of the Elasticsearch service with
sudo systemctl status elasticsearch.service
.
sudo systemctl status elasticsearch.service
● elasticsearch.service - Elasticsearch
Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2020-05-26 11:46:30 UTC; 1min 10s ago
Docs: http://www.elastic.co
Main PID: 28101 (java)
Tasks: 47 (limit: 4661)
CGroup: /system.slice/elasticsearch.service
└─28101 /usr/bin/java -Xms1g -Xmx1g -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+AlwaysPreTouch -Xss1m -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djna.nosys=true -XX:-OmitStackTraceInFastThrow -Dio.netty.noUnsafe=true -Dio.netty.noKeySetOptimization=true -Dio.netty.recycler.maxCapacityPerThread=0 -Dlog4j.shutdownHookEnabled=false -Dlog4j2.disable.jmx=true -Dlog4j.skipJansi=true -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=data -XX:ErrorFile=logs/hs_err_pid%p.log -Xlog:gc*,gc+age=trace,safepoint:file=logs/gc.log:utctime,pid,tags:filecount=32,filesize=64m -Djava.locale.providers=COMPAT -XX:UseAVX=2 -Des.path.home=/usr/share/elasticsearch -cp /usr/share/elasticsearch/lib/* org.elasticsearch.bootstrap.Elasticsearch -p /var/run/elasticsearch/elasticsearch.pid --quiet
- Check if Elasticsearch is running by making a request to the server:
curl -X GET "localhost:9200"
.
curl -X GET "localhost:9200"
{
"name" : "node-1",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "HXF5U5-lQ-q-7wTf-q3-A",
"version" : {
"number" : "7.6.2",
"build_flavor" : "default",
"build_type" : "deb",
"build_hash" : "ef48eb35cf30adf4db14086e8aabd07ef6fb113f",
"build_date" : "2020-03-26T06:34:37.794943Z",
"build_snapshot" : false,
"lucene_version" : "8.4.0",
"minimum_wire_compatibility_version" : "6.8.0",
"minimum_index_compatibility_version" : "6.0.0-beta1"
},
"tagline" : "You Know, for Search"
}
- You can now access the Elasticsearch API at
localhost:9200
.
For more detailed instructions, please refer to the official Elasticsearch documentation: https://www.elastic.co/guide/en/elasticsearch/reference/current/deb.html.
More of Elasticsearch
- How can I use Elasticsearch with Zammad?
- How can I use Yandex Mirror to access Elasticsearch data?
- How do I configure elasticsearch to use an XMS memory allocator?
- How do I set up an Elasticsearch Yum repository?
- How can I use elasticsearch zone awareness to improve my software development?
- How can I use Elasticsearch and Zookeeper together to manage distributed applications?
- How can I check the status of a yellow index in Elasticsearch?
- How do I use Elasticsearch with ZGC?
- How do I use ElasticSearch to zip files?
- How can I use Elasticsearch and ZFS together?
See more codes...