es(elasticsearch)安装

1,下载elasticsearc

    $ cd /usr

    $ wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.5.1.zip

$ unzip elasticsearch-5.5.1.zip
$ useradd soft
$ chown -R soft:root elasticsearch-5.5.1

$ cd elasticsearch-5.5.1
2,启动(不可以在root用户下启动)
$ ./bin/elasticsearch
如果这时报错"max virtual memory areas vm.maxmapcount [65530] is too low",要运行下面的命令。
$ sudo sysctl -w vm.max_map_count=655360
$ sysctl -p
再次启动 如果这时报错“max file descriptors [4096] for elasticsearch process likely too low, increase to at least [65536]”,要做如下配置
解决:切换到root用户,编辑limits.conf 添加类似如下内容
$ vim /etc/security/limits.conf (设置完成后需要重新登录用户才可以生效)

      * soft nofile 65536

      * hard nofile 65536

     * soft nproc  4096

     * hard nproc 4096

启动成功 elastic会在9200端口运行,打开另一个窗口,请求该窗口,会得到说明信息

此处表示已安装成功




 

posted @ 2019-06-20 09:42  尚真  阅读(70)  评论(0编辑  收藏  举报