1、下载es
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.6.1.tar.gz
2、解压
tar -zxvf elasticsearch-6.6.1.tar.gz -C /usr/local
3、进入到es
cd /usr/local/elasticsearch-6.6.1/
4、配置信息
4.1 创建用户和用户组。因为es不支持使用root用户启动
groupadd esyun
useradd esyun -g yuns -p 123456
chown -R esyun:yuns elasticsearch-6.6.1
4.2
vi /etc/sysctl.conf
vm.max_map_count=655360
sysctl p
4.3
vi /etc/security/limits.conf
* soft nofile 65536
* hard nofile 131072
* soft nproc 2048
* hard nproc 4096
4.4
cd /usr/local/elasticsearch-6.6.1/config
vim elasticsearch.yml
---------------------------------
network.host: 0.0.0.0
http.port: 9200
-----------------------------------
4.5
vim /usr/local/elasticsearch-6.6.1/config/jvm.options
-Xms200m
-Xmx200m
4.6 关闭防火墙
systemctl stop firewalld.service
4.6 启动
./elasticsearch -d
然后打开浏览器