美文网首页
Elasticsearch单机部署

Elasticsearch单机部署

作者: zr_hebo | 来源:发表于2019-10-16 17:05 被阅读0次
  1. 下载并解压jdk
    tar -xzf jdk-8u162-linux-x64.tar.gz -C /opt
  2. 下载并解压ES
    tar -xzf elasticsearch-6.3.2.tar.gz -C /opt
  3. 创建链接
    ln -s /opt/jdk1.8.0_162 /usr/local/jdk
  4. 修改~/.bashrc文件添加
#################### java ########################                            
export JAVA_HOME=/usr/local/jdk
export PATH=$PATH:$JAVA_HOME/bin

export ES_HOME=/opt/elasticsearch-6.3.2
export PATH=$PATH:$ES_HOME/bin
  1. 创建数据目录
    mkdir -p /export/Data/elasticsearch
  2. 修改配置文件 $ES_HOME/config/elasticsearch.yml
network.host: 0.0.0.0
path.data: /export/Data/elasticsearch
  1. 创建用户
useradd elasticsearch
echo qynsy,stjdc |passwd --stdin elasticsearch
echo "elasticsearch ALL = (root) NOPASSWD:ALL" | tee /etc/sudoers.d/elasticsearch
chmod 0440 /etc/sudoers.d/elasticsearch
chown -R elasticsearch:elasticsearch /opt/elasticsearch-6.3.2
chown -R elasticsearch:elasticsearch /export/Data/elasticsearch
  1. 启动服务
su elasticsearch
cd /opt/elasticsearch-6.3.2
elasticsearch -d

相关文章

网友评论

      本文标题:Elasticsearch单机部署

      本文链接:https://www.haomeiwen.com/subject/ciyumctx.html