Ubuntu 18.04 LTS Installation elasticsearch6.x

Source: Internet
Author: User
Tags gpg

1. AddElasticsearch GPG Key

The first step is to import the Elasticsearch GPG key using the following command:

wget -qo-https://artifacts.elastic.co/gpg-key-elasticsearch | sudo apt-key add-

2. Add Elasticsearch 6.x apt repository

In the second step, after importing the GPG key, add the APT repository:

echo"Deb https:////artifacts.elastic.co/packages/6.x/apt stable main" | sudo tee-a/etc/apt/ Sources.list.d/elastic-6.x.list

3. Installing OPENJDK

The third step, Elasticsearch, is based on Java, so you need to install the JDK first

sudo add-apt-repository ppa:webupd8team/java  sudosudo  Install openjdk-8-jdk #安装jdk

4. Install Elasticsearch 6.x.
sudo Install Elasticsearch

when the installation is complete, enter /etc/elasticsearch/elasticsearch.yml Configuration of parameters

If you don't get to the file, change or assign permissions to a normal user

sudo chown liuf2 elasticsearch/

After you modify the configuration, you can start Elasticsearch:

sudosudo systemctl restart Elasticsearch.service

Status check:

$sudosystemctl status Elasticsearch.service elasticsearch.service-Elasticsearch loaded:loaded (/usr/lib/systemd/system/Elasticsearch.service; Vendo active:inactive (dead) since Fri2018- ,- to  +: in: .CST 1min 59s ago Docs:http://www.elastic.coProcess:32460Execstart=/usr/share/elasticsearch/bin/elasticsearch-P ${pid_d Main PID:32460(Code=exited, status=143) August to  +: -: theLiuf2-virtual-machine systemd[1]: Started elasticsearch.8 Month to  +: in: toLiuf2-virtual-machine systemd[1]: Stopping Elasticsearch ... August to  +: in: .Liuf2-virtual-machine systemd[1]: Stopped Elasticsearch.

Ubuntu 18.04 LTS Installation elasticsearch6.x

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.