The operating environment is as follows
Centos 6.4
elasticsearch1.7.2
jdk-7u67-linux-x64.rpm
First, check the current operating system version
[[email protected] ~]# hostname//view current host name Es[[email protected] ~]# uname-m//view system how many bits X86_64[[email protected] ~]# Uname-r//view kernel version 2.6.32-358.el6.x86_64[[email protected] ~]# cat/etc/redhat-release//view CentOS version number CentOS release 6.4 (Final) [Email protected] ~]#
Ii. installation of the JDK Environment (JDK-7U67-LINUX-X64.RPM)
[Email protected] src]# RPM-IVH jdk-7u67-linux-x64.rpm Preparing ... ##################################### ###### [100%] 1:jdk ########################################### [100%]unpacking JAR files ... r T.jar ... jsse.jar ... charsets.jar ... tools.jar ... localedata.jar ..... jfxrt.jar.
Configure the environment variable vi/etc/profile on the last add of this file
#set java environmentjava_home=/usr/java/jdk1.7.0_67classpath=.: $JAVA _home/lib.tools.jarpath= $JAVA _home/bin:$ Pathexport java_home CLASSPATH PATH
Let the environment variable configuration file take effect immediately
[[Email protected] ~]# [[email protected] ~]# source/etc/profile//Both of these effective methods you can use either [[email protected] ~]# [[Email Prot Ected] ~]#. /etc/profile[[email protected] ~]#
Test if the environment variable is installed successfully
[[email protected] ~]# Java-versionjava version "1.7.0_67" Java (TM) SE Runtime Environment (build 1.7.0_67-b01) Java HOTSPO T (TM) 64-bit Server VM (build 24.65-b04, Mixed mode)
JDK Installation Complete ...
Third, install elasticsearch1.7.2 software
[Email protected] elasticsearch-1.7.2]# Pwd/usr/local/elasticsearch-1.7.2[[email protected] elasticsearch-1.7.2]# Lltotal 40drwxr-xr-x. 2 root root 4096 Mar 22:49 bindrwxr-xr-x. 2 root root 4096 Mar 22:49 configdrwxr-xr-x. 3 root root 4096 Mar 22:49 lib-rw-rw-r--. 1 root root 11358 Sep license.txt-rw-rw-r--. 1 root root notice.txt-rw-rw-r Sep--. 1 root root 8700 Sep readme.textile
Start Elasticsearch
[[Email protected] bin]# pwd/usr/local/elasticsearch-1.7.2/bin[[email protected] bin] # lltotal 324-rwxr-xr-x. 1 root root 8114 sep 14 2015 elasticsearch-rw-rw-r--. 1 root root 901 Sep 14 2015 elasticsearch.bat-rw-rw-r--. 1 root root 2797 sep 14 2015 elasticsearch.in.bat-rwxr-xr-x. 1 root root 2170 sep 14 2015 elasticsearch.in.sh-rw-rw-r--. 1 root root 104448 sep 14 2015 elasticsearch-service-mgr.exe-rw-rw-r--. 1 root root 103936 sep 14 2015 elasticsearch-service-x64.exe-rw-rw-r--. 1 root root 80896 sep 14 2015 elasticsearch-service-x86.exe-rwxr-xr-x. 1 root root 2523 sep 14 2015 plugin-rw-rw-r--. 1 root root 482 sep 14 2015 plugin.bat-rw-rw-r--. 1 root root 6210 sep 14 2015 service.bat[[email protected] bin]# /bin/sh ./elasticsearch //started ....
began to enter the test ....
Clone a SECURECRT session option to turn off firewall settings
[[email protected] ~]#/etc/init.d/iptables stopiptables:flushing firewall rules: [OK]iptable S:setting chains to Policy accept:filter [OK]iptables:unloading modules: [ OK]
After closing, enter the address on the browser: http://172.16.10.100:9200/
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/7D/8A/wKiom1bqVYbSOJJZAABtBuAbsz8153.png "title=" 3.png " alt= "Wkiom1bqvybsojjzaabtbuabsz8153.png"/>
Successfully installed .....
Iv. we want to configure the self-starting service
Download the software here: Https://github.com/elastic/elasticsearch-servicewrapper
and upload it to the server.
[[email protected] src]# pwd/usr/local/src[[email protected] src]# unzip elasticsearch-servicewrapper-master.zip //Decompression Software [[email Protected] src]# lltotal 153708-rw-r--r--. 1 root root 28478292 dec 29 10:47 elasticsearch-1.7.2.tar.gzdrwxr-xr-x. 3 root root 4096 feb 14 03:02 elasticsearch-servicewrapper-master-rw-r--r--. 1 root root 2054227 Mar 17 14:10 Elasticsearch-servicewrapper-master.zip-rw-r--r--. 1 root root 126857158 dec 21 17:09 jdk-7u67-linux-x64.rpm[[email protected] src]# mv elasticsearch-servicewrapper-master/service/ /usr/local/elasticsearch-1.7.2/bin/ [[email protected] src]#
Move the service directory under the bin directory under elasticsearch [[email protected] service]# pwd/usr/local/ elasticsearch-1.7.2/bin/service[[email protected] service]# ./elasticsearchusage: ./ Elasticsearch [ console | start | stop.... ]commands: console Launch in the current console. start start in the background as a daemon process. stop stop if running as a daemon or in another console. restart Stop if running and then start. condrestart restart only if already running. status Query the current Status. install install to start automatically when system boots. remove Uninstall. dump request a java thread dump if running.
Start the installation service
[Email protected] service]#/elasticsearch Install//start installing detected RHEL or fedora:installing the Elasticsearch daemon. .
[[email protected] service]#/etc/init.d/elasticsearch status//view running status Elasticsearch is not running. [Email protected] service]# chkconfig--list elasticsearchelasticsearch 0:off 1:off 2:on 3:on 4:on 5:on 6:off
========================
Configure OK .... Congratulations to you.
Elasticsearch Installation Tutorials