Elasticsearch6.1.3+kibana6.1.3安装
下载
- es官网是中文版的直接上官方下载即可es官网——-下载Elasticsearch6.1.3(下文简称es)
- window与linux下载的文件是相同的,window使用.bat直接运行,linux执行脚本./bin/ealsticsearch
Linux安装
由于5.x版本之后不可以使用root用户直接访问,所以需要新建一个用户
[root@localhost usr]# useradd yourusername
需要将es的文件移动到普通用户可以访问的文件夹
[root@localhost usr]# mv elasticsearch-6.1.3 /usr
切换用户尝试启动es
[root@localhost usr]# su elastic
[elastic@localhost usr]$ cd /usr/elasticsearch-6.1.3
[elastic@localhost elasticsearch-6.1.3]$ ./bin/elasticsearch
启动成功,在linux下使用curl可以得到es相关信息的json
[elastic@localhost elasticsearch-6.1.3]$ curl 'localhost:9200'
{
"name" : "FZFu6Xy",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "_na_",
"version" : {
"number" : "6.1.3",
"build_hash" : "af51318",
"build_date" : "2018-01-26T18:22:55.523Z",
"build_snapshot" : false,
"lucene_version" : "7.1.0",
"minimum_wire_compatibility_version" : "5.6.0",
"minimum_index_compatibility_version" : "5.0.0"
},
"tagline" : "You Know, for Search"
}
到这里es就算是安装完成了,但是只能在本地进行访问,接下来要修改配置文件进行远程访问
远程访问es
在window上尝试访问远程linux上的es,结果无法访问
是因为es如果需要远程访问要修改配置文件
[elastic@localhost elasticsearch-6.1.3]$ ls
bin data LICENSE.txt modules plugins
config lib logs NOTICE.txt README.textile
[elastic@localhost elasticsearch-6.1.3]$ cd config/
[elastic@localhost config]$ vim elasticsearch.yml
在es根目录下输入命令进入配置文件进行更改
network.host: 192.168.100.161
http.port: 9200
discovery.zen.minimum_master_nodes: 3
discovery.zen.ping.unicast.hosts: ["192.168.100.161"]
放开如下注解,由于是单点的es,上文所有的ip均是linux本机的ip
再次尝试启动es,发现继续报错
ERROR: [1] bootstrap checks failed
[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]
这个错误是因为使用非root用户,这个用户没有足够的文件操作权限,需要切换到root用户下进行修改
[elastic@localhost config]$ su root
Password:
[root@localhost config]# vim /etc/security/limits.conf
进入文件,在最后添加如下内容
yourusername hard nofile 65536
yourusername soft nofile 65536
添加完成后,重启es所在的用户一定要重启否则修改不会生效
[root@localhost config]# su elastic
[elastic@localhost config]$ ulimit -Hn
65536
查看是否修改成功
重新启动es尝试使用windows访问
成功连接es
安装kibana
同样从官网进行下载
解压即可使用
修改配置文件
server.port: 5601
server.host: "192.168.100.161"
elasticsearch.url: "http://192.168.100.161:9200"
分别表示
- kibana启动的端口号
- kibana访问的ip
- kibana所要连接的es的IP地址
启动kibana
[root@localhost kibana-5.6.7-linux-x86_64]# ./bin/kibana
安装head
上head的git官网上去下载下载地址
安装教程 这是安装教程
还没有评论,来说两句吧...