2, Elasticsearch installation and plug-in installation

Source: Internet
Author: User
Tags scp command kibana

1. Install Elasticsearch cluster

1. Download elasticsearch-2.0.0.tar.gz, perform TAR-ZXVF elasticsearch-2.0.0.tar.gz decompression

2. Modify CONFIG/ELASTICSEARCH.YML (be careful not to shelf the first letter with a space, followed by a space after the colon)

If you want to configure the cluster to require two nodes on the Elasticsearch configuration of the same cluster.name , all start can automatically compose the cluster, if not change cluster.name The default is cluster.name=elasticsearch,nodename

Random fetch but the nodes within the cluster cannot be the same

Cluster.name:chenkl#(same as a group)Node.name:node-1#(same episode or same group)network.host:192.168.57.4#You can't write 127.0.0.1 to write real IP here .#prevention of brain fissure configuration (also do not shelf write)Discovery.zen.ping.multicast.enabled:falsediscovery.zen.ping_timeout:120s client.transport.ping_timeout:60s discovery.zen.ping.unicast.hosts:["192.168.57.4","192.168.57.5","192.168.57.6"]#here is the node IP of ES

3. Create a new ES user (all ES nodes are to create a new user) and change the password

# due to security issues, ES is not able to run with root user $ useradd esuser$ passwd esuser# to authorize ES to Esuser $ chown-r Esuser:esuser elasticsearch-2.2.0

4. use SCP to distribute the installation directory to other nodes of ES and perform 2.3 on the other nodes .

5. Start ES

# start $ cd/usr/local/elasticsearch-2.2.0$./bin/elasticsearch#(running in the background)

Elasticsearch post-installation access
http://localhost:9200 Note It's best to use Firefox or a Chrome browser

    

2. Install plug-ins and Kibana

1. Download and unzip Kibana:https://www.elastic.co/products/kibana

2. Modify the Kibana. Yml in the Congfig directory to modify the Elasticsearch.url:elasticsearch.url: "/http/native ip:9200"

3. Authorizing Kibana to Esuser users

$ chown-r Esuser:esuser kibana-4.4.1-linux-x64/

4. use the SCP command to distribute Kibana to other ES nodes and operate on other nodes 2. Item

5. Installing plugins

# log in using Esuser, and then execute the following command under the ES directory $ bin/Plugin Install license$ bin/plugin Install marvel-Agent # execute the following command under the Kibana directory $ bin/kibana plugin--install elasticsearch/marvel/latest

6. Perform Operation 5 on the other nodes, respectively.

7. Start

# Start es and Kibana (only need to start on one)$ bin/elasticsearch$ bin/kibana# do not exit the window after booting , because the exit window is closed ES, need to exit ES when pressing CTRL + C  If you press the other key, although the ES process did not kill, so be sure to use CTRL + C

Access after startup: Http://IP (name or IP of the boot node): 5601/app/marvel

3. Install elasticsearch-servicewrapper plug-in

1. Download elasticsearch-servicewrapper

git clone https://github.com/elasticsearch/elasticsearch-servicewrapper, and then copy the service directory under the directory to Es_home/bin directory under

2. Simple configuration of the JVM's memory

Modify es_home/bin/service/elasticsearch.conf , set.default.es_heap_size=1024 , which can be customized according to the configuration of the machine.

3. Install the start-up service

Execute command: Es_home/bin/service/elasticsearch Install

You need to add the Execute permission here.

    

4. Start / stop / Restart service

Execute command: Es_home/bin/service/elasticsearch Start/stop/restart

   Execute in the bin directory ./plugin install Mobz/elasticsearch-head to mount the head plugin 

Note: Because Elasticsearch has the function of remote script execution, so it is easy to Trojan virus, so it is not allowed to start with root user,root user is not up, assign permissions, Start with a normal user

To configure Network.host and Network.publish_host and network.bind_host to access other machines or network cards, it is only 127.0.0.1 or localhost Access

Note Configuration files with the end of the configuration yml require a space after the colon.

2, Elasticsearch installation and plug-in installation

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.