ElasticSearch 运维

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

 

prod   app2

--------------------------- Security autoconfiguration information ------------------------------

Authentication and authorization are enabled.
TLS for the transport and HTTP layers is enabled and configured.

The generated password for the elastic built-in superuser is : XVZNenXhlsFWJh6TtH_X

If this node should join an existing cluster, you can reconfigure this with
'/usr/share/elasticsearch/bin/elasticsearch-reconfigure-node --enrollment-token <token-here>'
after creating an enrollment token on your existing cluster.

You can complete the following actions at any time:

Reset the password of the elastic built-in superuser with
'/usr/share/elasticsearch/bin/elasticsearch-reset-password -u elastic'.

Generate an enrollment token for Kibana instances with
'/usr/share/elasticsearch/bin/elasticsearch-create-enrollment-token -s kibana'.

Generate an enrollment token for Elasticsearch nodes with
'/usr/share/elasticsearch/bin/elasticsearch-create-enrollment-token -s node'.

-------------------------------------------------------------------------------------------------
### NOT starting on installation, please execute the following statements to configure elasticsearch service to start automatically using systemd
sudo systemctl daemon-reload
sudo systemctl enable elasticsearch.service
### You can start elasticsearch service by executing
sudo systemctl start elasticsearch.service
[/usr/lib/tmpfiles.d/elasticsearch.conf:1] Line references path below legacy directory /var/run/, updating /var/run/elasticsearch → /run/elasticsearch; please update the tmpfiles.d/ drop-in file accordingly.

 

Kibana

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

 

kibana.yml

   elasticsearch.username: "kibana_system"

   elasticsearch.password: "m_*De+pU_+oPQEeM6q=K"

   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 setthe 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.

 

=== 排错 ===

ERROR: bootstrap checks failed
max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
解决办法:
修改配置sysctl.conf

  1. sudo vi /etc/sysctl.conf

添加下面配置:

  1. vm.max_map_count=655360

并执行命令:

  1. sysctl -p

然后,重新启动elasticsearch,即可启动成功。

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