shishanglian

导航

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 on 2023-05-25 13:57  嘉合  阅读(88)  评论(0)    收藏  举报