YYDU 2020-06-21
es需要Java8 环境,需要首先安装jdk.
安装完java环境,就可以安装es,直接下载压缩包
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.5.1.zip
unzip elasticsearch-5.5.1.zip -d ${install_dir}cd ${install_dir}/elasticsearch-5.5.1/
./bin/elasticsearch如果这时候报错 error=‘Cannot allocate memory‘, 是因为elasticsearch5.0默认分配jvm空间大小为2g,需要改小一点
vim config/jvm.options -Xms512m -Xmx512m
如果你使用root用户启动,则此时会报错‘org.elasticsearch.bootstrap.StartupException: java.lang.RuntimeException: can not run elasticsearch as root‘
adduser ${user_name}
passwd ${user_name}
whereis sudoers
ls -l /etc/sudoers
chmod -v u+w /etc/sudoers
vim /etc/sudoers
${user_name} ALL=(ALL) ALL
chmod -v u-w /etc/sudoers
# 添加到root组
usermod -G root ${user_name}
su ${user_name} 另外一部分,则需要先做聚类、分类处理,将聚合出的分类结果存入ES集群的聚类索引中。数据处理层的聚合结果存入ES中的指定索引,同时将每个聚合主题相关的数据存入每个document下面的某个field下。