Elasticsearch on Linux installation and deployment process record

Source: Internet
Author: User
Tags ssh secure shell

Due to project requirements, a set of ES services is required on the Linux platform. In the construction process, encountered a variety of problems. And then they all worked out. Now it is time to document the process, and the problems encountered, and how to resolve them.

First, the Environment configuration

Operating system: Cent OS 7

Elasticsearch version: 1.4.1

JDK Version: 1.7

SSH Secure Shell version: 3.2.9

Elasticsearch-servicewrapper:es's service plug-in, typically used on Linux.

Second, the operation process

1. Elasticsearch as a system service application, you can install the Elasticsearch-servicewrapper plugin.

After the plugin is downloaded Https://github.com/elasticsearch/elasticsearch-servicewrapper, unzip it. Copy the service directory to the bin directory of the Elasticsearch directory. The advantage of running this plugin is that the JVM parameters and other configurations required by Elasticsearch are already configured and are very handy.

2. Upload the ES and Sevice folders to the appropriate directory on the Linux system via the SSH Secure Shell Connection tool.

3. In the Linux environment, enter the Bin/service directory of the ES directory, e.g., Run command sh elasticsearch start

4. Installing the Es-head Plugin

Go to the Elasticsearch/bin directory and enter the command./plugin–install mobz/elasticsearch-head Install the head plugin.

5. Enter http://localhost:9200,http://localhost:9200/_plugin/head/in the browser as shown in the ES boot success.

6. If you want to stop the ES service, enter SH elasticsearch stop, then the output as, ES successfully stopped.

Iii. problems encountered and their solutions

1. When you install the Es-head plugin with the plugin command on Linux, the following issues occur. Here is a plugin as an example to give a workaround.

To find this problem, use the ls-l command to view the file's operation permissions,

Attached: Permissions for files

    • r -Files can be read

    • W -Files can be written

    • x -The file can be executed (if it is a program)

Visible, the plugin file, the owner has only read and write permissions, and does not have permission to execute. Therefore, this file needs to be given permission to execute.

Apply command chmod +x plugin to operate

Re-enter Ls–l to view, already has the X permission

Install the plug-in head again at this point, and the plugin will install properly.

2. Running ES will prompt for errors similar to some version error errors. If the JDK version is not 7, there may be an issue with ES not starting up. Linux comes with OPENSDK7 also best not to use.

Elasticsearch relies on Java 7. It is recommended to use the Oracle JDK 1.7.0_55 version . The installation of Java is different on every platform, so we don't want to go into too much detail here. I just want to say that before you install Elasticsearch, you can check your Java version with the following command (if necessary, install or upgrade): Java–version

3.JDK7 installed, the system will have two versions of Java, in order to ensure that the JAVA7 version, you need to modify the environment variables to ensure that the java7 path at the top.

Input command: Vim ~/.BASHRC open environment variable content:

Elasticsearch on Linux installation and deployment process record

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.