Configure the elasticsearch and river-mongodb plug-ins on windows

Source: Internet
Author: User

Configure the elasticsearch and river-mongodb plug-ins on windows
Install ElasticSearch

1. Download The elasticsearch installation package.

2. decompress the elasticsearch package to the installation directory. For example, D: \ Elasticsearch, and add D: \ Elasticsearch \ bin to the System path

Install JDK

1. Download JDK. The lowest version is jdk update u55.

2. Configure the JAVA_HOME environment variable. Point to the JDK installation directory, such as D: \ Java \ jdk \

Install maven

1. Download the maven installation package.

2. decompress the maven package to the installation directory. For example, D: \ Maven, and add D: \ Maven \ bin to the System path

3. Configure the maven local storage location. Open D: \ Maven \ Config \ setting. xml and add <localRepository> D: \ Maven \ m2 \ repository </localRepository>

Note: (1) Step 3 can be skipped; (2) if you do not want to install the river-mongodb plug-in from the source code, you do not need to install maven

 

Install the river-mongodb plug-in

1. download the latest source code package for the elasticsearch-river-mongodb plug-in.

2. decompress the source code package and compile it. Run the command line to enter the elasticsearch-river-mongodb-master Directory, and run the command mvn package-Dmaven. test. skip = true.

3. The compilation process is slow and you need to wait patiently. The compiled plug-in is stored in the elasticsearch-river-mongodb-master \ target \ releasesdirectory. The file name is like elasticsearch-river-mongodb-2.0.6-snapshot.zip.

4. Install the compilation plug-in. Decompress the package directly to the plugins \ river-mongodb directory under the elasticsearch installation directory, or run the command plugin-I river-mongodb-u file:/E: \ Documents \ programming \ ElasticSearch \ install \ elasticsearch-river-mongodb-master \ target \ releases \ elasticsearch-river-mongodb-2.0.6-SNAPSHOT.zip

Note: If you do not want to install the river-mongodb plug-in from the source code, you can directly run plugin-I com. github. Richard willy98.elasticsearch/elasticsearch-river-mongodb/2.0.6 on the command line (here 2.0.6 is the version number)

 

Install curl

1. Download the curl tool.

2. Just install it in a silly way.

Configure mongodb river

1. Download the curl tool. Run elasticsearch. Run bin \ elasticsearch. bat in the elasticsearch installation directory.

2. Run curl-XPUT "http: // 127.0.0.1: 9200/_ river/icssa/_ meta? Pretty "-d" {\ "type \": \ "mongodb \", \ "mongodb \": {\ "host \": \ "127.0.0.1 \", \ "port \": \ "27017 \", \ "credentials \": [{\ "db \": \ "admin \", \ "user \": \ "admin \", \ "password \": \ "12345 \"}], \ "db \": \ "icssa \", \ "collection \": \ "equipment \" },\ "index \": {\ "name \": \ "icssa \", \ "type \": \ "equipment \"}}"

Note: (1) mongodb must be configured as a replication cluster; (2) Change the port of the mongodb routing process (mongos) to 27017; (3) you must configure the mongodb username and password (if any). Otherwise, elasticsearch will save the following error: com. mongodb. except exception: can't use 'local' database through mongos


View synchronization results

1. Open http: // localhost: 9200/_ plugin/head/in the browser, provided that you have installed the head plug-in for elasticsearch

2. The synchronization result is shown as follows:

Note: Elasticsearch, river-mongodb plug-in, and mongodb versions must match

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.