.net core 与ELK(1)安装Elasticsearch
程序员文章站
2022-04-08 17:17:18
1.安装java jdk 2.去官网下载https://www.elastic.co/cn/downloads/elasticsearch wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.7.1.ta ......
1.安装java jdk
[elsearch@localhost bin]$ java -version openjdk version "1.8.0_181" openjdk runtime environment (build 1.8.0_181-b13) openjdk 64-bit server vm (build 25.181-b13, mixed mode)
2.去官网下载
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.7.1.tar.gz
3.解压
tar -zvxf elasticsearch-6.7.1.tar.gz -c /usr/local
4.设置创建用户
[root@localhost ~]# groupadd elsearch [root@localhost ~]# useradd elsearch -g elsearch -p elasticsearch [root@localhost ~]# passwd elsearch # 设置密码
5.更改解压的文件的owner
[root@localhost ~]# cd /usr/local/ [root@localhost /usr/local]# chown -r elsearch:elsearch elasticsearch-6.7.1/
6.尝试启动bin目录下的elasticsearch
[elsearch@localhost bin]$ ./elasticsearch
7.报错解决
错误:max virtual mefnory areas vm.max_ map_count [ 65530 ] 15 too low, increase toa t least [ 262144 ]
在配置文件最后一行加上:
vm.max_map_count=655360
错误:max file descriptors [ 4096 ] for elasticsearch process 15 too low, increase to at least [ 65536 ]
etc目录下
用 vi ./limits.conf 进入limits.conf进行编辑,修改如下:
elsearch soft nofile 65536 elsearch hard nofile 65536 elsearch soft nproc 4096 elsearch hard nproc 4096
报错:跟access相关的
用ll查下相关文件的owner,然后改为用户elsearch
8.编辑elasticsearch.yml配置文件,使本地主机可以访问els所在虚拟机
[elsearch@localhost config]$ vi elasticsearch.yml
9.test
./elasticsearch -d #启动
本地浏览器访问
推荐阅读
-
Asp.Net Core简介与安装教程
-
MVC5项目转.Net Core 2.2学习与填坑记录(1)
-
Asp.Net Core 学习教程1、初始.Net Core与VS Code 第一个web程序
-
[Asp.Net Core] Blazor Server Side 开发教程 - 安装环境与运行第一个程序
-
.NET Core CSharp初级篇 1-2 循环与判断
-
.NET Core ASP.NET Core Basic 1-2 控制反转与依赖注入
-
.net core 与ELK(3)安装Kibana
-
.net core 与ELK(2)安装Elasticsearch可视化工具
-
asp.net core 一个中小型项目实战的起手式——项目搭建与仓储模式下的持久层创建(1)
-
.NET Core CSharp初级篇 1-6 类的多态与继承