ElasticSearch 运维

 
 rpm 安装

systemctl  start elasticsearch

systemctl  stop elasticsearch

 

memory config

/etc/elasticsearch/jvm.options.d/mem.options

 

ik 插件安装 

拷贝到 /usr/share/elasticsearch/plugins/ik  ,解压即可

 

ES Head Chrome  插件

https://github.com/mobz/elasticsearch-head.git

 

https://www.elastic.co/guide/en/elasticsearch/reference/8.7/install-elasticsearch.html

https://www.elastic.co/guide/en/kibana/8.7/kibana-concepts-analysts.html

 

 RPM安装https://www.elastic.co/guide/en/elasticsearch/reference/8.7/rpm.html

检查:curl --cacert /etc/elasticsearch/certs/http_ca.crt -u elastic https://localhost:9200

HOME: /usr/share/elasticsearch

配置:/etc/elasticsearch

日志/var/log/elasticsearch/

数据:/var/lib/elasticsearch

配置2:/etc/sysconfig/elasticsearch

 

Kibana

./elasticsearch-reset-password -u kibana_system --auto

kibana.yml

   elasticsearch.username: "kibana_system"

   elasticsearch.password: "**********"

   elasticsearch.ssl.certificateAuthorities: [ "/etc/kibana/certs/http_ca.crt" ]    ←  from /etc/elasticsearch/certs/http_ca.crt

 

=========================

https://hakanmazi123.medium.com/online-installation-elasticsearch-and-kibana-to-ubuntu-97ca71d869e2  OKK

Online Installation Elasticsearch and Kibana to Ubuntu

 

Hi everyone, In this article I will share Elasticsearch-8.* and Kibana-8.* installation step by step on the same Ubuntu20.04 operating system.

I allready have Ubuntu20.04 operating system on my vmware tool. I assume you are allready have one Ubuntu operating system too or other linux operating systems(some codes are different).

Online Installation for Elasticsearch-8.*

Download and install the public signing key. 

You may need to install the  package on Debian before proceeding:

Save the repository definition to :

Update the ubuntu packages Then, run the elasticsearch installation. After installation you will see the password for elastic superuser on the terminal. Keep save that password.

After elasticsearch installation. http_ca.crt and http.p12 and transport.p12 files will be create automatically under /etc/elasticsearch/certs directory.

Now let’s configure the elasticsearch.yml file under the /etc/elasticsearch/ directory. My ip is 192.168.41.146 so set the network.host with this ip(you should set your ip).

After configuration elasticsearch.yml file then start Elasticsearch using below commands.

Let’s check elasticsearch on any web browser. You have to use https request.

Online Installation for Kibana-8.*

Download and install the public signing key. (If you allready run this code for elasticsearch pass this area)

You may need to install the  package on Debian before proceeding. (If you allready run this code for elasticsearch pass this area)

Save the repository definition to (If you allready run this code for elasticsearch pass this area)

You can install the Kibana debian package with below commands

To configure Kibana to start automatically when the system starts, run the following commands. Kibana can be started as follows:

Check the kibana status

These commands provide no feedback as to whether Kibana was started successfully or not. Log information can be accessed via .

Create a directory called certs under the /etc/kibana path.

Copy http_ca.crt file from /etc/elasticsearch/certs/http_ca.crt to certs directory under the /etc/kibana/ path using below command.

Generate password for kibana_system using below command.

Configure the kibana.yml file under /etc/kibana path.

Start kibana.service

Let’s check kibana on any web browser. You can search http://your_ip:5601 adress on google chrome. To enter kibana you can use elastic superuser name and password.

Conclusion:

Thanks for reading. In this article, I try to share Elasticsearch-8.2.2 and Kibana-8.2.2 installation steps respectively.

 

====================================================

设置密码

bin/elasticsearch-setup-passwords interactive

 

创建 role

复制代码
/_security/role/xxx_role
{
  "cluster": [
    "all"
  ],
  "indices": [
    {
      "names": ["question_index_test", "question_ref_index_test"],
      "privileges": ["all"]
    }
  ]
}

curl -XDELETE '172.16.154.166:9200/_security/role/tas_role_test' -u elastic:password
复制代码

创建 user

PUT /_security/user/xxx_user
{
  "password": "ddddd",
  "roles": ["xxx_role"]
}

curl -XDELETE '172.16.154.166:9200/_security/user/dovip_tas_es_prod' -u elastic:password

 

 

posted @   嘉合  阅读(57)  评论(0编辑  收藏  举报
编辑推荐:
· go语言实现终端里的倒计时
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
阅读排行:
· 周边上新:园子的第一款马克杯温暖上架
· 分享 3 个 .NET 开源的文件压缩处理库,助力快速实现文件压缩解压功能!
· Ollama——大语言模型本地部署的极速利器
· DeepSeek如何颠覆传统软件测试?测试工程师会被淘汰吗?
· 使用C#创建一个MCP客户端
点击右上角即可分享
微信分享提示