首页 > 其他分享 >安装 elasticsearch

安装 elasticsearch

时间:2022-10-17 11:37:16浏览次数:40  
标签:http elastic app elasticsearch dir 安装 es

1、安装

# vim elasticsearch.sh
app_uri=https://artifacts.elastic.co/downloads/elasticsearch app_version=elasticsearch-7.9.2 app_dir=/opt/es mkdir $app_dir wget $app_uri/$app_version-linux-x86_64.tar.gz -P $app_dir cd $app_dir tar xf $app_version-linux-x86_64.tar.gz ln -s $app_dir/$app_version $app_dir/elasticsearch /bin/cp -a elasticsearch.yml $app_dir/elasticsearch/config/elasticsearch.yml

2、系统优化

# echo "* soft nofile 65535
  * hard nofile 65535
  * soft nproc 65535
  * hard nproc 65535"  >> /etc/security/limits.conf
# echo "vm.max_map_count=655360" >>/etc/sysctl.conf
# sysctl -p

3、启动

# useradd es
# chown -R es /opt/es/elasticsearch
# su - es  
$ /opt/es/elasticsearch/bin/elasticsearch -d

4、rpm安装

# yum instll https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.4.3-x86_64.rpm

5、elasticsearch配置密码

1、修改配置文件
# vim elasticsearch.yml http.cors.enabled: true http.cors.allow-origin: "*" http.cors.allow-headers: Authorization xpack.security.enabled: true xpack.security.transport.ssl.enabled: true 2、配置密码 # elasticsearch-setup-passwords interactive 3、修改密码 # curl -H "Content-Type:application/json" -XPOST -u elastic 'http://127.0.0.1:9200/_xpack/security/user/elastic/_password' -d '{ "password" : "123456" }' 4、验证 # curl -XGET --user elastic:123456 'http://127.0.0.1:9200'

 

标签:http,elastic,app,elasticsearch,dir,安装,es
From: https://www.cnblogs.com/wuhg/p/16798548.html

相关文章

  • 使用Powershell/cmd提取msi安装包中的文件
    在前面的文章中介绍过如何使用msiexec这个程序执行自动化安装(https://www.cnblogs.com/zhaotianff/p/11558602.html)如果需要提取msi安装包中的文件,也可以使用msiexec程......
  • Docker安装私有云盘
    Docker安装私有云盘dockerpullnextclouddockerrun-d-p8080:80nextcloud-d后台运行容器,并返回容器ID;-p指定端口映射,格式为:主机(宿主)端口:容器端口......
  • IPFS安装笔记
    IPFS安装笔记1.创建ipfs目录,并进入目录中cd/homemkdiripfscdipfs/2.下载go-ipfs_v0.6.0_linux-amd64.tar.gz进入https://github.com/ipfs/go-ipfs/releases下......
  • Docker安装个人博客
    我的个人博客第一步:准备镜像dockerpullwordpressdockerpullmysqldockerimages|egrep‘wordpress|mysql’第二步:创建mysql容器[root@fabric/]#mkdir/data[......
  • Docker安装笔记
    Docker安装笔记1.卸载旧版本sudoyumremovedocker\        docker-client\        docker-client-latest\    ......
  • Google已将”XXX”标记为恶意扩展程序并已阻止系统安装它
    在Chrome浏览器中安装扩展程序时报错;Google已将”XXX”标记为恶意扩展程序并已阻止系统安装它 解决方法:1)将下载的扩展插件文件 *.crx,文件名crx后缀改为zip2)并用RA......
  • Xshell安装
    xshell破解版链接:https://pan.baidu.com/s/15A6gimNYPiSzROBjNBzImw提取码:xxk8 软件介绍Xshell6是由国外NetSarang公司开发的一款功能强大、并且非常出色......
  • 树莓派docker安装homeassistant container
    树莓派docker安装homeassistantcontainer1.docker1.1.docker安装#更新一下软件sudoaptupdate-ysudoaptupgrade-y#下载Docker安装脚本sudocurl-fsSLhtt......
  • python安装与python、pip的环境变量配置
    进入官网在你常用的搜索引擎中输入python官网然后进入。可直接点击本链接python官网进入;也可在浏览器地址栏输入www.python.org回车进入官网。下载将鼠标放到菜......
  • docker安装tomcat、mysql、redis
    一、tomcat1.下载tomcat8dockerpulltomcat:8.5.612.启动容器(-d后台启动)dockerrun-d-p8080:8080tomcat:8.5.61 3.访问首页http://ip:8080/访问不到......