2020-05-18 es安装

wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.2.2.tar.gz
tar -zxvf elasticsearch-6.2.2.tar.gz
到plugins目录下新建ik和pinyin文件夹
在ik文件夹中
wget https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v6.2.2/elasticsearch-analysis-ik-6.2.2.zip
解压
在pinyin文件夹中
wget https://github.com/medcl/elasticsearch-analysis-pinyin/releases/download/v6.2.2/elasticsearch-analysis-pinyin-6.2.2.zip
解压
vi config/jvm.options
修改xms和xmx为1个G
vi config/elasticsearch.yml
修改network.host: 0.0.0.0

/etc/sysctl.conf
vm.max_map_count=655360
保存后,执行:
sysctl -p

/etc/security/limits.conf

  •           soft    nproc           4096
    
  •           hard    nproc           4096
    
  •           soft    nofile          65536
    
  •           hard    nofile          65536
    

建立用户
groupadd elasticsearch
useradd -g elasticsearch elasticsearch
chown -R elasticsearch:elasticsearch elasticsearch-6.2.2/
su elasticsearch
./elasticsearch-6.6.2/bin/elasticsearch
成功了的话退出 ./elasticsearch-6.6.2/bin/elasticsearch -d

访问ip:9200即可

你可能感兴趣的:(2020-05-18 es安装)