2000字范文,分享全网优秀范文,学习好帮手!
2000字范文 > Elasticsearch7.x安装(ES kibana ik分词器)Windows环境下

Elasticsearch7.x安装(ES kibana ik分词器)Windows环境下

时间:2019-09-04 10:32:53

相关推荐

Elasticsearch7.x安装(ES kibana ik分词器)Windows环境下

1安装ES
1.1将ES安装包解压,解压目录用户可以自定义。如下图所示:

解压后如下图所示:

1.2 进入ES解压后目录找到配置文件elasticsearch.yml,修改相应配置,如下图所示:

elasticsearch.yml内容如下:(根据实际情况修改)

#--------------------------------Cluster -------------------------------

#Use a descriptive name for your cluster:

cluster.name: elk

#-------------------------------- Node ---------------------------------

#Use a descriptive name for the node:

node.name: DESKTOP-G6EK75E

#Add custom attributes to the node:

#node.attr.rack: r1

#-------------------------------Paths ---------------------------------

#Path to directory where to store the data (separate multiple locations by comma):

path.data: E:\elasticsearch-7.6.1\data\es-data

#Path to log files:

path.logs: E:\elasticsearch-7.6.1\data\es-logs

#-------------------------- Memory ---------------------------------

#Lock the memory on startup:

bootstrap.memory_lock: true

#Make sure that the heap size is set to about half the memory available

#on the system and that the owner of the process is allowed to use this

#limit.

#Elasticsearch performs poorly when the system is swapping the memory.

#-------------------------------Network -------------------------------

#Set the bind address to a specific IP (IPv4 or IPv6):

network.host: 192.168.43.150

#Set a custom port for HTTP:

http.port: 9200

#For more information, consult the network module documentation.

#------------------------------Discovery ------------------------------

#Pass an initial list of hosts to perform discovery when this node is started:

#The default list of hosts is [“127.0.0.1”, “[::1]”]

discovery.seed_hosts: [“DESKTOP-G6EK75E”]

#Bootstrap the cluster using an initial set of master-eligible nodes:

cluster.initial_master_nodes: [“DESKTOP-G6EK75E”]

#For more information, consult the discovery and cluster formation module documentation.

#-------------------------------Gateway ------------------------------

#Block initial recovery after a full cluster restart until N nodes are started:

#gateway.recover_after_nodes: 3

#For more information, consult the gateway module documentation.

#------------------------------ Various -------------------------------

#Require explicit names when deleting indices:

#action.destructive_requires_name: true

http.cors.enabled: true

http.cors.allow-origin: “*”

bootstrap.system_call_filter: false

1.3启动ES,进入bin目录运行elasticsearch.bat文件如下图所示:

如果启动报错jdk版本问题,则将jdk8换为jdk11,只需修改JAVA_HOME为jdk11即可(快捷方式:cmd进入控制台,set JAVA_HOME #jdk路径)

浏览器访问ip:9200,出现下图所示信息ES即安装成功:

2安装部署Kibana(ES可视化工具)
2.1将Kibana安装包解压,解压目录用户可以自定义。如下图所示:

解压后如下图所示:

2.2进入kibana解压后目录找到配置文件kibana.yml,如下图所示:

Kibana.yml内容如下:(实际情况修改)

#Kibana is served by a back end server. This setting specifies the port to use.

server.port: 5601

#Specifies the address to which the Kibana server will bind. IP addresses and host names are both valid values.

#The default is ‘localhost’, which usually means remote machines will not be able to connect.

#To allow connections from remote users, set this parameter to a non-loopback address.

server.host: “192.168.43.150”

#Enables you to specify a path to mount Kibana at if you are running behind a proxy.

#Use theserver.rewriteBasePathsetting to tell Kibana if it should remove the basePath

#from requests it receives, and to prevent a deprecation warning at startup.

#This setting cannot end in a slash.

#server.basePath: “”

#server.ssl.enabled: false

#server.ssl.certificate: /path/to/your/server.crt

#server.ssl.key: /path/to/your/server.key

#Supported languages are the following: English - en , by default , Chinese - zh-CN .

#i18n.locale: “en”

i18n.locale:”zh-CN”

2.3启动kibana,进入bin目录运行kibana.bat文件如下图所示:

浏览器输入ip:5601,出现如下图所示界面,表示启动成功:

查看索引:点击左侧工具栏最下面一个图标即可进入到索引管理

3.安装ik分词器插件

复制以下文件到elasticsearch的plugins目录下;新建ik目录,将压缩文件解压到ik目录下即可;成功后删除压缩文件;

4将ES部署为windows系统服务

4.1cmd进入ES安装部署的bin目录,执行命令elasticsearch-service.bat install安装ES,如下图所示:

安装完成后,右键计算机管理,在系统服务里即可找到Elsaticsearch,如下图所示:

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。