Original address: http://www.cnblogs.com/tianjixiaoying/p/4316011.html
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 discover this problem, use the ls-l command to view the permissions of the file,
Attached: permissions for the file
r -file can be read
w -files can be written
x -files can be is executed (if it is a program)
is 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
And then enter Ls–l to view, already has the X permission
At this point, install the plug-in head again, you can install it properly.
2. Running ES will prompt for errors similar to those of version error. 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 dependent 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 after installation, the system will have two versions of Java, in order to ensure that the JAVA7 version is called, you need to modify the environment variables to ensure that the JAVA7 path is the first.
input command: VIM ~/.bashrc Open environment variable contents:
 
Elasticsearch installation and deployment records on Linux