环境
- ubuntu 16.04 server http://releases.ubuntu.com/16.04/ubuntu-16.04.6-server-amd64.iso.torrent?_ga=2.56610536.2140629033.1584409730-30987987.1584409730
- vmware 12 pro http://down-ww3.7down.net/pcdown/soft/xiazai/vmwarepro12.rar
- Finnalshell http://dl.hostbuf.com/finalshell2/finalshell_install.exe?QKMQe
虚拟机环境如何配置可参考 我的另一篇博客https://www.jianshu.com/p/056e13cf0ee9
虚拟机环境配置
安装vmware12pro
创建虚拟机ubuntu16.04 ubuntu(root)/123456
更新源
https://cloud.tencent.com/developer/article/1135529
安装java8
https://www.cnblogs.com/guxiaobei/p/8556586.html
sudo apt-get install default-jre
安装elasticsearch
使用apt方式安装elaticsearch6.8方便快捷
https://www.elastic.co/guide/en/elasticsearch/reference/6.8/install-elasticsearch.html
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
sudo apt-get install apt-transport-https
echo "deb https://artifacts.elastic.co/packages/6.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-6.x.list
sudo apt-get update && sudo apt-get install elasticsearch
配置elasticsearch
注意:配置es需要切换到root用户,启动es不需要root用户
配置文件目录 /etc/elasticsearch YAML格式
- elasticsearch.yml for configuring Elasticsearch
- jvm.options for configuring Elasticsearch JVM settings
- log4j2.properties for configuring Elasticsearch logging
设置jvm选项 /etc/elasticsearch/jvm.options
#堆大小
-Xms2g 最小堆大小
-Xmx2g 最大堆大小
重要的配置项
/etc/elasticsearch/elasticsearch.yml
path.data 数据文件
path.logs 日志文件
cluster.name 集群名称,一个集群对应多个Node
node.name 节点名称
network.host 绑定的IP地址默认为127.0.0.0
设置开机自启动
sudo /bin/systemctl daemon-reload
sudo /bin/systemctl enable elasticsearch.service
启动和关闭
sudo systemctl start elasticsearch.service
sudo systemctl stop elasticsearch.service
https://www.elastic.co/guide/en/elasticsearch/reference/6.8/deb.html
使用curl测试是否装好
ubuntu@ubuntu:/etc/elasticsearch$ curl localhost:9200
{
"name" : "kQOogOX",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "GZ5rMOMgRtqJewDPOscF_w",
"version" : {
"number" : "6.8.7",
"build_flavor" : "default",
"build_type" : "deb",
"build_hash" : "c63e621",
"build_date" : "2020-02-26T14:38:01.193138Z",
"build_snapshot" : false,
"lucene_version" : "7.7.2",
"minimum_wire_compatibility_version" : "5.6.0",
"minimum_index_compatibility_version" : "5.0.0"
},
"tagline" : "You Know, for Search"
}
注意问题
导入ovf模板时,需要修改硬件兼容性,在虚拟机->管理->修改硬件兼容性中修改,使得导出的ovf文件兼容目标ESXI系统
参考资料
https://www.freebuf.com/sectool/183984.html
https://github.com/aol/moloch
https://molo.ch/#downloads
https://www.elastic.co/guide/en/elasticsearch/reference/current/install-elasticsearch.html
https://www.elastic.co/guide/en/elasticsearch/reference/current/deb.html
网友评论