标签:http dir start options memory font ls -l https runtime
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}
标签:http dir start options memory font ls -l https runtime
原文地址:https://www.cnblogs.com/lwmp/p/13174461.html