Elasticsearch + elasticsearch-Head Construction

Source: Internet
Author: User
Elasticsearch construction:

[[Email protected] elk] # tar-xvf elasticsearch-6.2.4.tar

[[Email protected] elk] # cd elasticsearch-6.2.4

[[Email protected] elasticsearch-6.2.4] # mkdir es-Data

[[Email protected] elk] # useradd elasticsearch

[[Email protected] elk] # passwd elasticsearch

[[Email protected] elk] # chown-r elasticsearch: elasticsearch elasticsearch-6.2.4

[[Email protected] config] # cd/home/software/elk/elasticsearch-6.2.4/config

[[Email protected] config] # cp elasticsearch. yml elasticsearch. yml_install

 

[[Email protected] config] # Vim elasticsearch. yml

 

Cluster. Name: The-test # Cluster name

Node. ATTR. Rack: elk-1 # node name

Path. Data:/home/elk/elasticsearch-6.2.4/ES-data # path where data is stored

Path. logs:/home/elk/elasticsearch-6.2.4/logs # path where logs is stored

Network. HOST: 0.0.0.0 # network address of the listener

HTTP. Port: 9200 # enable the listening port

HTTP. CORS. Enabled: true # Add a new parameter so that the head plug-in can access es

HTTP. CORS. Allow-origin: "*" # Add new parameters so that the head plug-in can access es

Bootstrap. memory_lock: false # configure swap partitions for memory usage

Bootstrap. system_call_filter: false

 

 

[[Email protected] config] # Vim JVM. Options

-Xms4g # Change JVM startup memory usage

-Xmx4g

 

[[Email protected] elk] # Vim/etc/security/limits. conf

* Soft nofile 65536

* Hard nofile 65536

 

[[Email protected] Home] # Vim/etc/sysctl. conf

VM. max_map_count = 655360

 

[[Email protected] elasticsearch-6.2.4] # sysctl-P

 

Log on to the terminal again, or some configurations will not take effect.

 

[[Email protected] elasticsearch-6.2.4] # rm-RF/home/software/elk/elasticsearch-6.2.4/logs /*

# Delete the log and switch to User Startup to avoid the log write permission error.

 

[[Email protected] ~] # Su-elasticsearch

[[Email protected] ~] $ CD/home/software/elk/elasticsearch-6.2.4/

[[Email protected] elasticsearch-6.2.4] $ bin/elasticsearch-d

Elasticsearch-head installation:

 

[[Email protected] elk] # wget https://nodejs.org/dist/v10.13.0/node-v10.13.0-linux-x64.tar.xz

[[Email protected] elk] # tar-xvf node-v10.13.0-linux-x64.tar.xz

 

[[Email protected] node-v10.13.0-linux-x64] # Vim/etc/profile

# Node

Export Path = $ path:/home/software/elk/node-v10.13.0-linux-x64/bin

 

[[Email protected] node-v10.13.0-linux-x64] # source/etc/profile

[[Email protected] node-v10.13.0-linux-x64] # Node-V

V10.20.

[[Email protected] node-v10.13.0-linux-x64] # NPM-V

6.4.1

 

Elasticsearch-head:

[[Email protected] elasticsearch-6.2.4] # cd/home/software/elk/elasticsearch-6.2.4

[[Email protected] elasticsearch-6.2.4] # git clone git: // github.com/mobz/elasticsearch-head.git

 

[[Email protected] elasticsearch-head] # NPM install

An error similar to the following occurs:

NPM Err! [Email protected] install: 'node install. js'

 

[[Email protected] elasticsearch-head] # NPM cache clean -- force

[[Email protected] elasticsearch-head] # NPM-G install [email protected] -- ignore-script

 

[[Email protected] elasticsearch-head] # NPM start &

Elasticsearch + elasticsearch-Head Construction

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.