https://elasticsearch.cn/download/
或者
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.0.0.rpm
[root@localhost bin]# pwd /usr/share/elasticsearch/bin [root@localhost bin]# ll 总用量 20 -rwxr-xr-x 1 root root 1523 11月 11 2017 elasticsearch -rwxr-xr-x 1 root root 1893 11月 11 2017 elasticsearch-env -rwxr-xr-x 1 root root 239 11月 11 2017 elasticsearch-keystore -rwxr-xr-x 1 root root 229 11月 11 2017 elasticsearch-plugin -rwxr-xr-x 1 root root 242 11月 11 2017 elasticsearch-translog
[root@localhost share]# su elasticsearch/ su: user elasticsearch/ does not exist [root@localhost share]# su elasticsearch This account is currently not available. [root@localhost share]# cat /etc/passwd |grep elasticsearch elasticsearch:x:989:984:elasticsearch user:/home/elasticsearch:/sbin/nologin
今天在一台新服务器下切换用户的时候出现“This account is currently not available”错误 上网检索了一 下发现是用户的shell禁止登录的问题 解决办法: 比如我是 su elasticsearch的时候出现的问题 用cat看看 apache的帐号信息 # cat /etc/passwd | grep apache 发现它的shell是“/sbin /nologin”,需要改成“/bin/bash” # vi /etc/passwd 修改完毕后,保存退出 这 样再 su elasticsearch就可以很容易进去了
elasticsearch:x:989:984:elasticsearch user:/home/elasticsearch:/bin/bash
groupadd elasticsearch useradd -g elasticsearch elasticsearch chown -R elasticsearch:eelasticsearchla /usr/local/elasticsearch chown -R elasticsearch:elasticsearch /usr/share/elasticsearch/
启动错误收集:
错误一:max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]
解决:
修改/etc/security/limits.conf文件 * soft nofile 85536 * soft nproc 85536 * hard nofile 85536 * hard nproc 85536 * - nofile 85536 elasticsearch sfot nofile 100000 elasticsearch hard nofile 100000 vim /etc/sysctl.conf vm.max_map_count=655360 net.ipv4.tcp_tw_recycle = 1 net.ipv4.tcp_max_tw_buckets = 6000 net.ipv4.tcp_tw_reuse = 1 fs.file-max = 65536 net.ipv4.tcp_syncookies = 0 net.ipv4.tcp_orphan_retries = 1 net.ipv4.tcp_fin_timeout = 25 net.ipv4.tcp_max_orphans = 8192 net.ipv4.ip_local_port_range = 32768 61000 sysctl -p vim /etc/security/limits.d/20-nproc.conf * soft nproc 85536 * hard nproc 85536 root soft nproc unlimited vi /etc/ssh/sshd_config 将# UseLogin no UseLogin yes 重启sshd服务
切换到 elasticsearch 运行
su elasticsearch cd /usr/share/elasticsearch/bin/ ./elasticsearch -Ehttp.port=8200 -Epath.data=node2
http://192.168.2.245:7200/_cat/nodes?v
ip heap.percent ram.percent cpu load_1m load_5m load_15m node.role master name 192.168.2.245 21 96 10 0.11 0.17 0.13 mdi - bIjFGK8 192.168.2.245 17 96 10 0.11 0.17 0.13 mdi - c_Slakt 192.168.2.245 24 96 6 0.11 0.17 0.13 mdi * y4pYif7
kibana安装和使用
下载地址:https://elasticsearch.cn/download/
tar -zxvf ./kibana-6.0.0-linux-x86_64.tar.gz cd kibana-6.0.0-linux-x86_64/ vim kibana.yml 如果要外网可以访问: server.host: "0.0.0.0"
本文来自博客园,作者:孙龙-程序员,转载请注明原文链接:https://www.cnblogs.com/sunlong88/p/12821724.html
分类:
elasticsearch
标签:
elasticsearch
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· C#/.NET/.NET Core优秀项目和框架2025年2月简报
· DeepSeek在M芯片Mac上本地化部署
· 葡萄城 AI 搜索升级:DeepSeek 加持,客户体验更智能