编程知识 cdmana.com

Centos7 install elasticsearch

Installation preparation

  • Es Use is based on jdk Of ,, So the installation Es First install jdk( If you have previously installed and configured environment variables, you can install ES Such as software )

install jdk

  • install

 1、 Open the following URL https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

 2、 Choose the version you want to download

 3、 Download successfully in linux In the system usr/local/ Create java Catalog , Put the downloaded file in this directory

4、 perform tar zxvf jdk-8u201-linux-x64.tar.gz Command to decompress the file .

  • Configure environment variables

  1、 open ect/profile file , Add the following sentence at the end of it

export JAVA_HOME=/usr/java/jdk1.8.0_201export JRE_HOME=$JAVA_HOME/jreexport CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/libexport PATH=$JAVA_HOME/bin:$PATH

 

 

 

 

2、 Use after editing source /etc/profile Make the edit effective

3、 see jdk Whether the configuration successfully executed the command java –version, If the following classes appear, the configuration is successful .

 

 

 

install Es

  • Software version

ElasticSearch6.4.3

  • download

Download address :https://www.elastic.co/downloads/past-releases

 

  • install

1、 stay usr/local Create Es Folder , Put the downloaded compressed package into the directory and unzip it

2、 perform tar -zxvf elasticsearch-6.4.3.tar.gz Command decompression

 

  • start-up

notes :Es start-up ,es Start up is a little more troublesome , stay root It can't be started under the user , So create new users , And then authorize the new user , Launch in new users Es That's all right.

1、 groupadd -g 700 elastic——> New user group , Group name elastic

2、useradd -u 701 -g 700 elastic——-> A new user , The user name is elastic

3、passwd elastic——-> Set user password ( Do not display password when setting * either )

4、gpasswd -a elastic elastic—–> Add users to user groups , first elastic Represents the user name , the second elastic Indicates the group name .

5、 take Es The installation file is authorized to new users chown -R elastic:elastic /usr/local/es/elasticsearch-6.4.3

 

6、 Start with a new user es service , function es In the directory elasticsearch

 

After successful startup :

 

  • install Ik Word segmentation is

1、 download IK package , stay Es In the installation directory of plugins, Create inside ik Folder , take Ik.zip Copy the file into it and unzip it ( With tar.gz The following error will appear after decompressing the suffix , Because in order to tar.gz For suffixes to be passed through maven Compile ).

版权声明
本文为[Irving the procedural ape]所创,转载请带上原文链接,感谢

Scroll to Top